Skip to content

Assign is_parent from FRS microdata#343

Merged
MaxGhenis merged 1 commit into
mainfrom
assign-is-parent-from-frs
Apr 15, 2026
Merged

Assign is_parent from FRS microdata#343
MaxGhenis merged 1 commit into
mainfrom
assign-is-parent-from-frs

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Summary

  • Assign is_parent directly from FRS adult-table membership plus benefit-unit dependent-child counts.
  • Avoid ranking adults across a whole household when multiple benefit units share one household.
  • Add focused helper tests and extend the FRS smoke test to assert the column is produced.
  • Sync the editable package version in uv.lock with pyproject.toml.

Closes #73.

Impact check

Using local raw FRS microdata and approximating the old formula:

Dataset Persons New FRS parents Old formula parents Differing persons New true / old false Old true / new false Diffs in multi-BU households
frs_2022_23 53,577 10,901 10,396 561 533 28 299
frs_2023_24 36,248 7,429 7,119 352 331 21 206

Validation

  • uv run --python 3.13 ruff check policyengine_uk_data/datasets/frs.py policyengine_uk_data/tests/test_is_parent_from_frs.py policyengine_uk_data/tests/test_legacy_benefit_proxies.py
  • uv run --python 3.13 ruff format --check policyengine_uk_data/datasets/frs.py policyengine_uk_data/tests/test_is_parent_from_frs.py policyengine_uk_data/tests/test_legacy_benefit_proxies.py
  • uv run --python 3.13 pytest -q policyengine_uk_data/tests/test_is_parent_from_frs.py policyengine_uk_data/tests/test_legacy_benefit_proxies.py

@MaxGhenis MaxGhenis merged commit 41edccb into main Apr 15, 2026
3 checks passed
@MaxGhenis MaxGhenis deleted the assign-is-parent-from-frs branch April 15, 2026 13:55
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.

Assign is_parent from FRS microdata

1 participant