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-c4v5
on Debian/Ubuntu)
The following packages should be installed via pip3
or conda
:
pip3 install -r requirements.txt
To test that the notebook runs to completion, extra packages are required:
pip3 install -r requirements-dev.txt
Run the test with:
pytest --nbval-lax GeoPandas_demo.ipynb
The demo runs in a Jupyter notebook. Start the notebook with:
jupyter notebook
A browser window will open at http://localhost:8888 with a list of available notebooks.