Use HBAI population groups for UK poverty breakdowns; stop requesting the deprecated is_child/is_adult
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with src/policyengine/tax_benefit_models/uk/model.py and uk/household.py, then inspect src/policyengine/outputs/poverty.py and cliff_impact.py. Confirm the policyengine-uk pin includes the HBAI variables, and run the existing snapshot and poverty tests before changing the UK output keys. Done means deprecated UK variables are no longer read, HBAI groups reproduce the enhanced FRS split, and snapshots, poverty tests, executor keys, and labels are consistent.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Why
PolicyEngine/policyengine-uk#1896 replaces the generic is_child (age < 18) and is_adult (age >= 18) flags inside the UK model with each programme's legal definition, and adds explicit HBAI (Households Below Average Income) variables for statistics. UK law has no single definition of a child: Child Benefit, Universal Credit, tax credits, Pension Credit, the legacy benefits and student support each define their own, and HBAI defines a dependent child as under 16, or 16-19, unpartnered, living with parents and in full-time non-advanced education or unwaged government training.
is_child, is_adult, family_type and the other generic variables stay in policyengine-uk as deprecated shims with their old age-18 formulas, so nothing breaks. This issue moves policyengine.py onto the explicit variables once its policyengine-uk pin moves past the release containing that PR.
Changes
src/policyengine/tax_benefit_models/uk/model.py: dropis_adultandis_childfrom the UK person output columns (lines ~63-65) and addhbai_person_type(enum:CHILD,WORKING_AGE_ADULT,PENSIONER) oris_hbai_dependent_child. Replace the benunitfamily_typecolumn (line ~94; deprecated, age-18 split) withrelation_type(claimant has a partner) if a family column is still wanted. Updateuk/household.pyaccordingly and regenerate the UK household snapshot fixtures.src/policyengine/outputs/poverty.py: UK poverty by group should use the HBAI population groups, not the age bands inAGE_GROUPS(child <= 17, adult 18-64, senior 65+). HBAI groups: dependent children, working-age adults (below State Pension age) and pensioners (at or above State Pension age), i.e.hbai_person_type. Keep age bands where an age band is meant, but label them as age bands (for exampleaged_0_to_17,aged_18_to_64,aged_65_and_over), and keep the US groups separate from the UK ones. The api-v2 simulation executor and the app's "Children / Working-age adults / Seniors" labels read these groups: coordinate the key change (for the UK, "Seniors" should read "Pensioners").src/policyengine/outputs/cliff_impact.py: the cliff-share denominator sumsis_adult. Make it an explicit per-country predicate (for the UK, people aged 18 or over viaage, oris_hbai_adultif the intended population is HBAI adults) and document it; the numerator currently counts everyone.
Acceptance
- No policyengine.py code reads a deprecated UK variable (
is_child,is_adult,num_children,num_adults,family_type,child_index,adult_indexexcepted). - UK poverty-by-group outputs reproduce HBAI's population split on the enhanced FRS.
- Snapshot and poverty tests updated.
🤖 Generated with Claude Code
- Lenguaje dominante
- Python
- Estrellas
- 8
- Forks
- 9
- Merge medio
- 15 h 28 min
- PR fusionados (30 d)
- 13
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PolicyEngine/policyengine.py
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
PolicyEngine/policyengine.py#549 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
PolicyEngine/policyengine.py#473 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
PolicyEngine/policyengine.py#436 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
PolicyEngine/policyengine.py#408 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 58/100
PolicyEngine/policyengine.py#543 ·
Los mantenedores suelen responder en 1 día
Todos los issues de PolicyEngine/policyengine.py
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
conda-forge/conda-build-feedstock#289 · 1 comentario · 1 reacción ·
-
`pulptest` no longer works in 4.0.0: `ImportError: Start directory is not importable: 'pulp/tests'`Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
remove reddit feedsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
TomCasavant/ohio-sites#224 ·