Populate hydrograph and monthly flow charts based on "mid" or "extremes" mode#124
Draft
Populate hydrograph and monthly flow charts based on "mid" or "extremes" mode#124
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the hydrology report visualizations to respond to the “mid” vs “extremes” toggle, aligning chart outputs with the updated Data API hydroviz response shape.
Changes:
- Update hydroviz API request URL to remove the hard-coded model segment.
- Make Hydrograph use
projected[appContext]to render mid vs extremes data. - Make Monthly Flow render boxplots for extremes and single-point monthly means for mid.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
webapp/stores/streamSegment.ts |
Updates hydroviz endpoint URL format to match the new API structure. |
webapp/components/Viz/MonthlyFlow.vue |
Rebuilds monthly flow chart based on app context (extremes boxplots vs mid scatter). |
webapp/components/Viz/Hydrograph.vue |
Switches projected hydrograph data source based on app context. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
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.
Xref: ua-snap/data-api#709
This PR works with the
aggregate_hydroviz_endpointsbranch of the Data API to make the hydrograph and monthly flow charts react to the mid/extreme toggle in the following ways:Testing is a little tricky since the
StatsTablecode hasn't been updated to work with the new API response structure in this branch, causing the report page to not to load properly. To run this branch, you'll need to comment out all references to theStatsTablecomponent. I.e., comment out every line like this inReport.vueto test: