Skip to content

Implement hydroviz webapp-specific endpoint based on new water temperature endpoints - #729

Merged
BobTorgerson merged 1 commit into
mainfrom
wt_hydroviz_endpoint
Jul 1, 2026
Merged

Implement hydroviz webapp-specific endpoint based on new water temperature endpoints#729
BobTorgerson merged 1 commit into
mainfrom
wt_hydroviz_endpoint

Conversation

@cstephen

@cstephen cstephen commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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:

  • max_temp_dates
  • monthly_temperature
  • wt_hydrograph
  • wt_stats

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:

  • temperature hydrograph
  • monthly temperature chart
  • max temperature & date chart
  • a few new temperature-based stats tables.

To test, point the wt_charts_and_table branch of the hydroviz webapp (ua-snap/hydroviz#228) against this wt_hydroviz_endpoint branch of the Data API and verify that the new charts/tables listed above show up for Alaska (and Canadian) stream segments.

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 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_temperature and max_temp_dates based on the new wt endpoints’ data structures.
  • Backfills PGW model availability for water temperature similarly to the existing streamflow pattern by fetching original_gcm and merging.

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

Comment thread routes/arctic_hydrology.py
Comment thread routes/arctic_hydrology.py
@cstephen
cstephen requested a review from BobTorgerson June 29, 2026 23:11

@BobTorgerson BobTorgerson 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.

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!

@BobTorgerson
BobTorgerson merged commit 6419c49 into main Jul 1, 2026
2 checks passed
@BobTorgerson
BobTorgerson deleted the wt_hydroviz_endpoint branch July 1, 2026 19:47
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.

Incorporate stream temp into arctic_hydrology/hydroviz endpoint

3 participants