Twitter and geolocation data
I have worked on a twitter api project. The goal was to create a Twitter Map service (visit the site, "Twitter Explorer") that can make users search tweets and display them on Map (using Google Map). I utilized Twitter REST API (Twitter has another products like GNIP and STREAM API). REST API has some limitations relating to geolocation data. First of all, data is not comprehensive. The results are filtered by an unknown twitter algorithm. Read the first paragraph here and also here. Twitter REST API cover only about a week data. This means that REST API cannot be used for presenting historical data. It is important to compare REST API with Twitter Search and to find their differences.
And coordinates attributes are often null, because users do not share their twitting locations for security reasons. This is a deal breaker. If the data is not comprehensive (in another saying, if there is no coordinates attributes) and so many actual tweets are dropped in Map view, what is the point to use the Twitter Explorer. Obviously, it is not right to enforce users' geolocation without permission either.
So, the proper question would be what we can do with 'available' geolocation data from twitter feeds. Twitter's "Location Service" is 'opt-in' basis. There are some good reasons that users purposefully share places (like cities and neighborhood) where they tweet from.
General tweet location is stored into "Place" attribute, which can be utilized for Map service, although it is not the precise location of a tweet. Unfortunately, "near" operator does not work in REST API. For example, the operator search query, korean near:Irvine within:15mi gives some results in Twitter Search, but not in REST API. Query operators for REST API can be found at the "Query Operators" section of this page.
Another approach is to use 'geocode' parameter. Geocode parameter takes a value 'lat, long, radius' as a string. REST API checks 'coordinates' attribute. However, as earlier mentioned, 'coordinates' attributes are mostly null, because users do not share their precise location.
Although these limitation exist, it was fun to play with it. Particularly, it was an interesting part to transform Twitter json data to GeoJson format, which can be afterward loaded into Google Map API with using addGeoJson or loadGeoJson methods.
More read about Twitter location service,