More

Project twitter geo data into WGS84 map

Project twitter geo data into WGS84 map


I'm currently working on displaying twitter geo data (currently just long/lat -> cartesian without any analysis).

This is the world map (source: naturalearthdata): http://dl.dropbox.com/u/14747311/world.png">http://dl.dropbox.com/u/14747311/overlay.png">mercator projection (with R = 1):

x = ((long + 180)/360)*x_dim y = (y_dim/2) - ((arsinh(tan(lat))*(y_dim/2) (lat converted to radiant of course)

Now, the shape is apparent, but of course, the projections don't match. How can I fix that? (programming experience is plentiful, so it's more the theoretical side I'm concerned with).


"The world map certainly isn't in Mercator, but probably pseudo-Plate Carree (lat/lon just mapped as if they're linear units) or Plate Carree. Mercator stretches north-south, and you can see that the POIs are offset north and south versus the base map." [mkennedy]

"@mkennedy has provided the diagnosis (your world map is not in a Mercator projection). The implied solution is to treat (lon, lat) as (x, y), scaled to your world map (this is the "Plate Carree" projection), and you should get a close match. No inverse hyperbolic sine functions are needed :-)." [whuber]

Note: This is a summary of comments by @mkennedy and @whuber, so this question can be marked as answered.


Trends Map works quite well from geotweets using the Twitter Geo API.

"We are currently processing around 30 million tweets per day. We have over 1000 cities from around the world that have their own page on the site (eg Melbourne), and the number of topics changes depending on what people are tweeting about."

Key to this is:

"Trendsmap uses a large volume of tweets and various algorithms to determine what is trending for a given location"

http://trendsmap.com/