From 199b0e348314bfd82a683e11c995ffe99f8f398c Mon Sep 17 00:00:00 2001 From: grabowski Date: Mon, 10 Aug 2026 18:07:57 +0700 Subject: [PATCH] feat: replay shows when the model would have detected and warned The 2024 snapshot now carries a model track: p_warning and predicted 24 h peak from HGB heads trained ONLY on pre-flood data (an honest backtest, cutoff 2024-08-31), plus its calibration sigma. During replay: - the map clock shows the system's state at each moment: 'model: no flood expected' -> 'elevated risk' -> amber 'MODEL ALERT - flooding within 24 h likely (predicted peak X m)' -> red 'FLOODING' once the river actually crosses stage 1. First alert fires 24 Sep 01:00, a full day before the water crossed the flood line on 25 Sep. - the flood-risk outlook stage chips re-render each frame from the historic model prediction (sigmoid over the stage levels), so the whole outlook panel time-travels with the map. --- src/static/dashboard.html | 63 ++++++++++++++++++++++++++++------ src/static/flood-2024-all.json | 2 +- 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/src/static/dashboard.html b/src/static/dashboard.html index b09c9df..de5500b 100644 --- a/src/static/dashboard.html +++ b/src/static/dashboard.html @@ -137,6 +137,10 @@ } .replay-clock strong { display: block; font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; } .replay-clock span { font-size: .78rem; opacity: .85; } + .replay-alert { display: block; margin-top: 5px; font-size: .82rem; font-weight: 800; min-height: 1.1em; } + .replay-alert.note { color: #9fc9e8; } + .replay-alert.warn { color: #f5c542; } + .replay-alert.flood { color: #ff8a7a; } .forecast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; margin-top: 14px; } .forecast-station { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; } .forecast-station strong { font-size: .8rem; } @@ -221,7 +225,7 @@
Loading river conditions…
Map data could not be loaded.
-
+