You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jhconning edited this page Jun 5, 2015
·
1 revision
Matt's notes on geocoding:
Here is the little block of code that I used:
from geopy.geocoders import Nominatim
geolocator=Nominatim()
location=geolocator.geocode("695 Park Avenue, NYC", timeout=1000)
print(location.address)
I've found that the "timeout" function is kind of critical. In fact, now that my memory is coming back, I found it was good to write a wrapper if one is doing a whole bunch of these sequentially, as then one can do a try, except block and handle the timeouts.