-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extended childcare entitlement #1007
base: master
Are you sure you want to change the base?
Conversation
…ine/policyengine-uk into tax-free-childcare-new
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these suggestions are in specific places but please apply them generally in this and other PRs
- title: Extended childcare entitlement guidance | ||
href: https://www.gov.uk/check-eligible-free-childcare-if-youre-working?step-by-step-nav=f517cd57-3c18-4bb9-aa8b-1b907e279bf9 | ||
values: | ||
2015-01-01: 0.75 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2015-01-01: 0.75 | |
2015-01-01: 0.75 # Nine months. | |
@@ -0,0 +1,12 @@ | |||
description: The department for education provides the extended childcare entitlement program eligibility to children from this minimum age. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: The department for education provides the extended childcare entitlement program eligibility to children from this minimum age. | |
description: The Department for Education provides the extended childcare entitlement to children this age or older. |
metadata: | ||
unit: year | ||
period: year | ||
label: minimum age eligibility for extended childcare entitlement program (15 hours of free childcare) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label: minimum age eligibility for extended childcare entitlement program (15 hours of free childcare) | |
label: Minimum age for extended childcare entitlement |
definition_period = YEAR # Evaluate eligibility on a yearly basis | ||
|
||
def formula(person, period, parameters): | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove docstring - by convention we put these in the class attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to the program in filenames/paths/variables as extended_childcare_entitlement
without the 15_hours
, as that's a policy parameter.
|
||
# Calculate eligible income | ||
total_income = person("total_income", period) | ||
# Extract investment incomes to subtract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this defined in the law? Let's make it a list parameter.
period | ||
).gov.dwp.extended_childcare_entitlement.income_thresholds | ||
|
||
required_threshold = income_limits.calc(age) * 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's 4
from?
from policyengine_uk.model_api import * | ||
|
||
|
||
class extended_childcare_entitlement_income_requirements(Variable): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with filename, which should always match the variable name
class extended_childcare_entitlement_income_requirements(Variable): | |
class extended_childcare_entitlement_income_eligible(Variable): |
bool: True if the child is eligible for 30 hours, False otherwise. | ||
""" | ||
# Get the child's age | ||
age = person("age", period) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
age = person("age", period) | |
p = parameters(period).gov.dwp.extended_childcare_entitlement.eligibility | |
return p.second_entitlement.calc(person("age", period)) |
) | ||
|
||
# Build conditions for Couples | ||
is_couple = (benunit.sum(is_adult) == 2).astype(bool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general should almost never need to cast
is_couple = (benunit.sum(is_adult) == 2).astype(bool) | |
is_couple = benunit.sum(is_adult) == 2 |
Overview
This PR implements the 15/30-hour free childcare (working parent) scheme calculation in PolicyEngine UK. The scheme provides government contributions towards childcare costs for eligible families. (Documentation link)
Key Features
Fixes #1006