SwimSignal

How the forecast is made

The method in plain words: what a level means, what goes into it, how it was tested, where it fails, and every correction made since September 2026. The live scores are on the Accuracy page; the full technical account is in the project's README.

What a level means

Each day at each spot gets one of four levels: low, moderate, high or very high risk. The level is the worst of these four things:

Risk levelExposure indexE. coli estimateRating and algae
Lowunder 15under 10%
Moderate15 to 4010% to 25%Algae seen at intervals at the last check
High40 to 7025% to 50%Rated poor; or algae enough to be objectionable at the last check
Very high70 or more50% or more

A spot with no monitored overflow upstream gets no exposure index. Its level comes from the rating (excellent or good: low; sufficient: moderate; poor: high) and the algae check, where it has them.

How the forecast is made

Which overflows reach the spot

SwimSignal follows the river network upstream from the spot, up to 60 km along the rivers. The network is Ordnance Survey's OS Open Rivers: 193,040 stretches of river, each with a direction of flow, including the lines that run through lakes. A listed spot sits on the nearest stretch that carries its river's name. Each storm overflow is placed on the stretch nearest its outfall, within 1.5 km. An overflow whose water reaches the spot counts; one on another branch does not.

How likely each overflow is to spill

For each overflow and day, a model gives the chance of a discharge. It uses the rain at the overflow that day and the two days before, the totals over 3, 7 and 30 days, how wet the ground already is, the heaviest rain in 1, 3 and 6 hours, the time of year, and how often that overflow spilled the year before (from the Environment Agency's annual returns). More rain can never lower the chance. The model was trained on United Utilities' overflows in 2023 and 2024, because only United Utilities publishes its past spills one by one, with their start and end. For those overflows the forecast is also moved towards each one's own record.

The rain is Open-Meteo's forecast, which for England is the Met Office's. Forecast rain has errors that grow with each day ahead, so each day ahead gets its own correction, fitted on 2025.

How much of a spill arrives

Sewage from an overflow takes time to travel down the river: SwimSignal assumes 0.5 m a second on rivers and 0.05 m a second across a lake. On the way, bacteria die off: 90% in 30 hours. And the river dilutes it: an overflow on a small stream counts for less at a big river than one on the river itself. Dilution is measured by how much river lies upstream of each point, a stand-in for flow. On a lake it is cut further by the lake's area. The result is a weight for each overflow. The exposure index combines them: one minus the chance that no overflow's spill arrives.

Right now

An overflow discharging now, by its water company's live feed, counts in full. One that stopped within the last 48 hours counts for less as time passes.

The E. coli estimate

A statistical model fitted to 1,548 Environment Agency samples at 32 inland bathing waters from 2024 to 2026. It uses the rain at the spot in the 48 and 24 hours before midday, the day's exposure index, whether the spot is a lake or a river, and the time of year. Rain explains most of what it gets right. The exposure index adds a little on rivers, and nothing on lakes.

Test 1: a year the model never saw

The spill model was trained on United Utilities' overflows in 2023 and 2024 and tested on 2025: 826,725 overflow-days, 7.45% of them with a discharge. Rain from reanalysis (ERA5-Land, a reconstruction of the weather as it was), so this leaves out weather-forecast error.

ForecastBrier scoreAUCSkill
SwimSignal (the model, with each overflow's own record)0.04450.9300.33
The model alone0.04520.9270.33
Each overflow's long-run spill rate (climatology)0.06690.7680.00
A rule: more than 10 mm of rain in 48 hours0.06210.7580.07

The Brier score is the mean squared difference between a probability and what happened (1 or 0): lower is better, 0 is perfect. AUC is how often a spill day is ranked above a dry day: 0.5 is chance, 1 is perfect. Skill is how far below climatology's Brier score a forecast gets: 0 is no better, 1 is perfect. From data/processed/verification_2025.csv.

Test 2: with real weather forecasts

The same year again, with the rain forecast as it was issued, up to four days ahead. Each day ahead's correction was fitted on this same year, which flatters it, so this table scores the odd months with a correction fitted on the even months, and the reverse.

Rain usedBrier scoreAUCSkill
Reanalysis (the weather as it was)0.04470.9290.33
Forecast, same day0.04290.9320.36
Forecast, 1 day ahead0.04680.9100.30
Forecast, 2 days ahead0.04800.9100.28
Forecast, 3 days ahead0.05010.8980.25
Forecast, 4 days ahead0.05280.8890.21

Skill falls with each day ahead, but four days out the forecast still scores better than the 10 mm rain rule does with the rain as it fell (0.0621). The same-day forecast beats reanalysis, probably because the forecast model's grid is finer. From data/processed/verification_leads_2025.csv, the cross-fitted rows.

Test 3: against measured E. coli

The E. coli estimate, tested on Environment Agency samples at 32 inland bathing waters, 2024 to 2026, in three ways: each year predicted by a model fitted on the other years; each site by a model that never saw it; and 2025–26 by a model fitted on 2024 alone. The competitor that matters is rain alone: the question is whether the overflows add anything a rain gauge would not.

TestForecastBrier scoreAUCAUC, riversAUC, lakes
Leave one year outRate for rivers and lakes (climatology)0.1160.620.350.37
Rain only0.0930.800.710.35
The E. coli estimate0.0910.820.750.47
Leave one site outRain only0.0920.790.720.06
The E. coli estimate0.0900.810.760.18
Forward in timeRain only0.0870.790.770.51
The E. coli estimate0.0830.810.810.53

On rivers the estimate scores better than rain alone in every test, by 3% to 7% of the Brier score. That gain is small. When the samples are resampled by calendar week, since one storm hits many sites at once, its 95% interval includes no gain at all. Against rain and the time of year together, which isolates what the overflows add, the gain holds however the samples are resampled. On lakes neither does better than chance, which is why the estimate is not shown for lakes. The exposure index does tell which sites are polluted: averaged over the samples, it ranks the sites' average E. coli with a rank correlation of 0.68, where average rainfall gets −0.25. From data/processed/ecoli_model_eval.json and ecoli_validation_combined.json.

Live scoring

Every forecast the site issues is logged. Once a day has passed, each overflow's forecast for it is scored against what the water company's live feed showed. The forecast scored is the latest one issued by 08:00 on the day it was made: what a swimmer planning the day would have seen. An overflow-day counts as "no spill" only if the feed saw that overflow at least six times that day, with no gap longer than 8 hours, and once the next day; a gap is a missing observation, not a dry day. South West Water's feed carries no times, so its overflows are not scored. Each E. coli estimate is scored against Environment Agency samples taken that day, using the last forecast issued before the sample.

The scores are on the Accuracy page, with every scored overflow-day as a file anyone can download and recompute from. The Accuracy page also sets the E. coli estimate beside the Environment Agency's own daily risk prediction at the inland bathing waters, on the same samples.

Known failures

Corrections

Mistakes found in the method or its tests, newest first. Each was fixed in the code, and the figures on this page and the Accuracy page are from the corrected versions.

The full record of each correction, with the numbers before and after, is in the README and the project's history.