Revamp custom endpoint for hydroviz webapp#715
Merged
Conversation
…s, and min/mid/max for table stats.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new CONUS hydrology “hydroviz” API endpoint that aggregates existing stats + modeled climatology outputs into a single response tailored for the hydroviz webapp, including Maurer-adjusted projections and derived chart/table structures.
Changes:
- Replace the prior
.../hydroviz/<stream_id>/<model>route with.../hydroviz/<stream_id>and expand the response payload (hydrograph, monthly flow, max-flow dates, table stats). - Apply Maurer scaling to projected stats/climatology using
Maurer * (GCM projected / GCM historical), plus Julian-day rollover and day-count clamping logic. - Enable CONUS hydrology routes by importing
conus_hydrologyinroutes/__init__.py.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
routes/conus_hydrology.py |
Implements the new hydroviz endpoint and supporting data transforms/aggregation. |
routes/__init__.py |
Exposes CONUS hydrology endpoints by importing the module into the routes blueprint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
0f7b466 to
2dd7dd8
Compare
This was referenced Apr 21, 2026
Contributor
Joshdpaul
approved these changes
Apr 22, 2026
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.
This PR revamps the API endpoint for the hydroviz webapp. It:
conus_hydrology.pyroute to fetch relevant dataTo test, just run this API from this branch and kick the tires a bit on a variety of steam segments using URLs like the following, for example:
http://localhost:5000/conus_hydrology/hydroviz/50101