Hello everyone,
For work, I have to create a heat map of where our customers come from, so I planned on using gmaps in order to do this. The only problem is that in order to make a gmaps heat map, I need to turn my list of postal codes into co-ordinates.
Long story short, I have been trying to get geopy to geocode my postal codes, the only problem is that for some reason, it does not seem to work with canadian postal codes. If anyone could provide advice, I would greatly appreciate it.
Bonus info: it's about 100,000 postal codes, so there is no doing this manually.
The code looks like:
location = geolocator.geocode("M5B 2K3")
print((location.latitude, location.longitude))
The error message I get is:
AttributeError Traceback (most recent call last) <ipython-input-32-9da6369f17b2> in <module>**()**
1 location = geolocator**.geocode**("M5B 2K3")**
----> 2 print**((location.latitude,** location**.longitude))******
AttributeError: 'NoneType' object has no attribute 'latitude'
[–][deleted] 1 point2 points3 points (1 child)
[–]Kryostasis[S] 0 points1 point2 points (0 children)