Python Geocoder Library

preview_player
Показать описание
In this Python tutorial, we will go over the basics of using the geocoder module/library, how to find latitudes and longitudes, find addresses based on latitudes and longitudes and how to find zip codes.
Рекомендации по теме
Комментарии
Автор

If for some reason, the geographic data you are trying to retrieve comes back "None", try another service. Use print(dir(geocoder)) to see the services you can try. Note that, often you will need an API key. Here is an example:

# location (city, state) to latitude and longitude
lat_long = geocoder.bing('San Diego, California', key='your_key')
print('San Diego, California', lat_long.latlng)

# another example using OpenStreetMap that currently does not require an API key
g = geocoder.osm('11 Wall Street, New York')
print(g.osm)

Also, you can get similar geographic data with the geopy module, which I plan to do a tutorial on soon.

RyanNoonan
Автор

Thanks for your tuto. I’m trying to find the coordinates from Postal Codes: google, bing and osm’s output is none. What should i do? Thanks

luispalma
Автор

will it work for any version of geocoder or any with 1.23.2 ?

shreyansh
Автор

while I am doing reverse geocoding as you should
I am getting output as none none none for all the three city, state, country functions..
so how should I fix this issue ?

nikethbayya
Автор

Hi Ryan, great video! What if I have a list of Geo Lat-Lng and need to find a ZIP code based on that. Can I do that? Thanks so much!

skyblue