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
1
vote
1 answer

ConfigurationError While using Nominatim in Jupyter Notebook

I recently downloaded geopy and tested it out on Jupyter's notebook with the code below. import geopy from geopy.geocoders import Nominatim nom=Nominatim(scheme="http") After running this I received the following…
1
vote
0 answers

from geopy.geocoders.google import GQueryError ModuleNotFoundError: No module named 'geopy.geocoders.google'

I am getting the error: ModuleNotFoundError: No module named 'geopy.geocoders.google' from this code on from geopy.geocoders.google import GQueryError. The error is a show in the picture, also. from django.db import models from urllib.request…
Anas Ch
  • 11
  • 1
1
vote
1 answer

Geopy reverse returns keyerrors for 'city', 'district' and 'borough' despite being in JSON response object

I'm trying to run a very simple geopy reverse script that takes a lat-long coordinate and returns specifically the country, state and city. All three of these are easily pulled from the JSON response object. However, when I try to extract the 'city'…
1
vote
1 answer

Save Lambda's Progress if something went wrong

I'm trying to use geopy on a list of addresses with pandas and lambda, but if connection is lost I'll lose all the progress, is there a way to somehow save it so if something went wrong in the middle of the procedure I can just continue from where…
A.Rahman Mahmoud
  • 328
  • 1
  • 3
  • 17
1
vote
1 answer

Calculating coordinate distances with geopy in a pandas data frame

I have the code below that works for calculating distances between coordinates of cities where a trip with public transport is started and the coordinates of cities where the trip is ended and returns the value. There is a unique number of…
Elda
  • 49
  • 1
  • 10
1
vote
1 answer

"`address` must not be None" error raised when reverse geocoding geopy

Has anyone encountered the following problem? I have a pandas DataFrame containing the coordinates of renewable energy installations and I tried using reverse geocoding to get the related address data. I used geopy for this. The code worked fine on…
1
vote
2 answers

Calculating the distance between two points using pandas and geopy

I have a pandas dataframe like below including four columns but two points(lat1,lon1) and (lat2,lon2) per row: lat1 lon1 lat2 lon2 ========= ========= ========= ========= 30.172705 31.126725 30.188281 …
Mahmood
  • 81
  • 7
1
vote
1 answer

geopy problem connection while getting the county

what I have? I got the following df: id latitude longitude 0 0 31.23333 34.78333 1 1 nan nan 2 2 42.70704 -71.16311 . . . what I what to do? I want to add a column with the…
Dean Taler
  • 737
  • 1
  • 10
  • 25
1
vote
2 answers

Python how to create a new column that measures proximity to a city?

I have a dataframe with Latitude and Longitude columns, df = pd.DataFrame({'Latitude':[47.5112, 47.7210, 47.7379, 47.5208, 47.6168], 'Longitude':[-122.257, -122.319, -122.233, -122.393, -122.045]}) How do I create a column that…
spidermarn
  • 959
  • 1
  • 10
  • 18
1
vote
2 answers

Calculating distance of latitude/longitude on pandas dataframe using GeoPy

I'm trying to calculate distance between latitude and longitude using geopy on a Pandas Dataframe. here is my dataframe: latitude longitude altitude -15.836310 -48.020298 1137.199951 -15.836360 -48.020512 1136.400024 …
albertoivo
  • 385
  • 1
  • 3
  • 13
1
vote
4 answers

Violation user_agent nominatim python GIS

When trying to do an assignment on the intro to Python GIS (https://automating-gis-processes.github.io/CSC18/lessons/L3/geocoding.html), Python errors. Geocoding addresses with Nominatim backend gives the error of violating Nominatim's ToS. I…
Sterewan
  • 19
  • 2
1
vote
0 answers

How to find out whether a point coordinate exists on a path between other two point coordinates?

I've created an application that scrapes data on house listings and calculates the distance to the nearest shop and train station. I've got the lat,lon coordinates for all the shops, listings and train stations and I currently use…
qoob
  • 25
  • 6
1
vote
2 answers

Overwrite a single conditionally selected cell in a (geo)pandas (geo)dataframe with external data in tuple or geopy.location.Location format

I start with a pandas dataframe of historical places. I pass a column of place names to geopy for geocoding. I extract the coordinates, and turn them into points. I also save the geocoder's returned geopy.location.Location in a column for further…
user2905280
  • 47
  • 1
  • 7
1
vote
1 answer

For loops through pandas dataframes for latitude and longitude

So I have a dataframe with two columns cities and counties that has some cities from Maryland USA. I am trying to loop through to get the latitude and longitude coordinates for each city using the following code: from geopy.geocoders import…
Liz M.
  • 25
  • 3
1
vote
1 answer

Can geopy return geocoding quality? (using Bing API)

I've been reading the docs for the Bing geocoder using geopy and there doesn't seem to be a parameter for geocoding quality as an output. In particular, I'm looking for 'matchCodes' and 'confidence' as outlined here. Anyone know if this is…