Skip to content

Commit

Permalink
Merge pull request #278 from RuoqiTan/RuoqiTan/issue277
Browse files Browse the repository at this point in the history
Yukon Government carbon price rebate - Individuals (YGCPRI)
  • Loading branch information
MaxGhenis authored Jul 19, 2023
2 parents 60dbafe + 1c28cec commit 3d72a09
Show file tree
Hide file tree
Showing 12 changed files with 216 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Yukon Government carbon price rebate - Individuals (YGCPRI)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: Yukon provides this base amount for each child under the Yukon Government carbon price rebate (YGCPRI).
values:
2019-07-01: 86
2020-07-01: 192
2021-07-01: 176
2022-07-01: 320
2023-07-01: 372
metadata:
unit: currency-CAD
label: Yukon child YGCPRI base
reference:
- title: Yukon Government carbon price rebate - Individuals (YGCPRI)
href: https://www.canada.ca/en/revenue-agency/services/child-family-benefits/provincial-territorial-programs/yukon.html#YGCPRI
- title: Rebates for Yukon individuals
href: https://yukon.ca/en/carbon-rebate#rebates-for-yukon-individuals
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: Yukon provides this base amount for the individual filer under the Yukon Government carbon price rebate (YGCPRI).
values:
2019-07-01: 86
2020-07-01: 192
2021-07-01: 176
2022-07-01: 320
2023-07-01: 372
metadata:
unit: currency-CAD
label: Yukon individual YGCPRI base
reference:
- title: Yukon Government carbon price rebate - Individuals (YGCPRI)
href: https://www.canada.ca/en/revenue-agency/services/child-family-benefits/provincial-territorial-programs/yukon.html#YGCPRI
- title: Rebates for Yukon individuals
href: https://yukon.ca/en/carbon-rebate#rebates-for-yukon-individuals
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: Yukon provides this base amount for the spouse in Yukon Government carbon price rebate (YGCPRI).
values:
2019-07-01: 86
2020-07-01: 192
2021-07-01: 176
2022-07-01: 320
2023-07-01: 372
metadata:
unit: currency-CAD
label: Yukon spouse YGCPRI base
reference:
- title: Yukon Government carbon price rebate - Individuals (YGCPRI)
href: https://www.canada.ca/en/revenue-agency/services/child-family-benefits/provincial-territorial-programs/yukon.html#YGCPRI
- title: Rebates for Yukon individuals
href: https://yukon.ca/en/carbon-rebate#rebates-for-yukon-individuals
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: Yukon provides the Yukon Government Carbon Price Rebate - Individuals child element to people below this age.
values:
2023-01-01: 19
metadata:
unit: year
label: Yukon YGCPRI child ineligible age
reference:
- title: Yukon Government carbon price rebate - Individuals (YGCPRI)
href: https://www.canada.ca/en/revenue-agency/services/child-family-benefits/provincial-territorial-programs/yukon.html#YGCPRI
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: Yukon provides this remote supplement amount for each child if the household resides outside of Whitehorse under the YGCPRI.
values:
2023-01-01: 32
metadata:
unit: currency-CAD
label: Yukon child YGCPRI supplement
reference:
- title: Yukon Government carbon price rebate - Individuals (YGCPRI)
href: https://www.canada.ca/en/revenue-agency/services/child-family-benefits/provincial-territorial-programs/yukon.html#YGCPRI
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: Yukon provides this remote supplement amount for the individual if living outside of Whitehorse in YGCPRI
values:
2023-01-01: 32
metadata:
unit: currency-CAD
label: Yukon self YGCPRI supplement
reference:
- title: Yukon Government carbon price rebate - Individuals (YGCPRI)
href: https://www.canada.ca/en/revenue-agency/services/child-family-benefits/provincial-territorial-programs/yukon.html#YGCPRI
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: Yukon provides this remote supplement amount for the spouse if the household resides outside of Whitehorse under the YGCPRI.
values:
2023-01-01: 32
metadata:
unit: currency-CAD
label: Yukon spouse YGCPRI supplement
reference:
- title: Yukon Government carbon price rebate - Individuals (YGCPRI)
href: https://www.canada.ca/en/revenue-agency/services/child-family-benefits/provincial-territorial-programs/yukon.html#YGCPRI
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
pension_and_savings_plan_income: 0
province_code: AB
output:
ab_pension_credit: 0
ab_pension_credit: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
- name: 1 head + 1 spouse + 2 children + have supplement # 4 * (320+32) = 1408
period: 2023
input:
people:
head:
is_spouse: false
age: 40
spouse:
is_spouse: true
age: 40
child:
is_spouse: false
age: 10
child2:
is_spouse: false
age: 15
household:
members: [head, spouse, child, child2]
province_code: YT
in_whitehorse: false
output:
yt_government_carbon_price_rebate: 1_408

- name: 1 head + 1 spouse + 2 children + no supplement # 4 * 320 = 1280
period: 2023
input:
people:
head:
is_spouse: false
age: 40
spouse:
is_spouse: true
age: 40
child:
is_spouse: false
age: 5
child2:
is_spouse: false
age: 10
household:
members: [head, spouse, child, child2]
province_code: YT
in_whitehorse: true
output:
yt_government_carbon_price_rebate: 1_280

- name: 1 head + 0 spouse + 2 children + have supplement # 3 * (320+32) = 1056
period: 2023
input:
people:
head:
is_spouse: false
age: 40
child:
is_spouse: false
age: 13
child2:
is_spouse: false
age: 18
household:
members: [head, child, child2]
province_code: YT
in_whitehorse: false
output:
yt_government_carbon_price_rebate: 1_056

- name: 1 head + 0 spouse + 2 children + no supplement # 3 * 320 = 960
period: 2023
input:
people:
head:
is_spouse: false
age: 40
child:
is_spouse: false
age: 13
child2:
is_spouse: false
age: 15
child3:
is_spouse: false
age: 20

household:
members: [head, child, child2, child3]
province_code: YT
in_whitehorse: true
output:
yt_government_carbon_price_rebate: 960
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from policyengine_canada.model_api import *


class yt_government_carbon_price_rebate(Variable):
value_type = float
entity = Household
label = "Yukon government carbon price rebate"
unit = CAD
definition_period = YEAR
reference = "https://www.canada.ca/en/revenue-agency/services/child-family-benefits/provincial-territorial-programs/yukon.html#YGCPRI"
defined_for = ProvinceCode.YT

def formula(household, period, parameters):
p = parameters(period).gov.provinces.yt.benefits.rebates.ygcpri
person = household.members
child = person("age", period) < p.child_ineligible_age
children = household.sum(child)
spouse = person("is_spouse", period)
spouses = household.sum(spouse)
in_whitehorse = household("in_whitehorse", period)
non_whitehorse_supplement = ~in_whitehorse * (
(p.non_whitehorse_supplement.child * children)
+ (p.non_whitehorse_supplement.spouse * spouses)
+ p.non_whitehorse_supplement.self
)
base = (
(p.amount.child * children)
+ (p.amount.spouse * spouses)
+ p.amount.self
)
return base + non_whitehorse_supplement
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from policyengine_canada.model_api import *


class in_whitehorse(Variable):
value_type = bool
entity = Household
label = "Household that resides in Whitehorse"
unit = CAD
definition_period = YEAR
defined_for = ProvinceCode.YT

0 comments on commit 3d72a09

Please sign in to comment.