Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plot latitude/longitude values from CSV file on Google Maps (or similar platform) [closed]

I've been provided with a table of data which includes columns for latitude and longitude. The data is US only. What I've like to do is to feed this data to Google Maps or a similar tool like Live Maps and have the data points plotted.

Does anyone have a code sample or know of a library that makes this task simple? I can read the values if something else can plot them (or generate the JavaScript to do it). I'm familar with C#, PHP, Python etc so language is not a priority. My preference is something that the is simple and robust.

like image 514
Brian Lyttle Avatar asked Aug 10 '09 04:08

Brian Lyttle


2 Answers

Answer: use this website http://www.darrinward.com/lat-long/?id=257165 and it will plot them for you.

Unrelated, screenshot is locations of #thefappening leaks. I wish leakers would scrub EXIF before publishing this crap online, this is really not right.

enter image description here

like image 156
William Entriken Avatar answered Sep 22 '22 13:09

William Entriken


I've dealt with this problem before many times. While KML is one option, if you have a CSV with the latitude and longitude already in it, my quick and dirty method is to use Google Fusion Tables: http://www.google.com/fusiontables/Home

Even if you have just names of cities and towns (anywhere in the world!) it does an okay job.

If you only care about US locations, and the G20 (rich, well geocoded nations), then batch GEO is probably the best fast method, but limits you to 2500 points on the free version: http://batchgeo.com/

But for my needs, BatchGeo's method falls short. When you drill down in Kenya you see that it guesses at many locations wrong. Those 666 locations in Nairobi are slums with names that appear in no official database. Since Kenya isn't one of the top 20 tech-friendly countries, this is a common source of error. Most interesting locations appear in slums. (See also www.mapKibera.org for the effort involved in fixing blank spots in google maps)

I have a more extensive blog about this with lots of images of what your output will look like: chewychunks.wordpress.com/2011/06/09/how-to-geomap-story-locations-across-east-africa/

(but newbies are not allowed to post images here directly :( )

The best solution for me required downloading 44,000 locations from Geonames.org list for Kenya and Uganda, adding a custom slum-locations geo-lookup-list, and a python multi-step matching algorythm based on DIFFLIB and REGEX.

like image 31
ChewyChunks Avatar answered Sep 25 '22 13:09

ChewyChunks