Skip to content
Advertisement

Tag: geopandas

Read shapefile from HDFS with geopandas

I have a shapefile on my HDFS and I would like to import it in my Jupyter Notebook with geopandas (version 0.8.1). I tried the standard read_file() method but it does not recognize the HDFS directory; instead I believe it searches in my local directory, as I made a test with the local directory and reads the shapefile correctly. This

How to restrict a geopandas plot by coordinates?

I created a simple geopandas map using a shape file from OpenStreetMap (link). Out: How can I restrict the plot to only a certain portion of the image, essentially zooming in on a certain location. Can I do this by specifying the extent of the portion of the map which I’d like to plot in latitude and longitude? Answer The

format/round numerical legend label in GeoPandas

I’m looking for a way to format/round the numerical legend labels in those maps produced by .plot() function in GeoPandas. For example: This gives me a legend with many decimal places: I want the legend label to be integers. Answer As I recently encountered the same issue, and a solution does not appear to be readily available on Stack Overflow

Update patch edge colours in Geopandas plot

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: Which gives me a map with edges around the polygons: I’d like to remove these. So far, I’ve tried cycling through the patches, setting the edge colours to the face colours: But it has no effect, even if I

Advertisement