A Tutorial On geopandas
geopandas
is a Python library that adds extra functionality to pandas
to make it more useful for dealing with geospatial data.
Most of the code examples below assume you have imported geopandas
into the current module with:
Plotting
geopandas
makes it very easy to plot geospatial data onto graphs.
If you want to save the plot, you can import matplotlib.pyplot
and use the standard save_fig()
function:
Common Warnings/Errors
Missing package rtree
You are missing the package rtree
. rtree
can not usually easily be installed with pip
alone because it depends on a number of dependencies that pip
does not manage. It is best to use your systems package manager to install rtree
instead.
No module named descartes
Running pip install geopandas
does not install the dependency descartes
automatically. descartes
is needed when plotting, for example when you call .plot()
. Install with: