Skip to content

Small changes to reflect differences in API output and remove old references to min flow from max flow date polarscatter charts#181

Open
cstephen wants to merge 3 commits intomainfrom
reflect_api_changes
Open

Small changes to reflect differences in API output and remove old references to min flow from max flow date polarscatter charts#181
cstephen wants to merge 3 commits intomainfrom
reflect_api_changes

Conversation

@cstephen
Copy link
Copy Markdown
Contributor

@cstephen cstephen commented Apr 21, 2026

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:

  • Remove min flow references from MinMaxFlowDates.vue and rename it to MaxFlowDates.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.
  • Updates the StatsTable.vue to reference specific scenarios. Previously, the "extremes" mode of the stats tables were showing the min/max values across all scenarios (including rcp60) 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):

cd data-api
git checkout hydroviz_webapp_endpoint
git pull --ff-only
micromamba activate api-env
export FLASK_APP=application.py
flask run
cd hydroviz/webapp
git checkout reflect_api_changes
nvm use lts/jod
export SNAP_API_URL=http://localhost:5000
npm run dev

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_dates usage with max_flow_dates throughout 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.vue to pull median values from explicit scenarios (rcp60 for mid; rcp45/rcp85 for 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.

Comment thread webapp/components/StatsTable.vue
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.

2 participants