Here are a selection of Twitter searches by location. Each one has a geocode and map so you know how far it reaches.
If you don’t find the search code you need in this reference, leave a comment and let me know what you’re after. I’ll update this reference.
Twitter search can filter by the location of a Tweet if the user has location services turned on. If the Twitter user doesn’t have location turned on, Twitter can filter tweets based on the location in a Twitter user’s profile. If that is left blank, then you won’t be able to find that Tweet using a standard location search.
Additional background on this concept is at the beginning of the online version of my Listening Strategy presentation.
Tweets from Capitol, Jan 6Following a speech by Donald Trump telling people to go to the Capitol and disrupt the electoral vote certification, many people did. Some of them were using Twitter. Entering the search string below let’s you use twitter location search to see their tweets:
geocode:38.890550,-77.009017,.02kmThe above string will give you Tweets in a 0.02km radius around the Capitol. You can expand or shrink the geofence however you like however you like. But if you want to search Twitter for a specific date range, for example, 1/6/2021, you’ll need to add that as well:
Example: Tweets about Hurricane Sandy in VermontOne of the specific ways that geocoded Twitter searches get used is during emergencies and weather events. The challenge with using Twitter to monitor these kinds of things is that people use a variety of relevant terms–some official, some folksonomic, some just random relevant words. Here is an example of a geocoded search string for following Vermont tweets related to the Sandy storm of late October 2012:
-RT -election power OR #vtsandy OR #vtresponse OR #frankenstorm OR sandy OR flood geocode:43.913723261972855,-72.54272478125,150kmThis search eliminates retweets that include the “RT” customary signal and include a variety of word markers. I’ve eliminated the word “election” as well to keep the search focused on things which are immediately important in an emergency environment. You’ll notice from the image that, since Vermont isn’t a very round state that we’ll be pulling in Twitter posts from some of the areas around Vermont as well. Also note that in addition to hashtags this twitter location search filter also includes the words “power” and “flood” in case people are tweeting about those words but don’t know about hashtags etc.
Example: NYC Hurricane Sandy Twitter searchThis is pretty much the same as the Vermont search above but is instead set to cover New York City.
-RT -election power OR #sandy OR #frankenstorm OR sandy OR flood OR surge geocode:40.714353,-74.00597299999998,20km
Example: Tweets with #BTV hashtag OR #BVT hashtag within 200km of Burlington, VT (Vermont, Montreal, Quebec, Upstate NY and some NH)Sometimes you want to do an either or kind of search. For example, in Burlington Vermont there are two hashtags which get used: #BTV and #BVT.
Some people use both, some people use only one. If you want to merge those streams and limit by geography, use this search string. Note, that this technique will work with any of the other search strings as well.
#btv OR #bvt geocode:44.467186,-73.214804,200km
Example: Tweets with #BTV hashtag within 200km of Burlington, VT (Vermont, Montreal, Quebec, Upstate NY and some NH)
#btv geocode:44.467186,-73.214804,200kmIf you don’t care if a tweet has #BTV in it or not, use this code instead:
Example: Tweets with #BTV hashtag within 2500km of Burlington Vermont
#btv geocode:44.467186,-73.214804,2500kmIf you don’t care whether a Tweet has the #BTV hashtag or not, and just want to use the geofence use this query instead:
Example: Tweets with #BTV hashtag centered on the lower 48 states USA
#btv geocode:39.8,-95.583068847656,2500kmIf you don’t care whether a Tweet has the #BTV hashtag or not, use this code:
Example: Tweets with “malaria” within 500k of the Whalley Arms public house, UK.Contains the word “malaria” and is within 500km of the Whalley Arms public house in Whalley UK.
Example: Tweets within 100 meters of New York’s Zuccotti Park
geocode:40.709,-74.011,.1kmCombining some of the techniques you’ll see in the other examples, you can search for just Tweets that originate within 100meters of Zuccotti Park and also contain the hashtag #OWS, which is often used on Tweets specific to the “Occupy Wall Street” movement.
#ows geocode:40.709,-74.011,.1kmWant a Twitter location search you don’t see in this reference? Let me know in the comments and I’ll see if I can cook it up for you