fix: export daily minimum depth for NGWMN transducer water levels#721
Merged
Conversation
The legacy NMA_WaterLevelsContinuous_Pressure_Daily values are the shallowest reading of each day (verified min matches 1460/1460 days of raw SO-0252 data; the mean matches none), so exporting the daily mean shifted every published transducer value deeper by ~0.01-0.33 ft. Select depth_to_water_bgs_min from transducer_daily_data instead to keep the NGWMN record consistent with the historically harvested data. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What changed
make_waterlevels_responsenow selectsdepth_to_water_bgs_minfromtransducer_daily_datainstead of the daily mean. Tests updated to assert the min statistic.Why
Compared production vs staging for
/ngwmn/waterlevels/SO-0252: identical dates (1475 records each), but every transducer-day depth on staging was deeper by ~0.01–0.33 ft. The legacyNMA_WaterLevelsContinuous_Pressure_Dailyvalues that production serves are the shallowest reading of each day — verified against rawWaterLevelsContinuous_Pressuredata: daily min matches 1460/1460 days, daily mean matches 0. Exporting the min keeps the NGWMN published record consistent with what the portal has harvested for years.No migration needed — the materialized view already carries
depth_to_water_bgs_min.🤖 Generated with Claude Code