I'm trying to run a script for geocoding using a library called geocoder. The code is below:
@RateLimited(5)
def Geocode(addresses):
latlong = {}
for i in addresses:
if i in latlong:
break
else:
x = geocoder.google(i)
latlong[i]=x.latlng
return latlong
I'm also using a simple rate limiting function that I snitched from here to ensure that there aren't over 5 requests being sent out per second as well. I've tried Google, OSM, Bing Maps APIs and the function is returning only 3 results! The entire geocoding dict that I'm passing is just around a thousand addresses, so its not being rate-limited by the APIs I'm sure.
Any suggestions on how to resolve this? Thanks!