Realtime mapping the downstream impact of Combined Sewage Overflow discharge events in non-tidal rivers across England and Scotland . 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 relies on the POOPy package which I (Alex) have created to allow easy interaction with Water Company Event Duration Monitoring (EDM) APIs, and analysis of the data. This is freely available at: github.com/AlexLipp/POOPy.
The core script is update_all.py which is called automatically every 15 minutes. This function, using POOPy functions, calculates a geoJSON file which contains the downstream impact of all active or recently active CSO spills for which EDM data is available. These are automatically uploaded to the Amazon Web Services bucket which hosts them. The data is then fronted using the CloudFront delivery service. The files are read by the www.sewagemap.co.uk front-end which visualises them.
The script update.py is included for legacy purposes, and updates only Thames Water data (but is needed for the historical data provided only by Thames).
The live EDM data used to map downstream sections is sourced as follows:
- In England, from the Stream Storm Overflow Data Hub, which is provided under a CC-BY license.
- For Thames Water, from the Thames Water API.
- In Scotland, from the Scottish Water API.
