I'm looking for a way to take a rough location string (ex. "Buddy's Pub in City, State"), and convert it to the best-guess set of coordinates. I've looked at GeoPy and Google's Geocoding API, but they are not exactly what I'm looking for. Any help would be appreciated.
Asked
Active
Viewed 158 times
-2
-
This repository should be helpful : https://github.com/googlemaps/google-maps-services-python – aminrd Dec 18 '19 at 21:55
-
@aminrd Thank you, that is exactly what I'm looking for. – dburenok Dec 18 '19 at 22:07
-
This is explicitly off-topic. – AMC Dec 19 '19 at 00:04
-
@AlexanderCécile How so? – dburenok Dec 19 '19 at 00:52
-
Please see: [help/on-topic] – AMC Dec 19 '19 at 00:53
1 Answers
0
Solved it thanks to @aminrd tip.
Google Places API is the answer.
import googlemaps
API_KEY = "your google API key goes here"
gmaps = googlemaps.Client(key=API_KEY)
place_result = gmaps.find_place(input='Buddy\'s Pub in City, State', input_type='textquery', fields=["geometry/location"])
print(place_result)
Output looks like
{'candidates': [{'geometry': {'location': {'lat': XX.2804533, 'lng': -XXX.1195808}}}], 'status': 'OK'}

dburenok
- 93
- 7