Skip to content

Round doy min/mean/max numbers less aggressively to fix strange webapp hydrographs#706

Open
cstephen wants to merge 1 commit intomainfrom
less_zealous_rounding
Open

Round doy min/mean/max numbers less aggressively to fix strange webapp hydrographs#706
cstephen wants to merge 1 commit intomainfrom
less_zealous_rounding

Conversation

@cstephen
Copy link
Contributor

This PR fixes the strange hydrographs in the hydroviz webapp, where min values seemed to flatline at low values. Turns out this is entirely due to the overzealous rounding I'd put in place that seemed like a good idea based on the few example stream segments I was testing with. This change makes the hydrographs look exactly like the ones from our S3 development instance that uses the old API endpoints.

To test, run the hydroviz webapp locally from the current main branch, pointed at the less_zealous_rounding branch of the Data API. Then compare the hydrograph on this page:

http://localhost:3000/conus/18749

With its corresponding hydrograph on this page:

http://hydroviz-dev.s3-website-us-west-2.amazonaws.com/conus/18749

And verify that they look the same. The hydrograph on your local webapp is slightly taller to make more room for vertical margins, but the traces should have the same shape.

Try doing a local vs. S3 comparison for a couple other arbitrary stream segments to make sure they look the same too. I tried four different stream segments at random and they looked good to me.

@cstephen cstephen requested a review from BobTorgerson March 12, 2026 20:24
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.

1 participant