Geocode with google map's API key using Python

preview_player
Показать описание
In this video, I demonstrate how to get geographical information from Google Map's Geocoding API. I, at first, show how to get the API key from google, and then I describe how to get geographical information (i.e., latitude and longitude) for addresses using python’s googlemaps module.

IMPORTANT:

This video does not include one tiny but essential information. You also need to enable the Geocoding API before running the codes on Python. For enabling the Geocoding API:

- Go to the dashboard of your “Google APIs.”
- Click “Library” on the sidebar on the left.
- Write “Geocoding API” in the search box.
- Finally, select and enable the Geocoding API from the search result.
Рекомендации по теме
Комментарии
Автор

Wow, this is exactly what I was looking for. Very inciteful and easy to follow guide. Thanks so much!

anELVEDINtodiefor
Автор

Very helpful video! Exactly what I was looking for. Thank you.

vsharat
Автор

@ A.T.M. Sayfuddin - is it possible to write it as UDF and the use apply function? if so, how?

romanzdk
Автор

Thanks . Could you help me to get travel time using Google maps API in python between two addresses? I would be grateful for your help.

lxbt
Автор

for i in range(len(df)):
geocode_result = gmaps_key.geocode(df.loc[i, 'Address'])
(seems to be problem here)
try:
Lat=
Lon=
df.loc[i, 'Lat'] = Lat
d.locf[i, 'Lon'] = Lon
except:
Lat = None
Lon = None


error:- KeyError: 0. Please tell me my mistake if you know that? @A.T.M. Sayfuddin

karanmurjani