Realtime mapping the downstream impact of Combined Sewage Overflow discharge events in non-tidal rivers across England . 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 downstream impact of Combined Sewage Overflow (CSO) discharge events is freely available under a CC-BY-NC-SA license. The links in the table below give access to the data as .geoJSON
files. The data are updated automatically every ~20 minutes (but the URL remains the same). These can be incorporated into your own projects, web-apps, or GIS projects but please attribute the source as www.sewagemap.co.uk
. It'd be wonderful to hear about any projects you use this data in, so please do reach out to me to let me know, or if I can be of any assistance.
The Downstream impacted reaches is a LineString
feature-collection simply showing the sections of a river which are downstream of current discharges, and optionally those in the last 48 hrs. These are the brown lines on www.sewagemap.co.uk
.
The Downstream Impact Information is a Point
feature-collection which details at each pixel in a drainage network 1) the number of discharges upstream, 2) the number of discharges per unit of upstream area, and 3) A list of the names (or permit numbers) of discharging CSOs upstream.
Disclaimer: whilst we make every effort to ensure the accuracy of this data, we cannot guarantee it and it should not be used for any critical purposes.
The live EDM data which we use to map downstream sectons is sourced, in England, from the Stream Storm Overflow Data Hub which is provided under a CC-BY license. Each individual water company maintain's an individual API which you can access from the given link.