Skip to content
Advertisement

Tag: geopy

How to add the name of the nearest point?

I have two data frames with coordinates of attractions and exists. I use this to get the distance to the nearest exit: I want to add a column with the name of this nearest exit. It has to look like: I will be grateful for any help! Answer Write this line at the end of for loop

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

I have a dataframe with Latitude and Longitude columns, How do I create a column that measures the distance towards a particular location with coordinates (47.631872, -122.217109) In particular I’d like to use the geodesic function from geopy for the distance: from geopy.distance import geodesic. It takes in the inputs of 2 tuples containing latitudes and longitudes, and outputs the

geopy wont return proper coordinates for canadian postal codes

I am trying to convert Canadian Postal codes into lat, long coordinates however geopy returns them as either none or somewhere in a different country Output AttributeError: ‘NoneType’ object has no attribute ‘latitude’ OR some random address Answer I think the problem here is either the API you use for geopy does not support for CA zip code, or you

Advertisement