Skip to content

Demonstration of GeoPandas for doing GIS in Python, using UK earthquake catalogue as an example.

License

Notifications You must be signed in to change notification settings

BritishGeologicalSurvey/geopandas-demo

Repository files navigation

GeoPandas Demo

DOI

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.

Prerequisites

  • Python 3
  • A Python 3 package manager e.g. pip3, conda
  • libspatialindex (Required for spatial joins. apt install libspatialindex-c4v5 on Debian/Ubuntu)

Installing dependencies

The following packages should be installed via pip3 or conda:

pip3 install -r requirements.txt

For developers

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

Starting the notebook

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.

About

Demonstration of GeoPandas for doing GIS in Python, using UK earthquake catalogue as an example.

Resources

License

Stars

Watchers

Forks

Packages

No packages published