geopy

Using Geopy to place (tkintermapview) Markers on Addresses that are pulled from a Spreadsheet

Using Geopy to place (tkintermapview) Markers on Addresses that are pulled from a Spreadsheet Question: I am attempting to get Addresses from a Spreadsheet.. Convert those Addresses to Latitude and Longitude.. Then Add Markers to those Coordinates on a TkinterMapView Map. I used openpyxl to make a Workbook: wB = load_workbook(‘HoldingCats(1).xlsx’) wS = wB.active column_b …

Total answers: 1

Extract District from Coordinates Using Python

Extract District from Coordinates Using Python Question: I have a collection of longitudes and latitudes, and I want to be able to extract the district of each of these coordinates using Python. As of right now, I have developed the following function using the geopy library, from geopy.geocoders import Nominatim from geopy.point import Point MAX_RETRIES …

Total answers: 1

Iterating through a dataframe to obtain location data from coordinates

Iterating through a dataframe to obtain location data from coordinates Question: I have a pandas dataframe that contains latitude and longitude and am trying to create a function to take the coordinates and determine what state each location is in. I am using geopy to obtain location information from the coordinates. Sample data: If I …

Total answers: 1

how can i solve error ''float' object is not iterable'

how can i solve error ''float' object is not iterable' Question: im new at python, and try to categorize places an df1 by distance to places in df2, but something gonna wrong i have 2 dataframes whith coordinate of places import pandas as pd import geopy.distance df1 = pd.DataFrame([[‘a’, 55.88, 37.48], [‘b’, 55.88, 37.53], [‘c’, …

Total answers: 2

Struggling with geopy install. ModuleNotFoundError: No module named 'geopy.geocoders'

Struggling with geopy install. ModuleNotFoundError: No module named 'geopy.geocoders' Question: I ran pip install geopy and it seemed to install ok, but I couldn’t run the following script. from geopy.geocoders import Nominatim geolocator = Nominatim(user_agent="ryan_data") location = geolocator.geocode("175 5th Avenue NYC") print(location.address) That script gives me this. Traceback (most recent call last): File "C:UsersryansAppDataLocalTempipykernel_19160137417210.py", line …

Total answers: 1

Get address using Latitude and Longitude from two columns in DataFrame?

Get address using Latitude and Longitude from two columns in DataFrame? Question: I have a dataframe with the longitude column and latitude column. When I try to get the address using geolocator.reverse() I get the error ValueError: Must be a coordinate pair or Point I can’t for the life of me insert the lat and …

Total answers: 1

Getting address with geopy takes too long

Getting address with geopy takes too long Question: In the context of a project, I have hydrated 1.6 million tweets, i.e retrieved the metadata associated with the tweets such as date of creation, and location. My tweet dataset contains tweets from all over the world, however, I am only interested in tweets created in the …

Total answers: 1

Python: Trouble running any additional queries on Geopy output?

Python: Trouble running any additional queries on Geopy output? Question: have encountered the following – Struggling to wrap my head around it. Have some data that looks like this: I’ve written the following Python that works out the distance between the 2 sets of coordinates: from geopy import distance # Calculate distance between 2 sets …

Total answers: 1