Skip to content

Add Scottish Water support to downstream impact pipeline and data docs#42

Merged
AlexLipp merged 5 commits into
mainfrom
copilot/add-scottish-water-capabilities
Apr 23, 2026
Merged

Add Scottish Water support to downstream impact pipeline and data docs#42
AlexLipp merged 5 commits into
mainfrom
copilot/add-scottish-water-capabilities

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

This PR adds Scottish Water to the downstream impact workflow using the new poopy.companies.ScottishWater integration and updates public documentation to include Scottish outputs and source attribution. It keeps Thames historical handling unchanged (Scottish data is current-only).

  • Downstream processing: wire in Scottish Water

    • Added ScottishWater import to update_downstream.py
    • Added scottish to the company processing list
    • Added class instantiation mapping for scottish -> ScottishWater()
    • This enables publishing to the expected downstream_impact/scottish/ path with existing filename conventions
  • README: expand published datasets

    • Added a Scottish Water row to the Water Company Data Table with current/48hr/info/timestamp links under downstream_impact/scottish/
    • Updated scope language to include Scotland in the project summary
  • README: source attribution

    • Added the Scottish Water overflow API link in the Source Data section:
      • https://www.scottishwater.co.uk/Help-and-Resources/Open-Data/Overflow-Map-Data

Example integration change:

from poopy.companies import ScottishWater

watercompanies = [
    # ...
    "scottish",
]

# ...
elif company == "scottish":
    watercompany_info[company]["WaterCompany"] = ScottishWater()

Copilot AI linked an issue Apr 23, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits April 23, 2026 15:01
Agent-Logs-Url: https://github.com/AlexLipp/sewage-map/sessions/7238a0fa-845b-4a71-a7d1-5baadfa8291f

Co-authored-by: AlexLipp <10188895+AlexLipp@users.noreply.github.com>
Copilot AI changed the title [WIP] Add functionality for Scottish Water API and dataset Add Scottish Water support to downstream impact pipeline and data docs Apr 23, 2026
Copilot AI requested a review from AlexLipp April 23, 2026 15:05
@AlexLipp
Copy link
Copy Markdown
Owner

@copilot Just noticed that Thames Water is not referenced as a data source in the readme (https://data.thameswater.co.uk/s/). They maintain their own API like Scottish Water. Can you fix this please?

Agent-Logs-Url: https://github.com/AlexLipp/sewage-map/sessions/d21fb122-fcc5-4c20-9a9c-fcd1dbc05b50

Co-authored-by: AlexLipp <10188895+AlexLipp@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 23, 2026

@copilot Just noticed that Thames Water is not referenced as a data source in the readme (https://data.thameswater.co.uk/s/). They maintain their own API like Scottish Water. Can you fix this please?

Done in commit 97a2fcf: added an explicit Thames Water API source reference in the README Source data section (https://data.thameswater.co.uk/s/).

@AlexLipp AlexLipp marked this pull request as ready for review April 23, 2026 16:13
Copilot AI review requested due to automatic review settings April 23, 2026 16:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Scottish Water to the downstream impact publishing workflow and updates README dataset links/source attribution to include Scottish outputs.

Changes:

  • Wired scottish into update_downstream.py (company list + ScottishWater() instantiation).
  • Expanded README scope statement to include Scotland and added Scottish Water output links.
  • Updated README source attribution to include the Scottish Water overflow open data link.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
update_downstream.py Adds Scottish Water to downstream processing and output publishing under downstream_impact/scottish/.
README.md Documents Scottish Water outputs/links and updates scope + source attribution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread update_downstream.py
Comment on lines 16 to 20
from poopy.companies import (
AnglianWater,
NorthumbrianWater,
ScottishWater,
SevernTrentWater,
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update_downstream.py imports ScottishWater from the external poopy package, but this repo doesn't appear to pin/document a minimum POOPy version. This can cause the cron job to fail at import time on environments still running an older POOPy. Consider adding explicit dependency/version pinning (requirements/pyproject) or at least documenting the required POOPy version and failing with a clearer message if the import isn't available.

Copilot uses AI. Check for mistakes.
Comment thread README.md


Realtime mapping the downstream impact of Combined Sewage Overflow discharge events in non-tidal rivers across England <!--and Wales-->. This repository provides the back-end for [`www.sewagemap.co.uk`](https://www.sewagemap.co.uk/). The repository for the front-end is available at [`github.com/JonnyDawe/UK-Sewage-Map/`](https://github.com/JonnyDawe/UK-Sewage-Map/).
Realtime mapping the downstream impact of Combined Sewage Overflow discharge events in non-tidal rivers across England and Scotland <!--and Wales-->. This repository provides the back-end for [`www.sewagemap.co.uk`](https://www.sewagemap.co.uk/). The repository for the front-end is available at [`github.com/JonnyDawe/UK-Sewage-Map/`](https://github.com/JonnyDawe/UK-Sewage-Map/).
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence updates the scope to "England and Scotland", but the README title/subtitle at the top still says the project maps discharges across England (and has a commented Wales note). Consider updating the earlier line(s) too so the README scope is consistent throughout.

Copilot uses AI. Check for mistakes.
Comment thread README.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AlexLipp
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

@AlexLipp
Copy link
Copy Markdown
Owner

Approve

@AlexLipp AlexLipp merged commit d5b32d9 into main Apr 23, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Scottish Water capabilites

3 participants