Realtime mapping the downstream impact of Combined Sewage Overflow discharge events in the Thames basin. This repository provides the back-end for www.sewagemap.co.uk
. The repository for the front-end is available at github.com/JonnyDawe/UK-Sewage-Map/
.
This was developed by Alex Lipp, Jonny Dawe and Sudhir Balaji. Please feel free to raise an issue above or contact us directly.
This script uses the POOPy
package which allows easily interaction with Water Company EDM APIs, and analysis of the data. This is available at: github.com/AlexLipp/POOPy
.
To access the data stored in the Thames Water API you will need to register for the API here. The script expects the API keys to be stored as environment variables (details given in the script).
The core script is update.py
which is called automatically every 15 minutes. This function calculates a geoJSON file which contains the downstream impact of all active or recently active CSO in the Thames Basin. Additionally, it creates a JSON file which contains the history of all discharges for all monitors. These are automatically uploaded to the AWS bucket which hosts them. These are then read by the www.sewagemap.co.uk
front-end which visualises them.