I've been trying to measure geographic distance between points in a GeoDataframe (gdb['geometry']) and one specific point, let's say, b_xy. gdb['geometry'] is a
My Geopandas DataFrame has 3 polygons and 9 points with color_rgba column computed with matplotlib.colors.to_rgba function: import contextily as ctx import geop
I would like to import some waypoints/markers from a geojson file. Then determine the centroid of all of the points. My code calculates the centroid of each poi
GeoPandas Installing When I am installing GeoPandas they show me a error in Anaconda prompt several times. They indicated me Failed with initial frozen solve of
I have a GeoPandas dataframe with a.o. polygons as 'geometry' column and a corresponding value in a different column. E.g. like such: import numpy as np import
I have polygons inside another bigger single polygon and I want to be able to replace the ID values (for example) of the former polygon to that of the latter. S
I'm working with datasets where latitudes and longitudes are sometimes mislabeled and I need to flip the longitudes and the latitudes. The best solution I could
all code: def rgb2hex(r,g,b): return '#{:02x}{:02x}{:02x}'.format(r,g,b) def rg(num): num = int(np.round((num / 100) * 124)) r = (124 - num) g
I’m trying to find the length of the linestring between the starting point of the linestring and the point which are used to find the nearest distance to
I am attempting to plot choropleth map using dash and mapbox. At runtime, I am getting an error "TypeError: Object of type Polygon is not JSON serializable". sa
When doing df = gpd.GeoDataFrame(df1, crs = 'EPSG:4326', geometry = geopandas.points_from_xy(df1.longitude,df1.latitude)) I get "name 'pygeos' is not defined",
I've plotted a GeoDataFrame as a choropleth using the following code (geopandas 0.2.1, matplotlib 2.0.2, in a Jupyter notebook, using %inline: fig, ax = plt.su
I am rerunning the code in https://www.kaggle.com/skalskip/using-regression-to-predicting-earnings-in-france under Python 3.6, and in the plotting stage I ran t
I am trying plot the intersection between a buffer circle and the mesh blocks (or boundaries) within that circle of some radius (in this case, 80 km). I got the
I am trying plot the intersection between a buffer circle and the mesh blocks (or boundaries) within that circle of some radius (in this case, 80 km). I got the
I'm currently using this code to convert a raster file to a geodataframe: import rasterio from rasterio.features import shapes mask = None with rasterio.open
Hello I am trying to convert a list of X and Y coordinates to lines. I want to mapped this data by groupby the IDs and also by time. My code executes successful
I'm trying to overlay some cities on top of a map. import pandas as pd import geopandas as gdp import matplotlib.pyplot as plt from shapely.geometry import box
ERROR: TypeError: 'LineString' object is not iterable I am trying to find the bottom right corner of the Polygon in this .shp file. This .shp file is a square
I have opened a netcdf file in python using xarray, and the dataset summary looks like this. Dimensions: (latitude: 721, longitude: 1440, time: 41) Coordinat