Skip to content

Document that Census TAX_ID is replaced by our tax-unit construction#1155

Draft
MaxGhenis wants to merge 2 commits into
mainfrom
claude/document-census-tax-id-replacement
Draft

Document that Census TAX_ID is replaced by our tax-unit construction#1155
MaxGhenis wants to merge 2 commits into
mainfrom
claude/document-census-tax-id-replacement

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

What

Add an explanatory comment in CensusCPS._create_tax_unit_table documenting that the raw Census ASEC TAX_ID is intentionally replaced by our own construct_tax_units() assignment, with the original retained as CENSUS_TAX_ID.

Why

Read cold, person["TAX_ID"] = constructed_person["TAX_ID"].values looks like it might be silently clobbering the Census filing-unit grouping. It's deliberate: we build tax units ourselves (default mode "policyengine"), and keep the original as CENSUS_TAX_ID because it's the validation baseline (validation/cps_tax_unit_validation.py) and a required raw-schema column (_validate_raw_cps_schema). So CENSUS_TAX_ID should be neither dropped nor renamed — only documented.

Comment-only; no behavior change.

Note

Refile of #1154 from a canonical branch instead of a fork, so the check-fork-gated CI (calibration/integration jobs) actually runs.

🤖 Generated with Claude Code

MaxGhenis and others added 2 commits May 30, 2026 06:48
_create_tax_unit_table overwrites the raw Census ASEC TAX_ID with our own
construct_tax_units() assignment, retaining the original as CENSUS_TAX_ID. Add a
comment explaining the why so the intent (we build tax units ourselves; the
Census value is kept only as the validation baseline + required raw-schema
column) is legible at the call site.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MaxGhenis MaxGhenis marked this pull request as draft May 30, 2026 12:22
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