When performing Spatial Joins in Google Colaboratory, the out of the box installation of geopandas does not work. Youd to install additional dependencies:
My notebook can be found here
The issue has to with Google Colab using pip instead of conda so dependencies should be strictly pythonic. You can easily fix the issue by following the steps in this guide:
https://github.com/libspatialindex/libspatialindex/wiki/1.-Getting-Started
Maybe we can add these instructions in the docs. Use with Google Colaboratory or installation using pip vs conda.
We can certainly improve the pip installation instructions in general. For example, as said, more clearly mention that you typically need those optional dependencies as well and how to install them (eg rtree is not that easy).
Pull requests welcome!
A simple workaround on rtree installation is to install Gdal and it will take care of it. Here is the notebook with only installing Gdal, geopandas and descartes to work ploting and spatial join.
Geopandas Colab
I recently did a PR to update the installation docs: https://github.com/geopandas/geopandas/pull/926, which now hopefully make it clearer that, if installing with pip, you need to install additional libraries. But feedback certainly welcome!
A simple workaround on rtree installation is to install Gdal and it will take care of it. Here is the notebook with only installing Gdal, geopandas and descartes to work ploting and spatial join.
Geopandas Colab
Thanks a lot! This worked
Most helpful comment
A simple workaround on rtree installation is to install Gdal and it will take care of it. Here is the notebook with only installing Gdal, geopandas and descartes to work ploting and spatial join.
Geopandas Colab