Questions tagged [geopy]

geopy allows you to convert between partial place names and latitude/longitude coordinates by wrapping many different online API's and providing access through one standard interface.

geopy allows you to convert between partial place names and latitude/longitude coordinates by wrapping many different online API's and providing access through one standard interface. Additionally, it contains convenience functions for parsing lat/long coordinates and finding as-the-crow-flies distance between them.

geopy makes it easy for developers to locate the coordinates of addresses, cities, countries, and landmarks across the globe using third-party geocoders and other data sources.

geopy includes support for many geocoders such as Google Maps, Bing Maps, Nominatim, and GeoNames.

504 questions
0
votes
1 answer

Stuck mapping location heatmap on python

I am working on an exercise which consists on retrieving data from foursquare in order to determine where to add a Gym based on less competition. I have already called the API and cleaned my data, and was even able to map all the gyms. I am stuck,…
Fabianz
  • 1
  • 1
0
votes
2 answers

Returning zipcodes for longitude/latitude with geopy - avoiding GeocoderTimedOut: ('Service timed out', 'occurred at index ...')

This question is not new and was discussed multiple times, but I am new to Python. Geopy too slow - timeout all the time Timeout error in Python geopy geocoder I have a dataset of 11000 geolocations and would like to have their zipcodes. My data…
Anakin Skywalker
  • 2,400
  • 5
  • 35
  • 63
0
votes
1 answer

Using apply function in pandas to create a new column TypeError: string indices must be integers

I have a pandas dataframe, where I have a list of incomplete addresses that I pushed through to Google Maps API to get as much data about every address as possible and stored this data in a column called Components, which is then parsed using other…
user4718221
  • 561
  • 6
  • 20
0
votes
1 answer

Using structured queries to geocode records in a pandas dataframe using GeoPy

I would like to use structured queries to do geocoding in GeoPy, and I would like to run this on a large number of observations. I don't know how to do these queries using a pandas dataframe (or something that can be easily transformed to and from a…
user2905280
  • 47
  • 1
  • 7
0
votes
1 answer

Getting the coordinates of a column of addresses in python

latitudes=[] longitudes=[] addresses = final_data['Address'].tolist() for address in addresses: location = geolocator.geocode(address) print(type(location)) #the location type is none latitudes.append(location.latitude) …
0
votes
1 answer

How to avoid geopy time out problem with nominatim?

I am using geopy with nominatim to get cities names from geographic coordinates. I am using the below code : from geopy.geocoders import Nominatim geolocator = Nominatim(user_agent="class-app") for index,row in data.iterrows(): georeverse =…
0
votes
1 answer

Geopy outputs NoneType

I wanted to get the latitude and longitude of an adress with geopy. My code is geolocator = Nominatim(user_agent="EXAMPLE") location = geolocator.geocode("Wismarsche Straße 393-397 19049 Schwerin") lat = str(location.latitude) lon =…
Moondancer
  • 145
  • 1
  • 13
0
votes
0 answers

hi, have been working on geopy but i came accross this 'Key error "group" ' and i couldnt find solutions, am new to this so kindly help out

KeyError Traceback (most recent call last) in 1 dnipro_venues = getNearbyVenues(names=dnipro_regions['Region'], 2 latitudes=dnipro_regions['Latitude'], ----> 3 …
0
votes
0 answers

Fastest way to calculate min distance between a set of locations and specific points (DataFrame)

I am trying to calculate distances between around 1.4 Millions points stored in a Dataframe with LATITUDE and LONGITUDE in separate columns and a small set of hotspots (around 10 points), also with latitude and longitude, but it is taking a while. I…
0
votes
1 answer

GeoPy is not working: What is the reason of NOT getting results for nom.geocode()?

I have already installed certificates (used this advice from a different thread) .Here's the code and the result from geopy.geocoders import ArcGIS nom = ArcGIS() location=nom.geocode("3995 23rd st, San Francisco, CA…
ElMuchacho
  • 300
  • 1
  • 12
0
votes
0 answers

GeoPy Geocoder randomly doesn't work, but sometimes does

I have been using GeoPy with Nominatim perfectly for a couple of days. However, at random times I will receive an error when my app had previously been working a couple of seconds ago. I have implemented this code inside a flask app where you can…
0
votes
1 answer

Calculating the distance between 2 sets of lat/long coordinates with Pandas and Geopy

I am trying to use 2 different dataframes each with a different set of lat/long coordinates to calculate the distance between them using Geopy. from geopy import distance def dist_calc (row): start = (row['Lat_1' ], row['Long_1']) stop =…
Lazerhorse
  • 123
  • 1
  • 10
0
votes
1 answer

Calling a Python Function (geopy.distance.great_circle()) with multiple dynamic tuples in arguments

I've a List of Tuples which is created dynamically and hence, its length can vary. An example of this list is:- mylist=[(18.521428, 73.8544541), (28.6517178, 77.2219388), (18.9387711, 72.8353355)] Now, I need to call the great_circle() of…
Shubham
  • 27
  • 6
0
votes
0 answers

bulk geolocate location strings by countries

I have a large dataset of addresses (a couple of millions) as strings that needs to be mapped to countries. I've looked into using geopy and nominatim locally but seems that downloading and loading the whole planet database of open street map is an…
Jimmar
  • 4,194
  • 2
  • 28
  • 43
0
votes
0 answers

Same coordinates printing in pd dataframe although iterating trough rows, using pd and geopy

I am writing a program to retrieve long and lat coordinates from hospital names using geopy nominatim. Nominatim is powerful at finding coordinates although city and country are not always listed. The script works fine but the coordinates printed do…