-
Notifications
You must be signed in to change notification settings - Fork 32
Universal childcare entitlement #1010
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
789f676
Edit format based on Pavel's comments
vahid-ahmadi cd3ff72
Implement universal 15-hours free childcare
vahid-ahmadi e792de8
Edit folders
vahid-ahmadi aacf564
Edit codes and labels
vahid-ahmadi d736589
Format with black
vahid-ahmadi 295b6e3
Edit the labels and shorten the codes
vahid-ahmadi 91f4cde
Format with black
vahid-ahmadi 65d0909
Merge branch 'master' into universal-free-childcare
vahid-ahmadi fb18cbc
Merge branch 'master' into universal-free-childcare
vahid-ahmadi c30d21a
Complete py files and unit tests
vahid-ahmadi 30e4376
Edit based on chat-gpt comments
vahid-ahmadi 0245691
Apply Nikhil's comments
vahid-ahmadi b307f43
Apply Nikhil's comments
vahid-ahmadi 38e5bcc
Merge branch 'master' into universal-free-childcare
vahid-ahmadi f8462e1
Edit benefit py file
vahid-ahmadi 398db95
Apply Max's comments - add "live in England" condition
vahid-ahmadi a5b7886
Edit law reference
vahid-ahmadi e3d0444
Edit py code and define is_of_compulsory_school_age variable
vahid-ahmadi 18f19e6
Move files to dfe folder
vahid-ahmadi 474a1e5
Edit funding rate file
vahid-ahmadi 85ff824
Edit is_of_compulsory_school_age file
vahid-ahmadi a86c336
Apply Max's comments
vahid-ahmadi 355b760
Delete hours py file
vahid-ahmadi abf0662
Edit files' names
vahid-ahmadi d95658a
Merge branch 'master' into universal-free-childcare
vahid-ahmadi 8838ea9
Change to report at person level
vahid-ahmadi 3100b80
Add uprating
vahid-ahmadi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
policyengine_uk/parameters/gov/dfe/childcare_funding_rate.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| description: The Department for Education converts childcare hours into expenses for childcare entitlement at these rates. | ||
| metadata: | ||
| type: single_amount | ||
| threshold_unit: year | ||
| amount_unit: currency-GBP | ||
| label: Childcare entitlement hourly rates by age | ||
| uprating: gov.benefit_uprating_cpi | ||
| reference: | ||
| - title: House of Commons Library | Early years funding in England | ||
| href: https://commonslibrary.parliament.uk/research-briefings/cbp-8052/ | ||
|
|
||
| brackets: | ||
| - threshold: | ||
| 2015-01-01: 0 | ||
| amount: | ||
| 2024-04-01: 11.22 | ||
| - threshold: | ||
| 2015-01-01: 2 | ||
| amount: | ||
| 2024-04-01: 8.28 | ||
| - threshold: | ||
| 2015-01-01: 3 | ||
| amount: | ||
| 2024-04-01: 5.88 | ||
22 changes: 22 additions & 0 deletions
22
policyengine_uk/parameters/gov/dfe/compulsory_school_age.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| description: The Department for Education requires children to receive full-time education in this age range. | ||
| metadata: | ||
| type: single_amount | ||
| threshold_unit: year | ||
| amount_unit: bool | ||
| label: compulsory school age status | ||
| reference: | ||
| - title: Education Act 1996 - Section 8 (Compulsory school age) | ||
| href: https://www.legislation.gov.uk/ukpga/1996/56/section/8 | ||
| brackets: | ||
| - threshold: | ||
| 2015-01-01: 0 | ||
| amount: | ||
| 2015-01-01: False | ||
| - threshold: | ||
| 2015-01-01: 5 | ||
| amount: | ||
| 2015-01-01: True | ||
| - threshold: | ||
| 2015-01-01: 16 | ||
| amount: | ||
| 2015-01-01: False |
12 changes: 12 additions & 0 deletions
12
policyengine_uk/parameters/gov/dfe/universal_childcare_entitlement/hours.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| description: The Department for Education provides this number of hours per year of childcare for universal childcare entitlement in England. | ||
| metadata: | ||
| unit: hour | ||
| threshold_unit: year | ||
| label: universal childcare entitlement hours | ||
| reference: | ||
| - title: Childcare (Early Years Provision Free of Charge) (Extended Entitlement) Regulations 2016 - Regulation 35(3) | ||
| href: https://www.legislation.gov.uk/uksi/2016/1257/part/4/made | ||
| - title: Childcare Act 2006 - Section 7.1 (Duty to secure free early years provision) | ||
| href: https://www.legislation.gov.uk/ukpga/2006/21/section/7 | ||
| values: | ||
| 2015-01-01: 570 |
13 changes: 13 additions & 0 deletions
13
policyengine_uk/parameters/gov/dfe/universal_childcare_entitlement/min_age.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| description: The Department for Education limits universal childcare entitlement in England to children this age or older. | ||
| metadata: | ||
| type: single_amount | ||
| threshold_unit: year | ||
| amount_unit: hour | ||
| label: universal childcare entitlement child's minimum age | ||
| reference: | ||
| - title: Childcare (Early Years Provision Free of Charge) (Extended Entitlement) Regulations 2016 - Regulation 35(3) | ||
| href: https://www.legislation.gov.uk/uksi/2016/1257/part/4/made | ||
| - title: Childcare Act 2006 - Section 7.1 (Duty to secure free early years provision) | ||
| href: https://www.legislation.gov.uk/ukpga/2006/21/section/7 | ||
| values: | ||
| 2015-01-01: 3 |
63 changes: 63 additions & 0 deletions
63
...icy/baseline/gov/dfe/universal_childcare_entitlement/universal_childcare_entitlement.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| - name: Child under 3 isn't eligible (person-level) | ||
vahid-ahmadi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| period: 2024 | ||
| input: | ||
| age: 2 | ||
| universal_childcare_entitlement_eligible: False | ||
| output: | ||
| universal_childcare_entitlement: 0.0 | ||
|
|
||
| - name: Child aged 3 is eligible (person-level) | ||
| period: 2024 | ||
| input: | ||
| age: 3 | ||
| universal_childcare_entitlement_eligible: True | ||
| output: | ||
| universal_childcare_entitlement: 3351.60 | ||
|
|
||
| - name: Child aged 4 is eligible (person-level) | ||
| period: 2024 | ||
| input: | ||
| age: 4 | ||
| universal_childcare_entitlement_eligible: True | ||
| output: | ||
| universal_childcare_entitlement: 3351.60 | ||
|
|
||
| - name: Parent (ineligible) | ||
| period: 2024 | ||
| input: | ||
| age: 35 | ||
| universal_childcare_entitlement_eligible: False | ||
| output: | ||
| universal_childcare_entitlement: 0.0 | ||
|
|
||
| - name: Child aged 2 (ineligible) | ||
| period: 2024 | ||
| input: | ||
| age: 2 | ||
| universal_childcare_entitlement_eligible: False | ||
| output: | ||
| universal_childcare_entitlement: 0.0 | ||
|
|
||
| - name: Child aged 3 (eligible) | ||
| period: 2024 | ||
| input: | ||
| age: 3 | ||
| universal_childcare_entitlement_eligible: True | ||
| output: | ||
| universal_childcare_entitlement: 3351.60 | ||
|
|
||
| - name: Child aged 4 (eligible) | ||
| period: 2024 | ||
| input: | ||
| age: 4 | ||
| universal_childcare_entitlement_eligible: True | ||
| output: | ||
| universal_childcare_entitlement: 3351.60 | ||
|
|
||
| - name: Child aged 5 (ineligible) | ||
| period: 2024 | ||
| input: | ||
| age: 5 | ||
| universal_childcare_entitlement_eligible: False | ||
| output: | ||
| universal_childcare_entitlement: 0.0 | ||
39 changes: 39 additions & 0 deletions
39
...ine/gov/dfe/universal_childcare_entitlement/universal_childcare_entitlement_eligible.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| - name: Child aged 3 in England is eligible | ||
| period: 2024 | ||
| input: | ||
| age: 3 | ||
| country: ENGLAND | ||
| output: | ||
| universal_childcare_entitlement_eligible: True | ||
|
|
||
| - name: Child aged 3 in Scotland is not eligible | ||
| period: 2024 | ||
| input: | ||
| age: 3 | ||
| country: SCOTLAND | ||
| output: | ||
| universal_childcare_entitlement_eligible: False | ||
|
|
||
| - name: Child aged 3 in Wales is not eligible | ||
| period: 2024 | ||
| input: | ||
| age: 3 | ||
| country: WALES | ||
| output: | ||
| universal_childcare_entitlement_eligible: False | ||
|
|
||
| - name: Child aged 2 in England is not eligible | ||
| period: 2024 | ||
| input: | ||
| age: 2 | ||
| country: ENGLAND | ||
| output: | ||
| universal_childcare_entitlement_eligible: False | ||
|
|
||
| - name: Child aged 4 in England is eligible | ||
| period: 2024 | ||
| input: | ||
| age: 4 | ||
| country: ENGLAND | ||
| output: | ||
| universal_childcare_entitlement_eligible: True |
13 changes: 13 additions & 0 deletions
13
policyengine_uk/variables/gov/dfe/compulsory_education/is_of_compulsory_school_age.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| from policyengine_uk.model_api import * | ||
|
|
||
|
|
||
| class is_of_compulsory_school_age(Variable): | ||
| value_type = bool | ||
| entity = Person | ||
| label = "Whether the person is of compulsory school age" | ||
| definition_period = YEAR | ||
|
|
||
| def formula(person, period, parameters): | ||
| age = person("age", period) | ||
| p = parameters(period).gov.dfe | ||
| return p.compulsory_school_age.calc(age) |
16 changes: 16 additions & 0 deletions
16
...e_uk/variables/gov/dfe/universal_childcare_entitlement/universal_childcare_entitlement.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| from policyengine_uk.model_api import * | ||
|
|
||
|
|
||
| class universal_childcare_entitlement(Variable): | ||
| value_type = float | ||
| entity = Person | ||
| defined_for = "universal_childcare_entitlement_eligible" | ||
| label = "universal childcare entitlement amount per year" | ||
| definition_period = YEAR | ||
| unit = "currency-GBP" | ||
|
|
||
vahid-ahmadi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| def formula(person, period, parameters): | ||
| p = parameters(period).gov.dfe | ||
| age = person("age", period) | ||
| hours = p.universal_childcare_entitlement.hours | ||
| return hours * p.childcare_funding_rate.calc(age) | ||
23 changes: 23 additions & 0 deletions
23
...ables/gov/dfe/universal_childcare_entitlement/universal_childcare_entitlement_eligible.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| from policyengine_uk.model_api import * | ||
|
|
||
|
|
||
| class universal_childcare_entitlement_eligible(Variable): | ||
| value_type = bool | ||
| entity = Person | ||
| label = "eligible for universal childcare entitlement" | ||
| definition_period = YEAR | ||
|
|
||
| def formula(person, period, parameters): | ||
| country = person.household("country", period) | ||
| countries = country.possible_values | ||
| in_england = country == countries.ENGLAND | ||
| # Childcare (Early Years Provision Free of Charge) Regulations 2016 (part 33) | ||
| # The regulation above requires an "English local authority" to secure early years provision, limiting the entitlement to England. | ||
|
|
||
| age = person("age", period) | ||
| p = parameters(period).gov.dfe.universal_childcare_entitlement | ||
| meets_min_age = age >= p.min_age | ||
| not_compulsory_age = ~person("is_of_compulsory_school_age", period) | ||
| # Section 7 of the Childcare Act 2006 | ||
| # The regulation above limits free early years provision to children under compulsory school age. | ||
| return in_england & meets_min_age & not_compulsory_age |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.