Skip to content

Commit

Permalink
Add the Scottish WFP (#1000)
Browse files Browse the repository at this point in the history
* Fix Budget change reforms break on subset simulations #994

* Add the Scottish PAWHP

* Versioning
  • Loading branch information
nikhilwoodruff authored Dec 5, 2024
1 parent bf6dfe8 commit 43b6246
Show file tree
Hide file tree
Showing 12 changed files with 114 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.18.0] - 2024-12-05 12:43:06

### Added

- Scottish Winter Fuel Payment equivalent.

## [2.17.0] - 2024-12-04 16:48:42

### Fixed
Expand Down Expand Up @@ -1609,6 +1615,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



[2.18.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.17.0...2.18.0
[2.17.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.16.0...2.17.0
[2.16.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.15.1...2.16.0
[2.15.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.15.0...2.15.1
Expand Down
5 changes: 5 additions & 0 deletions changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1350,3 +1350,8 @@
fixed:
- Scottish baseline matched with Scottish Fiscal Commission.
date: 2024-12-04 16:48:42
- bump: minor
changes:
added:
- Scottish Winter Fuel Payment equivalent.
date: 2024-12-05 12:43:06
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Amount paid to non-benefit-claiming pensioners for the PAWHP.
values:
2024-01-01: 0
2025-01-01: 100
metadata:
unit: currency-GBP
label: PAWHP base payment
uprating: gov.obr.consumer_price_index
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
values:
2024-01-01: 300
metadata:
unit: currency-GBP
label: PAWHP lower amount
uprating: gov.obr.consumer_price_index
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
values:
2024-01-01: 200
metadata:
unit: currency-GBP
label: PAWHP lower amount
uprating: gov.obr.consumer_price_index
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Age requirement to qualify for the higher PAWHP.
values:
2000-01-01: 80
metadata:
unit: year
label: Winter Fuel Payment higher amount age requirement
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Whether receipt of means-tested benefits is required to qualify for the Winter Fuel Payment.
values:
2000-01-01: false
2024-01-01:
value: true
metadata:
unit: bool
label: PAWHP means-tested benefits requirement
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
description: Whether individuals must be State Pension Age to qualify for the PAWHP.
values:
2000-01-01: true
metadata:
unit: bool
label: PAWHP State Pension Age requirement
5 changes: 4 additions & 1 deletion policyengine_uk/variables/gov/dwp/WFA.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class winter_fuel_allowance(Variable):
unit = GBP

def formula(household, period, parameters):
in_scotland = (
household("country", period).decode_to_str() == "SCOTLAND"
)
age = household.members("age", period)
is_SP_age = household.members("is_SP_age", period)
wfp = parameters(period).gov.dwp.winter_fuel_payment
Expand Down Expand Up @@ -53,7 +56,7 @@ def formula(household, period, parameters):
& ~meets_higher_age_requirement
)

return (
return ~in_scotland * (
wfp.amount.higher * qualifies_for_higher
+ wfp.amount.lower * qualifies_for_lower
)
1 change: 1 addition & 0 deletions policyengine_uk/variables/gov/gov_spending.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class gov_spending(Variable):
"cost_of_living_support_payment",
"energy_bills_rebate",
"winter_fuel_allowance",
"pawhp",
"nhs_budget_change",
"education_budget_change",
"other_public_spending_budget_change",
Expand Down
56 changes: 56 additions & 0 deletions policyengine_uk/variables/gov/social_security_scotland/pawhp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
from policyengine_uk.model_api import *


class pawhp(Variable):
label = "Pension Age Winter Heating Payment"
entity = Household
definition_period = YEAR
value_type = float
unit = GBP

def formula(household, period, parameters):
in_scotland = (
household("country", period).decode_to_str() == "SCOTLAND"
)
age = household.members("age", period)
is_SP_age = household.members("is_SP_age", period)
wfp = parameters(period).gov.social_security_scotland.pawhp
on_mtb = (
add(
household,
period,
[
"pension_credit",
"income_support",
"esa_income",
"jsa_income",
],
)
> 0
)
meets_mtb_requirement = on_mtb | ~wfp.eligibility.require_benefits
meets_spa_requirement = (
household.any(is_SP_age)
| ~wfp.eligibility.state_pension_age_requirement
)
meets_higher_age_requirement = household.any(
age >= wfp.eligibility.higher_age_requirement
)
qualifies_for_higher = (
meets_mtb_requirement
& meets_spa_requirement
& meets_higher_age_requirement
)
qualifies_for_lower = (
meets_mtb_requirement
& meets_spa_requirement
& ~meets_higher_age_requirement
)

qualifies_for_base = ~meets_mtb_requirement & meets_spa_requirement

return in_scotland * (
wfp.amount.higher * qualifies_for_higher
+ wfp.amount.lower * qualifies_for_lower
+ wfp.amount.base * qualifies_for_base
)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="PolicyEngine-UK",
version="2.17.0",
version="2.18.0",
author="PolicyEngine",
author_email="nikhil@policyengine.org",
classifiers=[
Expand Down

0 comments on commit 43b6246

Please sign in to comment.