Round doy min/mean/max numbers less aggressively to fix strange webapp hydrographs#706
Open
Round doy min/mean/max numbers less aggressively to fix strange webapp hydrographs#706
Conversation
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 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
mainbranch, pointed at theless_zealous_roundingbranch 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.