Skip to content

Commit

Permalink
Merge pull request #942 from PolicyEngine/data-update
Browse files Browse the repository at this point in the history
Add changes for `policyengine-uk-data`
  • Loading branch information
nikhilwoodruff authored Sep 16, 2024
2 parents 49460b2 + da14c1c commit 6b269e5
Show file tree
Hide file tree
Showing 102 changed files with 413 additions and 1,144 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Apply Working Tax Credit old-age provision to 60-year-olds.
- Qualify people working 30 hours for the Working Tax Credit.
- Point AFCS to AFCS_reported instead of AA_reported.
- Point afcs to afcs_reported instead of AA_reported.
- Fix units on some variables.

## [0.7.17] - 2021-12-23 00:00:00
Expand Down
2 changes: 1 addition & 1 deletion changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
fixed:
- Apply Working Tax Credit old-age provision to 60-year-olds.
- Qualify people working 30 hours for the Working Tax Credit.
- Point AFCS to AFCS_reported instead of AA_reported.
- Point afcs to afcs_reported instead of AA_reported.
- Fix units on some variables.
date: 2021-12-27 00:00:00
- bump: patch
Expand Down
6 changes: 6 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- bump: minor
changes:
fixed:
- Missing metadata in variables.
- Inflation uprating for some parameters.
- Inconsistent variable capitalisation.
38 changes: 19 additions & 19 deletions docs/summary/VARIABLE_STATS.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 31,491,391.659608364


- ESA_income:
- esa_income:
- Type: float
- Entity: household
- Description: Household gross income
Expand All @@ -469,7 +469,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 27,594,714.97113228


- ESA_income_reported:
- esa_income_reported:
- Type: float
- Entity: household
- Description: Household net income
Expand All @@ -479,7 +479,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 31,431,782.814266205


- claims_ESA_income:
- claims_esa_income:
- Type: bool
- Entity: person
- Description: Worked some hours
Expand All @@ -489,7 +489,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 36,800,484.87847948


- would_claim_ESA_income:
- would_claim_esa_income:
- Type: bool
- Entity: benunit
- Description: Would claim income-based ESA
Expand All @@ -499,7 +499,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 402,875.4299545288


- IIDB:
- iidb:
- Type: float
- Entity: person
- Description: Lump sum income
Expand All @@ -509,7 +509,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 191,086.9439239502


- IIDB_reported:
- iidb_reported:
- Type: float
- Entity: person
- Description: Maintenance payments
Expand All @@ -519,7 +519,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 722,952.5704650879


- JSA_contrib:
- jsa_contrib:
- Type: float
- Entity: person
- Description: Market income
Expand All @@ -529,7 +529,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 45,137,423.94413638


- JSA_contrib_reported:
- jsa_contrib_reported:
- Type: float
- Entity: person
- Description: Minimum wage
Expand Down Expand Up @@ -979,7 +979,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 19,360,939.249423504


- JSA_income:
- jsa_income:
- Type: float
- Entity: household
- Description: Household furnishings
Expand All @@ -989,7 +989,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 30,109,011.32818985


- JSA_income_applicable_amount:
- jsa_income_applicable_amount:
- Type: float
- Entity: household
- Description: Housing, water and electricity
Expand All @@ -999,7 +999,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 31,534,885.703243256


- JSA_income_applicable_income:
- jsa_income_applicable_income:
- Type: float
- Entity: household
- Description: Miscellaneous
Expand All @@ -1019,7 +1019,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 15,787,098.954917908


- JSA_income_reported:
- jsa_income_reported:
- Type: float
- Entity: household
- Description: Recreation
Expand Down Expand Up @@ -1059,7 +1059,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 12,678,011.265280724


- BSP:
- bsp:
- Type: float
- Entity: person
- Description: Cost of childcare
Expand Down Expand Up @@ -1095,7 +1095,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 28,641,752.4251194


- BSP_reported:
- bsp_reported:
- Type: float
- Entity: household
- Description: Domestic rates
Expand Down Expand Up @@ -1650,7 +1650,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 27,250,437.19493723


- ESA_contrib:
- esa_contrib:
- Type: float
- Entity: person
- Description: Person's household ID
Expand All @@ -1660,7 +1660,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 67,106,864.33584666


- ESA_contrib_reported:
- esa_contrib_reported:
- Type: float
- Entity: person
- Description: Employment and Support Allowance (contribution-based) (reported)
Expand All @@ -1670,7 +1670,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 331,941.6319360733


- AFCS:
- afcs:
- Type: float
- Entity: person
- Description: Armed Forces Compensation Scheme
Expand All @@ -1680,7 +1680,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 57,022.80386734009


- AFCS_reported:
- afcs_reported:
- Type: float
- Entity: person
- Description: Armed Forces Compensation Scheme (reported)
Expand Down Expand Up @@ -3270,7 +3270,7 @@ All statistics generated from the uprated (to 2022) 2019-20 Family Resources Sur
- Non-zero count: 485,548.13566589355


- ESA_income_eligible:
- esa_income_eligible:
- Type: bool
- Entity: benunit
- Description: ESA (income) eligible
Expand Down
2 changes: 0 additions & 2 deletions policyengine_uk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
CountryTaxBenefitSystem,
Microsimulation,
Simulation,
IndividualSim,
COUNTRY_DIR,
BASELINE_VARIABLES,
parameters,
variables,
)
Expand Down
14 changes: 7 additions & 7 deletions policyengine_uk/data/datasets/frs/frs.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,10 @@ def add_benefit_income(
AA=12,
DLA_SC=1,
DLA_M=2,
IIDB=15,
iidb=15,
carers_allowance=13,
SDA=10,
AFCS=8,
afcs=8,
maternity_allowance=21,
ssmg=22,
pension_credit=4,
Expand All @@ -686,7 +686,7 @@ def add_benefit_income(
* 52
)

frs["JSA_contrib_reported"] = (
frs["jsa_contrib_reported"] = (
sum_to_entity(
benefits.BENAMT
* (benefits.VAR2.isin((1, 3)))
Expand All @@ -696,7 +696,7 @@ def add_benefit_income(
)
* 52
)
frs["JSA_income_reported"] = (
frs["jsa_income_reported"] = (
sum_to_entity(
benefits.BENAMT
* (benefits.VAR2.isin((2, 4)))
Expand All @@ -706,7 +706,7 @@ def add_benefit_income(
)
* 52
)
frs["ESA_contrib_reported"] = (
frs["esa_contrib_reported"] = (
sum_to_entity(
benefits.BENAMT
* (benefits.VAR2.isin((1, 3)))
Expand All @@ -716,7 +716,7 @@ def add_benefit_income(
)
* 52
)
frs["ESA_income_reported"] = (
frs["esa_income_reported"] = (
sum_to_entity(
benefits.BENAMT
* (benefits.VAR2.isin((2, 4)))
Expand All @@ -727,7 +727,7 @@ def add_benefit_income(
* 52
)

frs["BSP_reported"] = (
frs["bsp_reported"] = (
sum_to_entity(
benefits.BENAMT * (benefits.BENEFIT.isin((6, 9))),
benefits.person_id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
JSA_income:
jsa_income:
description: Number of families claiming income-based JSA.
values:
2018-01-01: 274_000
Expand Down Expand Up @@ -129,7 +129,7 @@ child_benefit:
- title: "Child Benefit Statistics: Annual Releast, August 2020"
href: https://www.gov.uk/government/statistics/child-benefit-statistics-annual-release-august-2020

ESA_income:
esa_income:
description: Number of families claiming income-based ESA.
values:
2019-01-01: 1_056_000
Expand Down
30 changes: 3 additions & 27 deletions policyengine_uk/parameters/gov/benefit_uprating_cpi.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
description: Most recent September CPIH index value, updated for each uprating occurrence.
description: Most recent September CPIH index value, updated for each uprating occurrence (2014=100)
values:
2026-01-01: 130.94
2025-04-01: 131.05
2024-04-01: 130.34
2023-04-01: 126.69
2022-01-01: 114.40
2021-01-01: 109.04
2020-04-01: 108.4
2019-04-01: 106.6
2018-04-01: 104.3
2017-04-01: 101.5
2016-04-01: 100.2
2015-04-01: 100.0
2014-04-01: 98.7
2013-04-01: 96.4
2012-04-01: 94.5
2011-04-01: 90.4
2010-04-01: 88.3
2009-04-01: 87.5
2008-04-01: 83.5
2007-04-01: 81.9
2006-04-01: 79.9
2005-04-01: 77.9
2004-04-01: 77.0
2003-04-01: 76.0
2002-04-01: 75.0
2001-04-01: 73.8
2014-01-01: 100
metadata:
label: Benefit uprating index
uprating: gov.obr.consumer_price_index
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Disable simulated benefits.
values:
2000-01-01: false
metadata:
label: disable simulated benefits
2 changes: 1 addition & 1 deletion policyengine_uk/parameters/gov/dwp/JSA/income/takeup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Share of eligible Income-based Jobseeker's Allowance recipients tha
metadata:
economy: false
label: Income-based Jobseeker's Allowance take-up rate
name: JSA_income_takeup
name: jsa_income_takeup
reference:
href: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/645577/income-related-benefits-estimates-of-take-up-2015-16.pdf
name: 'Income-related benefits: estimates of take-up: financial year 2015/16 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ values:
- state_pension
- private_pension_income
- capital_income
- ESA_contrib
- JSA_contrib
- esa_contrib
- jsa_contrib
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ metadata:
unit: currency-GBP
values:
2002-01-01:
- JSA_contrib
- ESA_contrib
- jsa_contrib
- esa_contrib
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ values:
- state_pension
- private_pension_income
- capital_income
- ESA_contrib
- JSA_contrib
- esa_contrib
- jsa_contrib
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ metadata:
unit: currency-GBP
values:
2002-01-01:
- JSA_contrib
- ESA_contrib
- jsa_contrib
- esa_contrib
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
values:
2010-01-01:
- carers_allowance
- JSA_contrib
- jsa_contrib
- private_pension_income
- savings_interest_income
- dividend_income
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Take-up rate of Universal Credit.
values:
2015-01-01: 0.55
metadata:
unit: /1
label: Universal Credit take-up rate
Loading

0 comments on commit 6b269e5

Please sign in to comment.