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
0 answers

How to handle SSLError in Geocoding API?

I am using GCP's paid Geocoding API to get the latitude and longitude of around 1 million addresses. Though it is very slow but I can wait. The problem is I am getting SSLError, sometimes after 15000 requests, and sometimes after 6000 requests, or…
Pardeep Kumar
  • 133
  • 2
  • 10
0
votes
2 answers

Remove the coordinates in the location column

Would like to have the coordinates in their own respective columns. This is my df["Boroughs"] 0 Beaches-East York 1 Davenport 2 Eglinton-Lawrence 3 Etobicoke Centre 4 Etobicoke…
Organic Heart
  • 517
  • 5
  • 16
0
votes
0 answers

Trying to get the full string of an address in RStudio, same process as the included python code

I have some python code that I am trying to recreate in R. I am having trouble finding a package that will help me in this process. I have tried to use omsdata and ggmap, but I have not achieved the desired results from geopy.geocoders import…
Fiona
  • 3
  • 4
0
votes
2 answers

Calculating distance in pandas data frame giving error

I have a data set contains lat/long for two points in four columns and trying to calculate the distance between them in the newly added column using geopy.distance. It is working fine if I calculate for a single value but doesn't work for the whole…
Atif
  • 11
  • 1
  • 7
0
votes
1 answer

How to calculate minimum distance using lat-lon data in python

I have two data frame. One is user id with lat lon data and other is store code with store lat lon data. Around 89M rows are there. I want nearest (based on min.distance) store code corresponding user lat lon. df1 - id user_lat …
Pallavi Verma
  • 85
  • 3
  • 12
0
votes
2 answers

Store 3 nearest coordinates

I have an XML file that contains a number of points with their longitude and latitude. My python code at the moment gets the nearest point by simply looping through the XML file, finding the nearest, in miles or whatever, then comparing it with the…
eoinzy
  • 2,152
  • 4
  • 36
  • 67
0
votes
2 answers

Using geopy.distance.distance function, why are distances the same between two points at very different latitudes?

Given what I know about how Latitude and Longitude works, metric distances between two points at constant Longitude, but different Latitude, should be different. However, this is not what the Python library Geopy reflects. For example: from…
Todd
  • 101
  • 1
  • 9
0
votes
4 answers

Speed up getting distance between two lat and lon

I have two DataFrame containing Lat and Lon. I want to find distance from one (Lat, Lon) pair to ALL (Lat, Lon) from another DataFrame and get the minimum. The package that I am using geopy. The code is as follows: from geopy import distance import…
chintan s
  • 6,170
  • 16
  • 53
  • 86
0
votes
0 answers

how to call geopy.distance to add a column to a dataframe?

I have a dataframe with lat/long coordinates for the start and end of a trip. I want to add a "distance" column that records the trip length I know I can do an assign to add a column like this: test = tt.assign(distance = tt.to_lat + …
Feikname
  • 119
  • 1
  • 6
0
votes
0 answers

Can't apply Geopy's raw() method to a Pandas column

I have a Pandas dataframe, and I'm calling a geopy function on each row of 'address_original' column to get as much detail as possible about every address from geopy.geocoders import GoogleV3 geolocator = GoogleV3(api_key='',…
user4718221
  • 561
  • 6
  • 20
0
votes
1 answer

Python to run geopy via ActivePython

Trying to get a location using Python and Google Maps, so I tried to use Geopy module by installing activepython using pypm install geopy but i get a problem which is geo required business edition subscription. Can any one help me? Thanks in…
ingy
  • 19
  • 1
  • 3
0
votes
1 answer

Where to find a large imperfect database with sample addresses for geocoding

I am looking for an imperfect database with addresses that can be used to test a geocode script. Criteria: Contain a representative sample (>10.000 entries) of global addresses Contain NoData and invalid addresses to test error handling Contain…
Rutger Hofste
  • 4,073
  • 3
  • 33
  • 44
0
votes
2 answers

Finding latitude and longitudes for each point that make up an area of a neighborhood?

I am trying to to find the latitude and longitude of every point along the boundary of a specific neighborhood. For example, I've tried using geopy - and when I input a specific neighborhood it returns one pair of coordinates. I would like the…
Leo
  • 11
  • 1
  • 2
0
votes
2 answers

Geopy, checking cities, avoiding duplicates, pandas

I want to get the lat of ~ 100 k entries in a pandas dataframe. Since I can query geopy only with a second delay, I want to make sure I do not query duplicates (most should be duplicates since there are not that many cities) from geopy.geocoders…
hmmmbob
  • 1,167
  • 5
  • 19
  • 33
0
votes
1 answer

Maintain Identifiers While Finding Distance Between Lat and Long

I have two sets of lats and longs that I wish to join with a Cartesian join and find the distance between each pair. There can be duplicates in number or other_number (i.e. two locations/addresses per identifier). d = {'number': ['100', '101'],…
OverflowingTheGlass
  • 2,324
  • 1
  • 27
  • 75