UK: blank FRS tenure silently becomes RENT_PRIVATELY

Open
#1,716 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
data

Research direction

Start at uk_runtime/frs_spine.py lines 1868-1869, where _map_dictionary_codes maps blank ptentyp2 to RENT_PRIVATELY, and read TENURE_MAP. Compare with how spi_housing_shell imputes tenure for SPI households. Done means blank-tenure rows are counted in the build receipt and either imputed or explicitly flagged rather than defaulted to private renting.

Written by the indexing model from the issue text.

Description

uk_runtime/frs_spine.py:1868-1869 maps a blank FRS tenure code (ptentyp2) to RENT_PRIVATELY:

pe_household["tenure_type"] = _map_dictionary_codes(
    household, "ptentyp2", TENURE_MAP, blank="RENT_PRIVATELY"
)

Private renting is also policyengine-uk's enum default, so a user can't tell a household with a reported tenure from one that defaulted. An external user asked whether records "take the default (renting privately)".

Asks:

  • Count these rows in a build receipt.
  • If there are more than a handful, impute tenure for them as spi_housing_shell does for SPI households, rather than defaulting to private renting, which affects LHA, Housing Benefit and housing costs.

Drafted with AI assistance and checked against main at 8740c6f.

Dominant language
Python
Stars
0
Forks
6
Avg merge
1d 17h
Merged PRs (30d)
190

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PolicyEngine/microcosm

All issues in PolicyEngine/microcosm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.