This repository contains examples for using the BGS Sensor Data service.
We have included a Jupyter notebook that demonstrates how to query and plot data from a SensorThingsAPI endpoint using Python. It is posted here to get users started with accessing environmental monitoring data from British Geological Survey sensors.These are published via an OGC SensorThingsAPI-compliant endpoint via the FROST Server software.
We have also included both Leaflet and OpenLayer web map examples:
BGS sensor data are available at https://sensors.bgs.ac.uk.
Follow the instructions below to install and run the demonstration Jupyter Notebook 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.
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 sensor-things-api-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.