This repository contains a Jupyter notebook that demonstrates some of the GIS-like functionality of the GeoPandas Python library. It uses data from the British Geological Survey's earthquake catalogue and the public domain Natural Earth project to calculate the towns in the UK that feel the most earthquakes.
Follow the instructions below to install and run the demonstration on your own machine. Alternatively, you can view the code and results in your browser. Click here for mobile-friendly version rendered by Jupyter nbviewer.
- Python 3
- A Python 3 package manager e.g. pip3, conda
libspatialindex(Required for spatial joins.
apt install libspatialindex-c4v5on Debian/Ubuntu)
Via package manager
The following packages should be installed via
pip3 install geopandas jupyter rtree
Alternatively, dependencies can be install via Pipenv.
Pipenv is a package and virtual environment manager for Python. Virtual environments allow you to install Python packages without interfering with your system installation or other projects.
Pipenv reads the dependency information from the
Pipfile. A virtual
environment with the dependencies installed can be created and started as
pipenv create pipenv install pipenv shell
The shell session can be ended with
Starting the notebook
The demo runs in a Jupyter notebook. Start the notebook with:
A browser window will open at http://localhost:8888 with a list of available notebooks.