diff --git a/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/expense_rate.yaml b/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/expense_rate.yaml new file mode 100644 index 000000000..d386614e4 --- /dev/null +++ b/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/expense_rate.yaml @@ -0,0 +1,15 @@ +description: The Department for Education converts childcare hours into expenses for targeted childcare entitlement at these rates. +metadata: + type: single_amount + threshold_unit: year + amount_unit: currency-GBP + label: Targeted childcare entitlement hourly rates + reference: + - title: Different rates for targeted childcare entitlement + href: + - https://www.nurseryworld.co.uk/content/news/dfe-confirms-extended-30-hours-funding-rates-but-sector-says-they-dont-reflect-the-real-delivery-cost/ + - https://www.gov.uk/government/news/childcare-settings-receive-cash-boost-as-funding-rates-increase + - title: Commons Library + href: https://commonslibrary.parliament.uk/research-briefings/cbp-8052/ +values: + 2015-01-01: 8.28 \ No newline at end of file diff --git a/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/child_age_eligible.yaml b/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/hour_by_age.yaml similarity index 58% rename from policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/child_age_eligible.yaml rename to policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/hour_by_age.yaml index e01729806..70117f281 100644 --- a/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/child_age_eligible.yaml +++ b/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/hour_by_age.yaml @@ -1,25 +1,26 @@ -description: The Department for Education provides targeted childcare entitlement in England for specific age brackets +description: The Department for Education provides targeted childcare entitlement in England. metadata: - type: single_amount + type: scale threshold_unit: year + label: "Age eligibility for targeted 2-year-old childcare entitlement" reference: - - title: The Local Authority (Duty to Secure Early Years Provision Free of Charge) Regulations 2014 - regulation 3 + - title: The Local Authority (Duty to Secure Early Years Provision Free of Charge) Regulations 2014 - regulation 3 href: https://www.legislation.gov.uk/uksi/2014/2147/regulation/3/made - - title: Document for 15 hours free education and childcare for 2-year old + - title: The Local Authority (Duty to Secure Early Years Provision Free of Charge) Regulations 2014 - regulation 4 + href: https://www.legislation.gov.uk/uksi/2014/2147/regulation/4/made + - title: Document for 15 hours free education and childcare for 2-year-olds href: https://www.gov.uk/help-with-childcare-costs/free-childcare-2-year-olds-claim-benefits?step-by-step-nav=f237ec8e-e82c-4ffa-8fba-2a88a739783b + brackets: - threshold: 2015-01-01: 0 amount: - values: - 2015-01-01: false + 2015-01-01: 0 - threshold: 2015-01-01: 2 amount: - values: - 2015-01-01: true + 2015-01-01: 570 - threshold: 2015-01-01: 3 amount: - values: - 2015-01-01: false \ No newline at end of file + 2015-01-01: 0 diff --git a/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/hours_per_year.yaml b/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/hours_per_year.yaml deleted file mode 100644 index 46e4dc076..000000000 --- a/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/hours_per_year.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: The Department for Education provides targeted childcare entitlement in England, offering specific hours per year. -metadata: - unit: hour - period: year - label: Annual targeted childcare entitlement hours - reference: - - title: The Local Authority (Duty to Secure Early Years Provision Free of Charge) Regulations 2014 - regulation 4 - href: https://www.legislation.gov.uk/uksi/2014/2147/regulation/4/made - - title: Document for 15 hours free education and childcare for 2-year old - href: https://www.gov.uk/help-with-childcare-costs/free-childcare-2-year-olds-claim-benefits?step-by-step-nav=f237ec8e-e82c-4ffa-8fba-2a88a739783b -values: - 2015-01-01: 570 \ No newline at end of file diff --git a/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/income_threshold_with_tax_credits.yaml b/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/income_threshold_with_tax_credits.yaml index f03257390..cbb5f2dec 100644 --- a/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/income_threshold_with_tax_credits.yaml +++ b/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/income_threshold_with_tax_credits.yaml @@ -1,13 +1,12 @@ -description: The Department for Education sets an income threshold for Tax Credits recipients to be eligible for 15 hours free education and childcare for 2-year old. +description: The Department for Education sets an income threshold for Tax Credit recipients to be eligible for targeted childcare entitlement. metadata: unit: GBP period: year - label: Income threshold for tax Credits recipients + label: Income threshold for Tax Credit recipients reference: - title: The Local Authority (Duty to Secure Early Years Provision Free of Charge) Regulations 2014, part 1.2.b href: https://www.legislation.gov.uk/uksi/2014/2147/regulation/1/made - - title: Document for 15 hours free education and childcare for 2-year old + - title: Document for 15 hours free education and childcare for 2-year-olds href: https://www.gov.uk/help-with-childcare-costs/free-childcare-2-year-olds-claim-benefits?step-by-step-nav=f237ec8e-e82c-4ffa-8fba-2a88a739783b values: - 2015-01-01: 16_190 - + 2015-01-01: 16_190 \ No newline at end of file diff --git a/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/income_threshold_with_universal_credit.yaml b/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/income_threshold_with_universal_credit.yaml index e243b2004..d0dc7fb4d 100644 --- a/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/income_threshold_with_universal_credit.yaml +++ b/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/income_threshold_with_universal_credit.yaml @@ -1,13 +1,12 @@ -description: The Department for Education sets an income threshold for Universal Credit recipients to be eligible 15 hours free education and childcare for 2-year old. -# The threshold is set by statutory guidance, not legislation. A 2018 Department for Education response introduced this net earnings limit for free childcare eligibility. +description: The Department for Education sets an income threshold for Universal Credit recipients to be eligible for targeted childcare entitlement. metadata: unit: GBP period: year label: Income threshold for Universal Credit recipients reference: - - title: Document for Eligibility for free school meals, the early years pupil premium and the free early education entitlement for two-year-olds under Universal Credit - page 5 - href: https://assets.publishing.service.gov.uk/media/5ab270baed915d4f2d097124/Government_response_FSM_and_EY_entitlements_under_Universal_Credit.pdf?utm_source=chatgpt.com - - title: Document for 15 hours free education and childcare for 2-year old + - title: Document for Eligibility for free school meals, the early years pupil premium and the free early education entitlement for two-year-olds under Universal Credit (Page 5) + href: https://assets.publishing.service.gov.uk/media/5ab270baed915d4f2d097124/Government_response_FSM_and_EY_entitlements_under_Universal_Credit.pdf + - title: Document for 15 hours free education and childcare for 2-year-olds href: https://www.gov.uk/help-with-childcare-costs/free-childcare-2-year-olds-claim-benefits?step-by-step-nav=f237ec8e-e82c-4ffa-8fba-2a88a739783b values: - 2015-01-01: 15_400 + 2015-01-01: 15_400 \ No newline at end of file diff --git a/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/qualifying_benefits.yaml b/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/qualifying_benefits.yaml index 9e15a831d..46029901d 100644 --- a/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/qualifying_benefits.yaml +++ b/policyengine_uk/parameters/gov/dwp/targeted_childcare_entitlement/qualifying_benefits.yaml @@ -1,11 +1,11 @@ -description: List of qualifying benefits for targeted childcare entitlement eligibility assessment +description: The Department for Education designates these programs as qualifying benefits for the targeted childcare entitlement eligibility. metadata: reference: - - title: Local Authority (Duty to Secure Early Years Provision Free of Charge) Regulations 2014 - 1.a to 1.g + - title: Local Authority (Duty to Secure Early Years Provision Free of Charge) Regulations 2014 - paragraphs 1.a to 1.g href: https://www.legislation.gov.uk/uksi/2014/2147/regulation/1/made#f00009 period: year unit: program - label: Qualifying benefits for targeted childcare entitlement (childcare for 2 year olds) + label: Qualifying benefits for targeted childcare entitlement values: 2015-01-01: - jsa_income diff --git a/policyengine_uk/variables/gov/dwp/targeted_childcare_entitlement/targeted_childcare_entitlement_combine_benefits.py b/policyengine_uk/variables/gov/dwp/targeted_childcare_entitlement/targeted_childcare_entitlement_combine_benefits.py index a4951e7aa..110fe42ff 100644 --- a/policyengine_uk/variables/gov/dwp/targeted_childcare_entitlement/targeted_childcare_entitlement_combine_benefits.py +++ b/policyengine_uk/variables/gov/dwp/targeted_childcare_entitlement/targeted_childcare_entitlement_combine_benefits.py @@ -4,7 +4,7 @@ class targeted_childcare_entitlement_combine_benefits(Variable): value_type = bool entity = BenUnit - label = "Eligible for Targeted childcare entitlement based on benefits" + label = "Eligible for targeted childcare entitlement based on benefits" definition_period = YEAR # details for implementation: https://www.gov.uk/help-with-childcare-costs/free-childcare-2-year-olds-claim-benefits?step-by-step-nav=f237ec8e-e82c-4ffa-8fba-2a88a739783b @@ -27,12 +27,12 @@ def formula(benunit, period, parameters): p.qualifying_benefits, ) - # Get universal credit receipt specifically for income test - receives_universal_credit = benunit("universal_credit", period) > 0 + # Combine CTC + WTC + ctc_wtc = add(benunit, period, ["child_tax_credit", "working_tax_credit"]) + receives_ctc_wtc = ctc_wtc > 0 - # Get tax credits receipt specifically for income test - receives_child_tax_credit = benunit("child_tax_credit", period) > 0 - receives_working_tax_credit = benunit("working_tax_credit", period) > 0 + # Universal credit receipt specifically for income test + receives_universal_credit = benunit("universal_credit", period) > 0 # Check Universal Credit with income threshold meets_universal_credit_income = receives_universal_credit & ( @@ -40,12 +40,12 @@ def formula(benunit, period, parameters): ) # Check Tax Credits with income threshold - meets_tax_credits_income = ( - receives_child_tax_credit | receives_working_tax_credit - ) & (benunit_income <= p.income_threshold_with_tax_credits) + meets_tax_credits_income = (receives_ctc_wtc) & ( + benunit_income <= p.income_threshold_with_tax_credits + ) return ( (qualifying_benefits > 0) # Any qualifying benefit | meets_universal_credit_income # Universal Credit with income threshold - | meets_tax_credits_income # Tax Credits with income threshold + | meets_tax_credits_income # Tax Credits with income threshold ) diff --git a/policyengine_uk/variables/gov/dwp/targeted_childcare_entitlement/targeted_childcare_entitlement_eligibility.py b/policyengine_uk/variables/gov/dwp/targeted_childcare_entitlement/targeted_childcare_entitlement_eligibility.py deleted file mode 100644 index 3e9016cf6..000000000 --- a/policyengine_uk/variables/gov/dwp/targeted_childcare_entitlement/targeted_childcare_entitlement_eligibility.py +++ /dev/null @@ -1,24 +0,0 @@ -from policyengine_uk.model_api import * - - -class targeted_childcare_entitlement_eligibility(Variable): - value_type = bool - entity = BenUnit - label = "targeted childcare entitlement eligibility" - documentation = "Whether the benefit unit has any children eligible for targeted childcare entitlement" - definition_period = YEAR - - def formula(benunit, period, parameters): - # Get parameters - p = parameters(period).gov.dwp.targeted_childcare_entitlement - - # Get ages of all members in the benefit unit - age = benunit.members("age", period) - - # Check if they are children - is_child = benunit.members("is_child", period) - - # Check if age is eligible using the bracket calculation - is_eligible_age = p.child_age_eligible.calc(age) - - return benunit.any(is_child & is_eligible_age) diff --git a/policyengine_uk/variables/gov/dwp/targeted_childcare_entitlement/targeted_childcare_entitlement_hours.py b/policyengine_uk/variables/gov/dwp/targeted_childcare_entitlement/targeted_childcare_entitlement_hours.py index 9cd2c03aa..84f049689 100644 --- a/policyengine_uk/variables/gov/dwp/targeted_childcare_entitlement/targeted_childcare_entitlement_hours.py +++ b/policyengine_uk/variables/gov/dwp/targeted_childcare_entitlement/targeted_childcare_entitlement_hours.py @@ -3,27 +3,20 @@ class targeted_childcare_entitlement_hours(Variable): value_type = float - entity = BenUnit - label = "targeted childcare entitlement hours per year" - documentation = "Number of free childcare hours per year the benefit unit is entitled to" + entity = Person + label = "Targeted childcare entitlement hours per year" definition_period = YEAR + unit = "hour" - def formula(benunit, period, parameters): - # Get age eligibility status for targeted entitlement - targeted_eligible_age = benunit( - "targeted_childcare_entitlement_eligibility", period - ) + def formula(person, period, parameters): + p = parameters(period).gov.dwp.targeted_childcare_entitlement - # Get eligibility status for targeted entitlement - targeted_eligible = benunit( - "targeted_childcare_entitlement_combine_benefits", # Changed this line - period, - ) + # 1) Does the person's benefit unit meet targeted childcare entitlement criteria? + targeted_eligible = person.benunit("targeted_childcare_entitlement_combine_benefits", period) - # Use hours directly from parameters file - p = parameters(period).gov.dwp.targeted_childcare_entitlement + # 2) Calculate hours based on age using your bracket structure + age = person("age", period) + hours_by_age = p.hours_by_age.calc(age) # rename as needed if your YAML's param is different - # Return hours if either eligible, 0 if not - return where( - targeted_eligible_age | targeted_eligible, p.hours_per_year, 0 - ) + # 3) If the benefit unit is eligible, return hours_by_age; otherwise 0 + return where(targeted_eligible, hours_by_age, 0)