I am writing an app with Google App Engine using python and I am turning a large wikipedia list into a spreadsheet and then inputting the list rows into Locations. For example this: http://en.wikipedia.org/wiki/List_of_North_Carolina_state_parks and I need to turn the name of each park into an address, I would imagine they won't be exact but as long as they are almost correct it is alright with me.
Is there any way I can do this using python on the server side? I know about Google's Geocoding service but it is all done with javascript and it is rate limited.
Is there any service that can do this?
UPDATE: geopy is just what I was looking for. I am wondering what the best way to deal with multiple results is. Here is my attempt:
try:
place, (lat, lng) = g.geocode(title+", North Carolina")
except ValueError:
geocodespot = g.geocode(title+", North Carolina", exactly_one=False)
place, (lat, lng) = geocodespot[0]
It works just fine but I am wondering if there are any better ideas.
Google geocode does not require any key to use.
All information about the most recent version can be found:
https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding
all you have to do is make a request to:
(example)
http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=false
then use urllib
It is rate limited, But it is a free service. It is most certainly not all done with javascript. Why does it matter if it is rate limited if you are just geocoding a static list of nc parks?
There is the
geopy
library.Example (from the getting started page):