fix(data): re-derive early_january_2023_weather from weather (real temp/dewp/humid/pressure)#7
Merged
Merged
Conversation
The R `moderndive::early_january_2023_weather` ships with temp, dewp, humid, and pressure entirely NA (mean temp is NaN), which carried through to the bundled Parquet as all-null string columns. Derive the table from `weather` instead (Newark / EWR, first 15 days of January 2023) so those four columns are real, correctly-typed floats. Same 360 rows. build_data.py now produces it from the freshly built weather frame rather than reading a separate CSV, and a regression test asserts the measurement columns are numeric and non-null. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017CTL1QSTg1DmDUpqYuPEog
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.
Problem
The R
moderndive::early_january_2023_weatherdataset ships withtemp,dewp,humid, andpressureentirelyNA(mean temp isNaN). That upstream bug carried through to the bundled Parquet here as all-null string columns — so the four core measurement columns were unusable.Fix
Derive
early_january_2023_weatherfrom theweatherdataset (Newark/EWR, first 15 days of January 2023) instead of reading the broken standalone source. Those columns come back as real, correctly-typed floats (360 rows, unchanged).tools/build_data.pynow builds it from the freshly readweatherframe.early_january_2023_weather.parquet.temp/dewp/humid/pressureare numeric and non-null.Verified against R (which is itself NaN here) and the
weathersource rows; values are consistent and the existing UTCtime_hourconvention is preserved.🤖 Generated with Claude Code