Remove unused stats table data from CONUS and Alaska hydroviz endpoints - #734
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_dataData API branch and verify that CONUS and Alaska stats tables are still populating without errors.