Implement hydroviz webapp-specific endpoint based on new water temperature endpoints - #729
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the Arctic Hydrology arctic_hydrology/hydroviz/<stream_id> “hydroviz webapp” aggregation endpoint to include modeled water temperature data alongside the existing flow products, so the hydroviz webapp can render new temperature charts/tables from a single request.
Changes:
- Adds water temperature statistics (
wt_stats) and temperature climatology-derived hydrograph (wt_hydrograph) to the hydroviz response. - Adds derived chart payloads for
monthly_temperatureandmax_temp_datesbased on the new wt endpoints’ data structures. - Backfills PGW model availability for water temperature similarly to the existing streamflow pattern by fetching
original_gcmand merging.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
BobTorgerson
approved these changes
Jul 1, 2026
BobTorgerson
left a comment
Contributor
There was a problem hiding this comment.
This returns a lot of additional data for the visualizations, I tested it on a number of different HUC IDs to validate that the data is returning consistently. For the amount of data that is returned, it returns data very quickly. Approved!
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 #725.
This PR adds/aggregates the new water temperature endpoints implemented in #727 to the (hidden) hydroviz-webapp-specific endpoint (e.g., http://localhost:5000/arctic_hydrology/hydroviz/81033944). The following properties have been added to the API response:
These new properties contain all of the data needed to add a few new chart/table components for Alaska stream segments in the hydroviz webapp:
To test, point the
wt_charts_and_tablebranch of the hydroviz webapp (ua-snap/hydroviz#228) against thiswt_hydroviz_endpointbranch of the Data API and verify that the new charts/tables listed above show up for Alaska (and Canadian) stream segments.