Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
102 views

When pandas.read_excel(), df.to_excel(), geopandas.read_file() and gdf.to_file() are called in a certain order in different environments, pd.read_excel() sometimes causes "Kernel has died" ...
Azrael_DD's user avatar
  • 293
2 votes
1 answer
74 views

I’m working with the Ceremonial County Boundaries of England shapefile available here: https://www.data.gov.uk/dataset/0fb911e4-ca3a-4553-9136-c4fb069546f9/ceremonial-county-boundaries-of-england The ...
Calculus5803's user avatar
-3 votes
0 answers
29 views

I'm new to coding. I'm in VS Code, working with geopandas, leaflet, etc. I'm using the .explore() method to show interactive maps. Sometimes, after I run the .explore() method, the output tells me I ...
George Weiss's user avatar
0 votes
0 answers
40 views

I've seen this issue come up in other pages but none of their solutions worked for me. import plotly.express as px import geopandas as gpd import cartopy.crs as ccrs regions = gpd.read_file("...
thefrollickingnerd's user avatar
1 vote
0 answers
102 views

First time posting so apologies if I miss important info. I keep getting this error but it only happens intermittently so I have had a hard time narrowing down the problem. I have an input of a ...
Richelle's user avatar
-1 votes
1 answer
228 views

I have a dataset of line segments derived from many GPS traces, where users have followed the same roads but their paths aren’t identical (think of thousands of cars driving along a road, each with ...
user26535132's user avatar
2 votes
1 answer
226 views

Here an example of the geojson written using: geopandas.to_file(path/to/example.geojson) { "type": "FeatureCollection", "name": "example", "crs": { &...
beatrice's user avatar
4 votes
2 answers
139 views

I was recently doing some statistics based on openstreetmaps. When I used overpass to export the German Autobahnen and geopandas to calculate their length, I found that the lengths do not match the ...
Mathias Ellpunkt's user avatar
0 votes
2 answers
90 views

I have a geojson file containing the latitude and longitude coordinates of all of the streets and avenues in New York City - they're all formatted as either LineString and MultiLineString as follows: {...
Lance's user avatar
  • 4,830
2 votes
0 answers
48 views

I have a GeoPandas data frame with ‘time’ (datetime with timezone) and ‘geometry’ (geometry) columns that I want to export out to a GPX track file with timestamps for each point. It seems that ....
Steven Buehler's user avatar
2 votes
1 answer
118 views

I have a GeoDataFrame I want to plot. This works fine, however somehow I cannot easily plot its legend. I have tried a number of alternatives and checked solutions from googling and LLM, but I do not ...
Zorglub29's user avatar
  • 9,409
1 vote
1 answer
61 views

I'm making a map on Pyhton and someone recommended that I reporject it to lon=30 for better visuals. But when I do that a random line over Greenland appears. I can't seem to get rid of it. import ...
Nike's user avatar
  • 35
1 vote
0 answers
35 views

I'm trying to pass parameters to sql query to be read with from_postgis function in order to get a geopandas dataframe from a postgis database. from sqlalchemy import create_engine from sqlalchemy ...
JoanS's user avatar
  • 96
0 votes
0 answers
50 views

I'm reading a polygon file using geopandas: import osgeo import geopandas as gpd polygon_path = "F:\\data\\LPJP\\gwl2020_ch\\gwl_2020.shp" polygon = gpd.read_file(polygon_path) print(...
Unryu Shi's user avatar
0 votes
1 answer
87 views

I am using geopandas and want three subplots. But I could not get pass the subplot axis with geopandas. I am using the geopandas 1.0.1 version. Here is my plotting code: df=pd.read_csv('/home/ruby/...
Ruby's user avatar
  • 51
0 votes
0 answers
97 views

I have a GeoDataFrame that I'm plotting in Matplotlib as a choropleth map. gdf.plot(ax = ax, column = 'column to color by', legend = True, legend_kwds={"label": ...
kp42's user avatar
  • 25
0 votes
1 answer
76 views

I have successfully created a filled contour map with UTM data from a numpy array and exported to a shape file, but the shape file only has polygons with no other data. The partial code is: #Convert ...
Rathpr's user avatar
  • 3
1 vote
0 answers
52 views

I am working with geospatial data and attempting to apply machine learning for prediction. Here’s how I read my data: import geopandas as gpd import fiona from fiona.drvsupport import ...
TinaTz's user avatar
  • 321
3 votes
1 answer
183 views

I've a Snowflake table with a GEOGRAPHY datatype (polygons), which I try to convert to e GeoPandas DataFrame. The Snowpark Dataframe holds the SHAPE column as (GeographyType) Calling gpd.GeoDataFrame(...
Raphael Roth's user avatar
  • 27.3k
0 votes
0 answers
50 views

I'm currently working with Sentinel-1 SAR data and need to rasterize a shapefile into the slant range. * To achieve this, I created a GeoTIFF image with two bands (latitude and longitude) using the ...
Lauriane's user avatar
1 vote
1 answer
47 views

I need to plot poly-lines from a geopandas file, where every line has its own color based on same value (see plot). I am using this script for plotting: line = geopandas.read_file(shapefile.shp) ax =...
Sim81's user avatar
  • 1,974
1 vote
0 answers
55 views

The cartopy projection ( 0-1 ) is overlapping with my lat and lon ticks fig, ax = plt.subplots(figsize=(10, 8)) projection = ccrs.PlateCarree() ax = plt.axes(projection=projection, frameon = False) ...
Katherine Jeanette Benison's user avatar
0 votes
0 answers
52 views

when I run nodesA.head(), I can see this object has a multi-dimensional hierarchy of headings. I have tried to flatted it by using drop level and flatten as shown in the commented out lines. How can I ...
unstuck79467's user avatar
2 votes
2 answers
72 views

I've got two geopandas geodataframes. One is a series of points of locations. Locations of bus stops, for example. Let's call it bus_stops I've then got another geodataframe where geometry column is ...
elksie5000's user avatar
  • 7,882
1 vote
1 answer
111 views

Goal I'm working on a project that requires me visualize how far a given budget can reach on a map with different price zones. Example with 3 price zones, water, countryside, and city, each having ...
Hampus Toft's user avatar
-1 votes
1 answer
60 views

I am trying to convert the data shown here into a .csv that contains these following fields The current script I have takes in the .shp using geopandas and outputs it as a csv. However, the normal ...
parzival's user avatar
0 votes
0 answers
176 views

I am using python to work on polygons. I want to find intersection of two polygons and then find the intersection of the intersected polygon with two lines.the intersection of a polygon with a line ...
Karan Mahajan's user avatar
0 votes
1 answer
97 views

Can someone help me understand why my approach for creating a basemap in folium with geopandas is problematic? I have aggregated counts that I want to pass as a popup using folium and geopandas. I ...
Matt's user avatar
  • 55
0 votes
0 answers
29 views

I am trying to visualize a map in databricks. I am creating a geodataframe and converting it to geojson. It looks like this: {"type": "FeatureCollection", "features": [{&...
Steve Scott's user avatar
  • 1,542
1 vote
1 answer
85 views

In my map I have multiple layers. One being points and others being polygons. I want show proper legend (points to show points, polygons to show polygons), whatever way I try I cannot get it to wok. ...
Alan Alves's user avatar
0 votes
0 answers
57 views

I have a pyplot with three .shp polygons as sublots. I would like to change the color of each polygon based on the values from a .csv file of 3 columns and 2 rows (headers and values). I would like ...
Ryan Greathouse's user avatar
0 votes
0 answers
106 views

I'm trying to convert a publicly available data set of counties in Minnesota MN Counties from EPSG:26915 to EPSG:3857 for a project I am working on. I downloaded the shapefile from the link above and ...
user29201503's user avatar
2 votes
1 answer
369 views

I am trying to achieve chunkwise writing of geoparquet files. While writing a parquet file chunkwise via pyarrow.RecordBatch is trivial for pandas chunks and also well documented, doing the same when ...
Sacha Viquerat's user avatar
-1 votes
1 answer
65 views

Edit: Raw files for the years 1996 and 2005 for testing can be found here. I have output from two modelling scenarios in a climate risk model (evergreen and control). I want to find differences ...
Elsri's user avatar
  • 61
1 vote
1 answer
596 views

All, I use ESRI World Countries Generalized shape file, that is available here using GeoPandas shp_file =gpd.read_file('World_Countries/World_Countries_Generalized.shp') print(shp_file.crs) The CRS I ...
Kernel's user avatar
  • 735
0 votes
1 answer
75 views

All, I use regionmask package 0.13.0 to mask climate NetCDF data. I found that if my data extends from -180 to 180, the mask function returns all NAN even after I set wrap_lon=180 and I did not set ...
Kernel's user avatar
  • 735
2 votes
1 answer
210 views

I am having an issue obtaining a linestring from an intersection with a polygon using GeoPandas. The linestring is self-intersecting, which is what is causing my issues. A line intersecting a polygon: ...
Jet-Cadet's user avatar
1 vote
1 answer
180 views

All, I am trying to use the Geopandas dissolve function to aggregate a few countries; the function countries.dissolve keeps running forever. Here is a minimal script. import geopandas as gpd shape='/...
Kernel's user avatar
  • 735
1 vote
1 answer
44 views

I tried to plot Jakarta's map based on the district. fig, ax = plt.subplots(1, figsize=(4.5,10)) jakarta_mandiri_planar.plot(ax=ax, column='Kecamatan', legend=True, legend_kwds={'loc':'center left'}) ...
lokalhangatt's user avatar
0 votes
0 answers
35 views

All, The geojsonio package is not rendering simple JSON files on geojson.io as it should be. I get empty map as shown below Here is the Python code I use to render the geojson file. import geopandas ...
Kernel's user avatar
  • 735
1 vote
1 answer
394 views

All, I got the following error when trying to import states.geojson file as described in this page https://www.twilio.com/en-us/blog/geospatial-analysis-python-geojson-geopandas-html. I think that ...
Kernel's user avatar
  • 735
2 votes
1 answer
72 views

I have code that runs through a GeoJSON file and plots columns from that file one by one to show the user the costs of an optimisation. It ran fine, until it came across a column of just nan values. I ...
SamIAm's user avatar
  • 21
-1 votes
1 answer
138 views

I was trying to plot some points (via geopandas) and discovered adding them gets progressively slower and slower up to the point where each takes a second and more at only few hundreds. This is harly ...
user2333250's user avatar
0 votes
1 answer
89 views

I have a set of longitudes and latitudes for which I need to create an enclosing Polygon. In some cases, these sets of points overlap and creating a Polygon has been giving me a lot of trouble. I have ...
blaufer's user avatar
  • 119
0 votes
0 answers
51 views

I downloaded and set up Rust and Cargo two days ago. I know this is working correctly since I managed to write and run some very basic programs in the two on the terminal. Today I tried to download ...
brinsz's user avatar
  • 1
1 vote
1 answer
156 views

I am new to graph theory and am trying to find the largest subset of x,y coordinate points in which all points in the subset are within a specified distance of one another. I am currently using the nx....
Spencejo's user avatar
0 votes
0 answers
59 views

I am plotting a global choropleth map in Jupyter Notebook displaying each country's share of electricity production from fossil fuels (%). I managed to plot the original shapefile on a map, so I know ...
Della's user avatar
  • 1
1 vote
1 answer
57 views

How do I add light grey state lines, change the background to white, and change certain areas to certain colors? This is from the EPA Level2 ecoregion map. I'd like to color each ecoregion a separate ...
Tanner S Johnson's user avatar
0 votes
1 answer
95 views

I want to modify the text format of the colour bar in my Geopandas plot, to include a $ and a comma thousands separator. I also want to set a minimum lightness so that there is still a hint of blue ...
Vijay Tripathi's user avatar
0 votes
0 answers
54 views

I am fairly new to GeoSpatial coding and coding in general. I have roughly 100 geotiff files of the same region. I'd like to index each stack with the datetime, go pixel by pixel and solve for the max ...
Lynn Kaluzienski's user avatar

1
2 3 4 5
57