Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
5153eb0
docs: plan HydroPlot groundwater and validation upgrades
abstractionisms Jun 5, 2026
c7e0e0c
fix: use non-deprecated year-start resampling
abstractionisms Jun 5, 2026
17ca84c
feat: add reusable baseflow method comparison
abstractionisms Jun 5, 2026
caccd73
docs: require reach station pair validation
abstractionisms Jun 5, 2026
795a5bc
docs: refine reach chain user experience
abstractionisms Jun 5, 2026
1ba5601
feat: add hydrologic signature metrics
abstractionisms Jun 5, 2026
8fb2f77
feat: add changepoint and Sen slope trend outputs
abstractionisms Jun 5, 2026
f22eaf7
feat: add reach station chain validation
abstractionisms Jun 5, 2026
c00d889
feat: add reach groundwater gain loss summaries
abstractionisms Jun 5, 2026
441ba71
feat: add reach thermal sensitivity context
abstractionisms Jun 5, 2026
9f3e85a
feat: add flood frequency diagnostics
abstractionisms Jun 5, 2026
7ae9fc4
feat: add validation helpers for case studies
abstractionisms Jun 5, 2026
9e0ec13
docs: add HydroPlot validation case template
abstractionisms Jun 5, 2026
d613102
feat: show baseflow method comparison in dashboard
abstractionisms Jun 5, 2026
786c507
feat: add reach groundwater dashboard summary
abstractionisms Jun 5, 2026
1eb25da
feat: show frequency diagnostics in dashboard
abstractionisms Jun 5, 2026
d5e6700
feat: show reach chain order in dashboard
abstractionisms Jun 5, 2026
eaeecaf
feat: generate baseflow case outputs
abstractionisms Jun 5, 2026
a3669d4
docs: add PNW validation case configs
abstractionisms Jun 5, 2026
0ce2fa6
feat: guide reach gauge selection
abstractionisms Jun 5, 2026
fff64e5
feat: streamline reach candidate selection
abstractionisms Jun 5, 2026
4ccc81a
fix: stabilize reach gage selection state
abstractionisms Jun 5, 2026
e90e340
feat: improve reach map and length defaults
abstractionisms Jun 5, 2026
5e0c2a2
fix: collapse reach workflow sections
abstractionisms Jun 5, 2026
4f62372
feat: validate reproducible case studies
abstractionisms Jun 5, 2026
0f39f4d
fix: zoom reach map to selected reach
abstractionisms Jun 5, 2026
af03e8b
fix: simplify reach analysis workflow
abstractionisms Jun 5, 2026
9beb25d
fix: focus reach map and summarize analysis
abstractionisms Jun 5, 2026
e0f48a7
fix: make SPI precipitation fetch explicit
abstractionisms Jun 6, 2026
b5d90e9
fix: filter reach candidates and reset map zoom
abstractionisms Jun 6, 2026
9eeebea
fix: improve frequency chart readability
abstractionisms Jun 6, 2026
298320b
fix: restore NWM overlay plot data
abstractionisms Jun 6, 2026
023817a
fix: avoid reach selector state warning
abstractionisms Jun 6, 2026
aca2080
refactor: align reach screening terminology
abstractionisms Jun 6, 2026
a28a595
docs: specify reach analysis redesign
abstractionisms Jun 6, 2026
2ee1aa5
docs: plan reach analysis redesign
abstractionisms Jun 6, 2026
0247a58
feat: recommend processable reach pairs
abstractionisms Jun 6, 2026
2a39c35
fix: keep selected reach pair stable
abstractionisms Jun 6, 2026
01a0df6
fix: force reach map to selected gage bounds
abstractionisms Jun 6, 2026
5f64802
feat: center reach analysis on map workflow
abstractionisms Jun 6, 2026
355d42a
fix: clip reach highlight between gages
abstractionisms Jun 6, 2026
186eb04
fix: make reach candidates easier to cycle
abstractionisms Jun 6, 2026
3e25c59
feat: coalesce primary dashboard navigation
abstractionisms Jun 7, 2026
d029062
feat: fold indicators into site analysis
abstractionisms Jun 7, 2026
b72e0a7
feat: fold current conditions into stations
abstractionisms Jun 7, 2026
ef93cc9
fix: centralize climate data loading
abstractionisms Jun 7, 2026
b0031c5
fix: separate indicator button state
abstractionisms Jun 7, 2026
2460d91
fix: trace selected reach across flowline network
abstractionisms Jun 7, 2026
186d588
docs: document dashboard architecture boundaries
abstractionisms Jun 7, 2026
8503e35
fix: standardize gage terminology
abstractionisms Jun 8, 2026
023e5ba
feat: add groundwater data helpers
abstractionisms Jun 8, 2026
d27b0e5
style(frontend): add premium fluid animations, card lifts, hover poli…
abstractionisms Jun 12, 2026
effdbdd
style(frontend): amplify motion for visibility - longer durations, st…
abstractionisms Jun 12, 2026
9e5b3b9
style: amp up primary button with shimmer sweep + faster pulse + stro…
abstractionisms Jun 12, 2026
e67d701
fix: HydroPlot shell polish and more reliable SPI climate resolution
abstractionisms Jul 10, 2026
deef605
fix: data-driven y-axis for interactive FDC and hydrograph
abstractionisms Jul 11, 2026
0784c69
fix: seasonal rating-curve plot and offset power-law fit selection
abstractionisms Jul 11, 2026
123af5f
fix: robust climate via Open-Meteo and multi-station Meteostat
abstractionisms Jul 11, 2026
0dc6b4d
feat: automated text analysis after plot generation
abstractionisms Jul 11, 2026
203d4e8
feat: metric relevance for summary cards and plot analysis
abstractionisms Jul 11, 2026
55f9d0f
feat: dynamic metric relevance from site hydrology
abstractionisms Jul 11, 2026
383446e
feat: interactive stage-discharge rating workshop
abstractionisms Jul 11, 2026
ab36435
feat: tile hover help and move duration stats by FDC
abstractionisms Jul 11, 2026
253300d
fix: mobile layout and touch-friendly tile tips
abstractionisms Jul 11, 2026
cfe7722
merge: resolve main conflicts keeping robust climate stack
abstractionisms Jul 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# HydroPlot Architecture Notes

HydroPlot is organized around five user-facing workflows. New features should land in the workflow where the user decision happens, not in a catch-all tools page.

## Workflows

- **Stations** (`overview`): find a stream gage, inspect station map context, live/current condition checks, and record coverage.
- **Site Analysis** (`single-analysis`): one selected gage, hydrographs, duration curves, exports, drought indicators, SPI, and baseflow proxy views.
- **Compare Sites** (`comparisons`): multi-gage overlays, period comparisons, and site relationship analysis.
- **Reach Analysis** (`reach-analysis`): selected upstream/downstream gage pairs, NHD reach map, gain/loss screening, reach plots, baseflow waterfall, and future groundwater observation support.
- **Watershed** (`watershed`): broader basin, HUC, land-cover, dam, flowline, and future well/log context.

## Groundwater Source Rules

Groundwater support should be implemented as public-source tiers with explicit eligibility.

1. **USGS groundwater field measurements**
- Public monitoring data.
- Eligible for time-series screening when enough records exist.
- First implementation target.

2. **Washington Ecology EIM groundwater data**
- Public Ecology/partner monitoring data when accessed through published search/download/API paths.
- Eligible only after schema and public access are verified.

3. **Washington Ecology well logs / well reports**
- Public context data, but locations and private-well details can be sensitive or approximate.
- Context only unless a record is clearly a monitoring time series with usable public measurements.
- Do not expose owner, address, parcel, phone/email, or other private fields.

## Groundwater UI Placement

- Primary: **Reach Analysis**
- Button-driven "Find public groundwater data" for the selected reach.
- Show monitoring wells separately from context-only well logs.
- Map markers must identify source and eligibility.
- Trend/correlation summaries only for eligible monitoring time series.

- Secondary: **Watershed**
- Basin-scale well/log inventory context.
- No reach-level interpretation.

- Later/optional: **Site Analysis**
- Single-gage nearby groundwater context if it supports an actual user workflow.

## Data And Performance Rules

- Do not fetch groundwater data automatically on every Streamlit rerun.
- Cache public-data calls by source, reach bounds, dates, and buffer distance.
- Normalize provider output into a safe schema before UI rendering.
- Drop private fields at the data boundary.
- Label approximate locations and context-only sources in the UI.
- Avoid claiming calibrated groundwater modeling; use "screening", "proxy", and "observation support".

## Verification Pattern

Each new data source needs:

- Unit tests for normalization.
- Eligibility tests that prevent context-only records from being analyzed.
- Fixture/mocked tests for missing values, sparse time series, and private-field removal.
- One validation case in `docs/cases/` once the workflow produces a useful output.

35 changes: 35 additions & 0 deletions docs/cases/_template/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
case: <slug>
title: "<one-line case title>"
hydroplot_version: "<version or commit>"
showcases:
- <analysis_feature>
data_source: "<dataset, URL, and access date>"
runtime_minutes: 0
created: YYYY-MM-DD
---

# <Title>

## Scenario

Describe the PNW hydrology question, the reach or gage, and why it matters.

## What This Proves About HydroPlot

- `<feature>`: describe the reusable HydroPlot analysis behavior being validated.

## How To Run

```powershell
python scripts/run_case_study.py docs/cases/<case>/case.yml
```

## Outputs

- `outputs/<file>.csv`: describe table.
- `outputs/<file>.png`: describe figure.

## Validation

List the published report, agency method, or expected range used for PASS/FLAG checks.
8 changes: 8 additions & 0 deletions docs/cases/_template/case.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
case: template
site_ids: []
start_date: "2000-01-01"
end_date: "2025-01-01"
analyses:
- baseflow
- signatures
validation: []
28 changes: 28 additions & 0 deletions docs/cases/pnw_baseflow_signatures/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# PNW Baseflow And Hydrologic Signatures

## Scenario

This case validates HydroPlot's baseflow and hydrologic signature workflow on a Pacific Northwest daily streamflow record. It focuses on method agreement, plausible BFI range, flow-duration behavior, and flashiness.

## What This Proves About HydroPlot

- `lyne_hollick_filter`: bounded multi-pass recursive filter.
- `eckhardt_filter`: independent two-parameter filter.
- `compute_hydrologic_signatures`: compact basin-behavior summary.
- `validate_range`: explicit PASS/FLAG result instead of informal notebook checks.

## How To Run

```powershell
python -m scripts docs/cases/pnw_baseflow_signatures/case.yml
```

## Outputs

- `outputs/baseflow_components.csv`
- `outputs/signatures.csv`
- `outputs/validation_summary.csv`

## Validation

BFI and flashiness are screened against method-comparison ranges. These checks are not a substitute for a basin-specific groundwater study.
12 changes: 12 additions & 0 deletions docs/cases/pnw_baseflow_signatures/case.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
case: pnw_baseflow_signatures
site_ids:
- "12422500"
start_date: "2000-01-01"
end_date: "2025-01-01"
analyses:
- baseflow
- signatures
validation:
- metric: baseflow_index_lh
lower: 0.20
upper: 0.95
28 changes: 28 additions & 0 deletions docs/cases/spokane_reach_gain_loss/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Spokane Reach Gain/Loss Screening

## Scenario

This case validates HydroPlot's reach-scale gain/loss screening on a Spokane River reach where upstream/downstream discharge differences are important for dry-season interpretation.

## What This Proves About HydroPlot

- `build_reach_chain`: selected gages can be represented in upstream-to-downstream order.
- `derive_adjacent_reaches`: a river continuum can be assessed reach-by-reach.
- `summarize_reach_gain_loss`: paired upstream/downstream gain-loss calculation.
- Low-flow median gain/loss: dry-window reach gain/loss signal.
- `classify_thermal_sensitivity`: screening context for shade, low flow, and losing/gaining reach conditions.

## How To Run

```powershell
python -m scripts docs/cases/spokane_reach_gain_loss/case.yml
```

## Outputs

- `outputs/reach_gain_loss.csv`
- `outputs/validation_summary.csv`

## Validation

This is a screening workflow. It does not claim to replace seepage runs, groundwater modeling, TTools, Shade, Heat Source, QUAL2K, or QUAL2Kw.
11 changes: 11 additions & 0 deletions docs/cases/spokane_reach_gain_loss/case.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
case: spokane_reach_gain_loss
site_ids:
upstream: "12422500"
downstream: "12424000"
start_date: "2015-07-01"
end_date: "2015-09-30"
reach_km: 20
analyses:
- reach_gain_loss
- thermal_context
validation: []
Loading
Loading