Geocoded Twitter Searches, a reference of location-specific search strings for Twitter clients.

This page is part of the Twitter Location Search (aka fun with geocodes) resource on Thoughtfaucet.

Church Street, Burlington, Vermont

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.

Using geocodes to filter tweets based on location is what locative media geeks refer to as setting up a geofence. Here are some example geofences and their twitter search strings.

Example: Tweets about Hurricane Sandy in Vermont

One 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.

A search radius that focuses on Vermont, useful for our Hurricane Sandy Twitter filter.

Here is an example of a geocoded search string for following Vermont tweets related to the Sandy storm of November 2012:

-RT power OR #vtsandy OR #vtresponse OR #frankenstorm 
OR sandy OR flood geocode:43.913723261972855,-72.54272478125,150km

This search eliminates retweets that include the “RT” customary signal and include a variety of word markers. 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: Tweets with #BTV hashtag OR #BVT hashtag within 200km of Burlington, VT (Vermont, Montreal, Quebec, Upstate NY and some NH)

wpid1420-media_1300325679885.png

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)

wpid1420-media_1300325679885.png

Contains the #BTV hashtag and is located within 200KM of Burlington VT:

#btv geocode:44.467186,-73.214804,200km

If you don’t care if a tweet has #BTV in it or not, use this code instead:

geocode:44.467186,-73.214804,200km

Example: Tweets with #BTV hashtag within 2500km of Burlington Vermont

wpid1418-media_1300319670725.png

Here is the code to generate this location-based search result in Twitter: Has the #BTV hashtag and is within 2500km of Burlington, VT

#btv geocode:44.467186,-73.214804,2500km

If you don’t care whether a Tweet has the #BTV hashtag or not, and just want to use the geofence use this query instead:

geocode:44.467186,-73.214804,2500km

Example: Tweets with #BTV hashtag centered on the lower 48 states USA

wpid1419-media_1300325440693.png

Contains hashtag #BTV, centered to reach the lower 48 states of the USA with a radius of 2500km (maximum):

#btv geocode:39.8,-95.583068847656,2500km

If you don’t care whether a Tweet has the #BTV hashtag or not, use this code:

geocode:39.8,-95.583068847656,2500km

Example: Tweets with “malaria” within 500k of the Whalley Arms public house, UK.

Map of area that will gather Tweets by location from the UK

Contains the word “malaria” and is within 500km of the Whalley Arms public house in Whalley UK.

malaria geocode:53.81982,-2.406348,500km

Example: Tweets within 100 meters of New York’s Zuccotti Park

geocode:40.709,-74.011,.1km

Combining 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,.1km

Want 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

15 replies on “Geocoded Twitter Searches, a reference of location-specific search strings for Twitter clients.”

  1. Thanks Nicole. We didn’t make that list of top networked cities by accident. Sometimes it takes a little effort to keep things rolling along. 🙂

    Your post is what inspired me to take action on this.

  2. Thanks for the excellent and clear advise. I am about to start a UK focused search on Twitter on the topic of ‘malaria’ and have worked out that to cover the UK you need to use…

    malaria geocode: 53.81982,-2.406348,500km

    Based on centring the UK on Whalley – which is a good choice based on a Wikipedia entry. I decided to use the postcode of the Whalley Arms public house (BB7 9SL) to work out the Long/Lat as 53.81982,-2.406348. UK is approx 1,000 km long, and hence a radius of 500km.

    Thanks again for great explanation.

  3. Just to clarify, the results from these queries is based on the location defined in the users’ profiles, not from where they sent the tweets, right?

    There is a feature in Twitter to track the location from where the tweet was sent, but this is turned off by default and as such 99.5% of tweets do not include this information.

    Personally, I would have more interest in location from where the tweet originated, not from where the user is profiled. My profile, for example, is set to Washington State. So if I was visting Burlington and tweeted from the middle of the town, these queries (apart from the one querying the whole US) would not return my tweet.

  4. Dan: I updated the intro to help show how the location stuff is cascaded.

    Tweets that use the “near” search operator per the usual Twitter advanced search will use profile data like you say.

    The method outlined here and in the Hootsuite location search tutorial and the Tweetdeck location search tutorial will grab Tweets that have location data attached. If there is not location data attached to the Tweet itself then it will use a lookup based on profile data.

    So, as you note, there are tradeoffs at play here: People who have no location will not be properly filtered.

    The above and related methods posted here are the next best thing, something we can act on and give us some data and information vs wishing and waiting.

  5. @Jason: Ya I would also be interested to know if we could pull posts directly to our Google reader of specific region.

Comments are closed.