Skip to content

Remove unused stats table data from CONUS and Alaska hydroviz endpoints - #734

Merged
brucecrevensten merged 2 commits into
mainfrom
unused_hydroviz_data
Jul 20, 2026
Merged

Remove unused stats table data from CONUS and Alaska hydroviz endpoints#734
brucecrevensten merged 2 commits into
mainfrom
unused_hydroviz_data

Conversation

@cstephen

@cstephen cstephen commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Closes #733

Before this PR, min/median/max values were included for every scenario in the CONUS and Alaska stats table data. We ended up using only the median values across the board in the hydroviz webapp. So, this PR removes all min & max data to reduce unnecessary computation and make the data response a bit smaller.

To test, run the hydroviz webapp against this unused_hydroviz_data Data API branch and verify that CONUS and Alaska stats tables are still populating without errors.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces aggregation computations and response payload size for hydroviz “stats table” outputs by emitting only the single aggregation statistic actually used by the hydroviz UI (per scenario), rather than always computing min/median/max.

Changes:

  • CONUS hydroviz: compute and return only one aggregation statistic per scenario (rcp45→min, rcp60→median, rcp85→max).
  • Arctic hydroviz: remove min/max from projected stats tables (including water temperature stats), leaving only median.

Reviewed changes

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

File Description
routes/conus_hydrology.py Updates projected CONUS table stats to compute/return a single per-scenario aggregation value.
routes/arctic_hydrology.py Removes min/max from Arctic projected stats tables (regular + water temperature), returning only median.

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

Comment thread routes/conus_hydrology.py
Comment thread routes/arctic_hydrology.py
Comment thread routes/arctic_hydrology.py
@cstephen cstephen changed the title Remove unused aggregation statistics from CONUS hydroviz endpoint Remove unused stats table data from CONUS and Alaska hydroviz endpoints Jul 20, 2026
@cstephen
cstephen requested a review from brucecrevensten July 20, 2026 20:06
@brucecrevensten
brucecrevensten merged commit 8951416 into main Jul 20, 2026
1 check failed
@brucecrevensten
brucecrevensten deleted the unused_hydroviz_data branch July 20, 2026 21:04
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.

Remove unsued min/max values from hydroviz webapp endpoint

3 participants