Get back more tweets with geo location data

DaveDev_Testing

Hi All,

I am working on a research project that is largely based on geography and location. I am currently attempting to use the search api via http to get the contents of tweets that meet certain criteria and map them to locations and do some analysis on that.

My current result sets from each query is roughly 10-15 json objects and potentially 1 or 2 (if any) contain geo location data. I was wondering what the optimal way to structure my query is such that I can get back a result set that contains mostly objects with location data.

An example query is below, I have included a query that searches for tweets about the Olympics in Africa and within 1250 miles (I picked a random lat/long in Africa).

http://search.twitter.com/search.json?q=%20Olympics%20geocode:6.1,15.0,2500mi

Perhaps I should be using a different API? If so, which api, and what is a good sample query along similar lines?

Thank you for any help,
~Dave

1 year 36 weeks ago

Replies

episod
@episod Taylor Singletary

There just aren't that many geotagged tweets out there. The Search API uses fuzzy matching on user's location fields to "help" out your search -- but there's no way to increase the amount of geotagged tweets you're getting back if the tweeters aren't supplying them..

The best solution for you might be to turn what you're doing on its head a little bit -- instead of using the search API to find tweets that've already happened in your ideal geographic area, use the Streaming API's locations feature to be streamed those geotagged tweets in real time as they happen -- the streaming API won't include these non-geotagged tweets the way search will. See this for more info: https://dev.twitter.com/docs/streaming-apis/parameters#locations

1 year 36 weeks ago
DaveDev_Testing

Hi,

Thanks for the pointer. I am attempting to set this up, but running into barricades on how to set up a connection to the streaming api using OAuth (never used it before). Anyways I'm sure there are some samples around. Could somebody please point me to one that uses standard .NET 4.0 C# ?

I've been digging around for a good hour or two and have yet to come across anything straightforward that actually works or explains it in enough detail and breadth to actually do something with it.

Thanks again,
~Dave

1 year 35 weeks ago
JoeMayo
@JoeMayo Joe Mayo

Hi Dave,

I have streaming support in LINQ to Twitter (http://linqtotwitter.codeplex.com/). The downloadable source code has examples. Check out the filter stream and set a where clause on the Locations property. Track works well, but I haven't used it much with locations, so it might be useful to get some feedback in that area.

Joe

1 year 35 weeks ago