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

getting all long and lat from pandas dataframe via geopy

I have a data frame with location data like "Los Angeles, CA". The goal is the iterate over all entries of the column and save the long and lat in a new column. Any input or tips are highly welcome ! I tried it for a single value and it worked. from…
hmmmbob
  • 1,167
  • 5
  • 19
  • 33
0
votes
2 answers

How to fix `TypeError: argument of type 'ArcGIS' is not iterable` error on geopy?

I wanted to make a program where you enter your address(the example in the code is a Dutch address) and then the program gives as output the longitude and the latitude od that address. I also tried to make it more user-friendly so if the entered…
BSM
  • 87
  • 2
  • 12
0
votes
1 answer

Why does geodesic return 0.0?

I'm about 4 hours into Python, so this is probably a really silly question. I don't quite understand why geodesic is returning 0.0 for the distance between the 2 coordinates I provide. import csv from geopy.distance import geodesic with…
InsuredApple
  • 63
  • 1
  • 3
  • 12
0
votes
0 answers

Python: How to I better manage memory to prevent a `Killed 9` OOM error?

I'd like to use memory more efficiently. My code is tripping an OOM memory error. When I run this, my virtual memory size increases significantly and I get a Killed: 9 error. The virtual memory goes up to 35GB:…
Sebastian
  • 957
  • 3
  • 15
  • 27
0
votes
1 answer

How to append a list based on the distance between two coordinates?

I am trying to append a list of numbers based on the distance between two lat/lon coordinates. If I have lists of lat and lon, and a zipped array of the points and their respective lat & lon, how do I write a loop to append the points where the…
MAJ
  • 437
  • 5
  • 17
0
votes
1 answer

Error in Python code: after applying style_function method to change color, compilator give me an error

I'm using folium library. I want to change bgcolor of the 2-nd layer of map to 'yellow'. I've tried the code bellow, everything seems to be OK, but I think it's an issue with .read() or smth like this: import folium import pandas data =…
Jimmy Hoho
  • 37
  • 1
  • 4
0
votes
1 answer

Make geopy.Point more readable in an pythonic way

I am currently working with the geopy package under Python 3.5. I use the geopy.Point package. I included it in very many files and never had issues. Unfortunately I now have trouble debugging since the Point __str__ function uses a geodetic datum…
0
votes
1 answer

Geopy not have all same key for address

How can I detect some missing key on location.raw["address"] dictionary. This because, some address doesn't have ['city'] or ['road'] key :( It gives difficult to me to save the data in the dataframe Python. This is my code: from geopy.geocoders…
Amzar
  • 23
  • 4
0
votes
2 answers

KeyError 'City' in Dataframe when Calculating Value?

I've been having some trouble working with a dataframe in Python for the past couple of days - I've been trying to calculate the coordinate values for a 'City' Column in my dataframe (it has around 10500 rows, however I always receive a KeyError:…
Jerin Raisa
  • 35
  • 1
  • 6
0
votes
0 answers

Geopy using the Google Maps v3 API: How to plot an optimal TSP route on a map

I kindly need help with plotting optimal routes from my optimization model on say google map using the 'geopy' and google map v3 api. The image below illustrates an example of the optimal routes obtained from my model with the corresponding zip…
Vondoe79
  • 313
  • 4
  • 22
0
votes
0 answers

Pandas Append retrieved values at the end of each row

I'm using geopy library to get the latitude and longitude of a list of the location name. So far retrieving data is good but I'm having trouble with appending retrieved data to the end of each row. I tried to use df.append but the result's not…
demid
  • 348
  • 5
  • 16
0
votes
1 answer

Installing GeoPy in PyCharm (on MacOS)

I need your help for installing the module GeoPy in PyCharm. When I execute my project, there is this error : ModuleNotFoundError: No module named 'geopy' I haven't found the package GeoPy in PyCharm, so I have tried to install it with this…
Nelly Barret
  • 144
  • 1
  • 17
0
votes
0 answers

geopy returns latitude and longitude for None

I'm trying to set my address to None by geopy returns a value for latitude and longitude. from geopy.geocoders import Nominatim geolocator = Nominatim() addr = None location = geolocator.geocode(addr) print location.latitude,…
user1050619
  • 19,822
  • 85
  • 237
  • 413
0
votes
0 answers

loop dataframe column to covert county to coordinates

I want to convert county state name to coordinates. county: fips state_fips county_fips state county 1000 1 0 Alabama Alabama 1005 1 5 Alabama Barbour County 1007 1 7 Alabama Bibb County 1009 1 9 Alabama Blount…
zilong
  • 65
  • 7
0
votes
1 answer

convert county state names to coordinates

I want to convert county state name to coordinates. county: fips state_fips county_fips state county 1000 1 0 Alabama Alabama 1005 1 5 Alabama Barbour County 1007 1 7 Alabama Bibb County 1009 1 9 Alabama Blount…
zilong
  • 65
  • 7