Conversation
The custom-geography path (states, counties, congressional districts) had tests that pinned its own outputs — no ground truth. This audit scores the package's actual formula against the Census SPM metro workbook's official per-metro, per-tenure adjustments, with the error decomposed into formula shape versus rent source: - Formula shape validates essentially exactly: running calculate_geoadj_from_rent on the workbook's own rent index reproduces the official adjustments to within 0.002% across 341 metros x 3 tenures. Census's construction is literally rent_ratio x share + (1 - share) with these housing shares. - The rent source is the entire residual. Overall median gross rent (B25064, what the custom path uses) diverges from the workbook's rent index by 3.79% MAE (max 18.5%); two-bedroom gross rent (B25031_E004, the concept Census documents for SPM geographic adjustment) diverges by 1.08% MAE (max 6.4%) — three times closer. End-to-end geoadj error with two-bedroom rents: 0.3-0.5% MAE, worst metro under 3%. - Rents come from the keyless ACS table-based summary files on www2.census.gov (the api.census.gov JSON endpoints now require a registered key). Follow-up (separate change): switch the custom-geography rent source to B25031 two-bedroom rents and regenerate the bundled sub-metro data. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
Closing as superseded: this audit exercises |
This branch was successfully deployed
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.
Stacked on #32. The custom-geography adjustment path (states/counties/CDs) was the one subsystem with no ground-truth test — its tests pinned their own outputs. This audits the package's actual
calculate_geoadj_from_rentagainst the Census SPM metro workbook's official per-metro, per-tenure adjustments (341 metros × 3 tenures), with the error decomposed:rent_ratio × share + (1−share)with these sharesFull tables in docs/geoadj-audit.md; reproducible via
scripts/audit_geoadj_oracle.py(keyless — uses the ACS table-based summary files on www2.census.gov, since api.census.gov now requires a registered key).Follow-up filed separately: switch the custom-geography rent source to B25031 and regenerate the bundled sub-metro data.
🤖 Generated with Claude Code