Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Hydroviz webapp to align with the latest Data API response shape by removing “min flow” support from the flow-date visualization and adjusting stats table lookups to use scenario-specific medians.
Changes:
- Replace
min_max_flow_datesusage withmax_flow_datesthroughout the store + report flow-date chart wiring. - Rename/refactor the polarscatter visualization to show only annual maximum flow dates (
MaxFlowDates.vue) and update its DOM/chart IDs. - Update
StatsTable.vueto pull median values from explicit scenarios (rcp60for mid;rcp45/rcp85for extremes) and fix column headers accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
webapp/stores/streamSegment.ts |
Rename store ref and map API response field to max_flow_dates. |
webapp/components/Viz/MaxFlowDates.vue |
Update the visualization to consume the new max-flow-dates payload and use new chart DOM IDs. |
webapp/components/StatsTable.vue |
Switch projected stats lookups to scenario-specific .median values and update headers. |
webapp/components/Report.vue |
Wire the report to the renamed store field and new <VizMaxFlowDates> component. |
💡 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.
This PR makes a couple small changes to the webapp to work with the latest Data API changes in ua-snap/data-api#715, including:
MinMaxFlowDates.vueand rename it toMaxFlowDates.vue. We had previously experimented with showing min and max flow dates on the same polarscatter charts, and it didn't work out because all min flow markers were clustered/overlapping over the center and not meaningful.StatsTable.vueto reference specific scenarios. Previously, the "extremes" mode of the stats tables were showing the min/max values across all scenarios (includingrcp60) and the column headers were inaccurate. This fixes the data so the column headers and table intro text ("median") are accurate.To test (assuming ua-snap/data-api#715 hasn't been merged yet):
Then look at the max flow date charts and stats tables for a few different streams, eras, and for middle-of-the-road vs. extremes modes.