-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from RuoqiTan/RuoqiTan/issue277
Yukon Government carbon price rebate - Individuals (YGCPRI)
- Loading branch information
Showing
12 changed files
with
216 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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,4 @@ | ||
- bump: minor | ||
changes: | ||
added: | ||
- Yukon Government carbon price rebate - Individuals (YGCPRI) |
15 changes: 15 additions & 0 deletions
15
policyengine_canada/parameters/gov/provinces/yt/benefits/rebates/ygcpri/amount/child.yaml
This file contains 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,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 |
15 changes: 15 additions & 0 deletions
15
policyengine_canada/parameters/gov/provinces/yt/benefits/rebates/ygcpri/amount/self.yaml
This file contains 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,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 |
15 changes: 15 additions & 0 deletions
15
policyengine_canada/parameters/gov/provinces/yt/benefits/rebates/ygcpri/amount/spouse.yaml
This file contains 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,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 |
9 changes: 9 additions & 0 deletions
9
...gine_canada/parameters/gov/provinces/yt/benefits/rebates/ygcpri/child_ineligible_age.yaml
This file contains 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,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 |
9 changes: 9 additions & 0 deletions
9
.../parameters/gov/provinces/yt/benefits/rebates/ygcpri/non_whitehorse_supplement/child.yaml
This file contains 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,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 |
9 changes: 9 additions & 0 deletions
9
...a/parameters/gov/provinces/yt/benefits/rebates/ygcpri/non_whitehorse_supplement/self.yaml
This file contains 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,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 |
9 changes: 9 additions & 0 deletions
9
...parameters/gov/provinces/yt/benefits/rebates/ygcpri/non_whitehorse_supplement/spouse.yaml
This file contains 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,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 |
This file contains 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 |
---|---|---|
|
@@ -20,4 +20,4 @@ | |
pension_and_savings_plan_income: 0 | ||
province_code: AB | ||
output: | ||
ab_pension_credit: 0 | ||
ab_pension_credit: 0 |
89 changes: 89 additions & 0 deletions
89
...e_canada/tests/gov/provinces/yt/tax/income/rebates/yt_government_carbon_price_rebate.yaml
This file contains 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,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 |
31 changes: 31 additions & 0 deletions
31
.../gov/provinces/yt/tax/income/benefits/rebates/ygcpri/yt_government_carbon_price_rebate.py
This file contains 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,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 |
10 changes: 10 additions & 0 deletions
10
policyengine_canada/variables/household/demographic/geographic/in_whitehorse.py
This file contains 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,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 |