Skip to content

fix: export daily minimum depth for NGWMN transducer water levels#721

Merged
jirhiker merged 1 commit into
stagingfrom
fix/ngwmn-release-filters
Jun 12, 2026
Merged

fix: export daily minimum depth for NGWMN transducer water levels#721
jirhiker merged 1 commit into
stagingfrom
fix/ngwmn-release-filters

Conversation

@jirhiker

Copy link
Copy Markdown
Member

What changed

make_waterlevels_response now selects depth_to_water_bgs_min from transducer_daily_data instead 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 legacy NMA_WaterLevelsContinuous_Pressure_Daily values that production serves are the shallowest reading of each day — verified against raw WaterLevelsContinuous_Pressure data: 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

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>
@jirhiker jirhiker merged commit 8baea78 into staging Jun 12, 2026
9 checks passed
@jirhiker jirhiker deleted the fix/ngwmn-release-filters branch June 12, 2026 20:58
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