D3.js seems to take coordinate as [longitude,latitude]; Google maps takes [latitude,longitude].
The list format including a comma, like [n,n], is not suit for csv files, because csv deal with comma as separator.
Whether it is csv or JSON, latitude and longitude should be stored independently, with annotation.
In this week, I was trying to make geolocation data of whole Japanese listed companies, and I had finished it successfully. I am going to put the data on a data storage page on my blog. But during this effort, I stacked at some point. The most thing that took me almost an hours, is coordination problem. The order of coordinate, latitude and longitude, seems to be different between Google maps and D3!
Geocoding is the effort to get a location data which is based on the Earh’s latitude and longitude. Google maps API helps us the task. For example, it take a company’s address, then turns into the geological coordinate data, like 1. Lists don’t have annotation, and that was the source of the problem.
The different order of coordinate:
The reason is, d3.geo.albers() takes a coordinate as [longitude,latitude], but Google maps API and even Google map’s search take a coordinate data in the order [latitude,longitude].
The list has more problems:
So what should I do with it? I recommend you store latitude and longitude in separate columns or dictionaries. Then when you import the data, insert both of data into .
- 6626569, 139.7692035″,1352 ↩