Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nl-hydro-explorer

Interactive exploration of the hydrological state of Waterschap Drents Overijsselse Delta (WDODelta) from public data — weekly, 1995 → now. Built to make lead/lag correlations (e.g. neerslagoverschot → grondwaterstand) visually discoverable.

v1 covers WDODelta only. The eventual vision (comparing all waterschappen) is deliberately deferred — see ISA.md.

What it shows (8 variable groups, weekly)

Group Source (via) Notes
Temperatuur, zonuren, neerslag, Makkink-verdamping, wind KNMI (hydropandas.read_knmi) nearest station to WDODelta centre, 1995→now
Neerslagoverschot derived neerslag − verdamping (mm/week)
Grondwaterstand BRO (raw seriesAsCsv endpoint + hydropandas GLD-id lookup) 11 spread wells + grondwater_mean; daily→weekly
Waterstand + afvoer RWS Waterinfo (ddlpy) Vecht (Dalfsen), IJssel, discharge at Genemuiden + Regge

Principle: real data or no data. Missing observations stay NaN — never interpolated or fabricated. KNMI precip/evap are converted from hydropandas' metres to mm.

Run it

# 1. Fetch / refresh the data (cached under data/cache/ — re-runs are instant)
uv run fetch_data.py            # uses cache
uv run fetch_data.py --refresh  # refetch everything

# 2. Launch the dashboard (NiceGUI + Plotly) at http://localhost:8080
uv run --script ~/.claude/skills/_DATA_DASHBOARD_PYTHON/scripts/build_dashboard.py \
  --port 8080 data/wdodelta_hydrology_weekly.csv

# headless sanity build (no server): add --check ; print detected shape: --inspect

The dashboard: multi-metric line chart, period range slider, level/change/rebase toggle, σ-anomaly slider, correlation explorer (Pearson r over the selected period), cross-metric scatter, auto-findings, Data & Methods panel.

Data file

data/wdodelta_hydrology_weekly.csv — one row per ISO week (datum = week-ending date), one column per variable. 1641 weeks × 22 columns.

⚠️ Interpretation caveats — read before trusting correlations

A hydrologist will flag these immediately; they are interpretation issues, not data bugs:

  1. Correlations are seasonality-inflated. Every weekly hydrology series shares a dominant annual cycle, so raw Pearson r shows "everything correlates with everything" through shared seasonality, not causation. The honest version deseasonalizes (subtract weekly climatology) and offers a lag option (groundwater lags precipitation surplus by weeks–months; zero-lag r understates the real link). This is the obvious next iteration.
  2. neerslagoverschot is potential surplus. It's neerslag − Makkink-referentieverdamping (EV24), not actual ET. It overstates real surplus in dry summers (actual ET < reference once soil dries) and Makkink is only meaningfully valid ~Apr–Sep. Read winter values with care.
  3. grondwater_mean averages absolute m-NAP levels across wells at different ground elevations (Hoogeveen ~+14 m, Zwolle ~0 m — topography, not "high water"). For correlation use the per-well series (or future anomalies), not the raw mean. Groundwater values are m-NAP per BRO standard; quality regimes (beoordeeld/voorlopig) are coalesced.
  4. Spatial mix: KNMI precip and EV24 may come from different nearest stations; the P−ET surplus then blends two locations. Weekly aggregation uses a consistent W-SUN anchor; fluxes summed, states meaned.

Known limitations (v1)

  • WDODelta only — no inter-waterschap comparison yet.
  • Groundwater coverage varies per well — 6 of 11 wells span the full 1995→now; the rest are shorter (real coverage, shown as gaps). gw_Hoogeveen is very short.
  • RWS IJssel km 970 is sparse (decommissioned ~2013); Vecht/Dalfsen water level is the reliable long series.
  • The dashboard's "YoY/change" + anomaly modes assume annual periods (inherited from the generic _DATA_DASHBOARD_PYTHON skill) — on weekly data they compute week-over-week. The line chart, period range, and correlation explorer are period-agnostic and correct. A week-aware variant is a future skill improvement.
  • Charts need a real browser — NiceGUI renders Plotly over a websocket; headless screenshots show the controls but blank charts.

Refreshing wells / stations

Well IDs (GW_WELLS) and RWS stations (RWS_STATIONS) are pinned in fetch_data.py. They were discovered via spread anchor boxes on 2026-06-05; rediscovery (slow, BRO-rate-limited) only needed when changing the region.

About

Interactive exploration of WDODelta's hydrological state (KNMI, BRO, RWS public data) — weekly, 1995→now

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages