This Python script utilizes the GeoPy geocoding library to batch geocode a number of addresses, using various services until a pair of latitude/longitude values are returned. Python 3 port and refactor of a script by @rgdonohue.
https://gist.github.com/ericmhuntley/0c293113aa75a254237c143e0cf962fa
Built to anticipate an input csv
should that includes columns named street
, city
, state
, country
.
python geocode.py data.csv 100
Where data.csv
is an appropriately formatted csv
encoded in utf-8
and 100 is the timout between each request in units of milliseconds.
Looks great, and thank you for posting this! Are these all of the free geocoding APIs? Just curious as to the choice of geocoding services.
Cheers,