From c06a9940b1d1c3c5d175c97962d2cc093c9a475f Mon Sep 17 00:00:00 2001 From: Ziyu <91107507+ziyuliuzilla@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:11:37 +0000 Subject: [PATCH 01/10] Fixes #344 --- .../eligibility/income/chargeable_income.yaml | 12 ++++++++++++ .../eligibility/income/earned_income.yaml | 13 +++++++++++++ .../income/earned_income_exemption_rates.yaml | 19 +++++++++++++++++++ .../income/training_allowance_exempt.yaml | 9 +++++++++ .../eligibility/income/unearned_income.yaml | 15 +++++++++++++++ 5 files changed, 68 insertions(+) create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/chargeable_income.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/training_allowance_exempt.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/unearned_income.yaml diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/chargeable_income.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/chargeable_income.yaml new file mode 100644 index 000000000..eec260bbc --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/chargeable_income.yaml @@ -0,0 +1,12 @@ +description: The recipient's chargeable income consists of a specified monthly income from all the following sources. +values: + 2021-01-01: + - unearned_income + - fiduciary_income + - earned_income + - training_allowance +metadata: + unit: list + reference: + - title: Employment Support and Income Assistance Act, Section 32, Definitions (1) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml new file mode 100644 index 000000000..043010bc0 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml @@ -0,0 +1,13 @@ +description: “Earned income” includes all of the following. +values: + 2021-01-01: + - net_wages + - tips + - gratuities + - net_commissions + - net_business_income +metadata: + unit: list + reference: + - title: Employment Support and Income Assistance Act, Definitions + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates.yaml new file mode 100644 index 000000000..41fd005bc --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates.yaml @@ -0,0 +1,19 @@ +description: Earned income for a recipient is exempted in accordance with the following and the remainder is chargeable income. +brackets: + - threshold: + 2021-01-01: 0 + amount: + 2021-01-01: 2_000 + - threshold: + 2021-01-01: 2 + amount: + 2021-01-01: 4_000 +metadata: + type: single_amount + threshold_unit: people + amount_unit: currency-CAD + period: year + label: Nova Scotia Income Assistance asset limit + reference: + - title: Employment Support and Income Assistance Act, Section 21, Assets (26), (1) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/training_allowance_exempt.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/training_allowance_exempt.yaml new file mode 100644 index 000000000..fb2f396ec --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/training_allowance_exempt.yaml @@ -0,0 +1,9 @@ +description: A training allowance received by a recipient is chargeable income, except that the first $150 of the allowance is exempt. +values: + 2021-01-01: 150 +metadata: + unit: currency-CAD + label: Nova Scotia Training Allowance Exempt + reference: + - title: Employment Support and Income Assistance Act, Section 34, Definitions (2) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/unearned_income.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/unearned_income.yaml new file mode 100644 index 000000000..4446a7f5d --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/unearned_income.yaml @@ -0,0 +1,15 @@ +description: “Unearned income” includes all of the following. +values: + 2021-01-01: + - government_income_payments + - workers_compensation + - regular_periodic_insurance_payments + - mortgages_income + - spousal_support_payments + - superannuation + - investment_income +metadata: + unit: list + reference: + - title: Employment Support and Income Assistance Act, Definitions + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file From cd90ff453a5c70812cb5880902393ece31869d44 Mon Sep 17 00:00:00 2001 From: Ziyu <91107507+ziyuliuzilla@users.noreply.github.com> Date: Mon, 26 Jun 2023 12:07:36 +0000 Subject: [PATCH 02/10] Parameters & Variables --- .../eligibility/income/chargeable_income.yaml | 12 ------ .../eligibility/income/earned_income.yaml | 7 +--- .../income/earned_income_exemption_rates.yaml | 26 ++++++++----- ...rned_income_exemption_rates_supported.yaml | 27 +++++++++++++ ...rvest_connection_program_wages_exempt.yaml | 8 ++++ .../income/rent/chargeable_rent_base.yaml | 8 ++++ .../income/rent/live_with_boarders_rate.yaml | 8 ++++ .../rent/live_with_roomers_rate copy.yaml | 8 ++++ .../rent/rent_from_properties_rate.yaml | 8 ++++ .../income/training_allowance_exempt.yaml | 5 +-- .../eligibility/income/unearned_income.yaml | 10 ++--- .../income/ns_chargeable_earned_income.py | 23 +++++++++++ .../income/ns_chargeable_income.py | 24 ++++++++++++ .../income/ns_chargeable_rent_income.py | 39 +++++++++++++++++++ .../income/rent/boarders_living.py | 10 +++++ .../income/rent/rent_from_properties.py | 10 +++++ .../eligibility/income/rent/rent_income.py | 11 ++++++ .../eligibility/income/rent/roomers_living.py | 10 +++++ .../ns_harvest_connection_program_wages.py | 11 ++++++ .../ns/tax/income/ns_training_allowance.py | 11 ++++++ .../government_financial_assistance_income.py | 13 +++++++ .../income/individual/mortgage_income.py | 13 +++++++ .../individual/spousal_support_payments.py | 11 ++++++ .../income/individual/workers_compensation.py | 11 ++++++ 24 files changed, 290 insertions(+), 34 deletions(-) delete mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/chargeable_income.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates_supported.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/harvest_connection_program_wages_exempt.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/chargeable_rent_base.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_boarders_rate.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_roomers_rate copy.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties_rate.yaml create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_earned_income.py create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_income.py create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_rent_income.py create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/boarders_living.py create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_income.py create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/roomers_living.py create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/ns_harvest_connection_program_wages.py create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/ns_training_allowance.py create mode 100644 policyengine_canada/variables/household/income/individual/government_financial_assistance_income.py create mode 100644 policyengine_canada/variables/household/income/individual/mortgage_income.py create mode 100644 policyengine_canada/variables/household/income/individual/spousal_support_payments.py create mode 100644 policyengine_canada/variables/household/income/individual/workers_compensation.py diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/chargeable_income.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/chargeable_income.yaml deleted file mode 100644 index eec260bbc..000000000 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/chargeable_income.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: The recipient's chargeable income consists of a specified monthly income from all the following sources. -values: - 2021-01-01: - - unearned_income - - fiduciary_income - - earned_income - - training_allowance -metadata: - unit: list - reference: - - title: Employment Support and Income Assistance Act, Section 32, Definitions (1) - href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml index 043010bc0..5ba824de0 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml @@ -1,11 +1,8 @@ description: “Earned income” includes all of the following. values: 2021-01-01: - - net_wages - - tips - - gratuities - - net_commissions - - net_business_income + - employment_income + - self_employment_income metadata: unit: list reference: diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates.yaml index 41fd005bc..77ce1741c 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates.yaml @@ -1,19 +1,27 @@ -description: Earned income for a recipient is exempted in accordance with the following and the remainder is chargeable income. +description: Earned income is partially exempted, with the remainder considered chargeable under the Nova Scotia Income Assistance program. brackets: - threshold: 2021-01-01: 0 amount: - 2021-01-01: 2_000 + 2021-01-01: 0 + - threshold: + 2021-01-01: 250.01 + amount: + 2021-01-01: 0.25 + - threshold: + 2021-01-01: 500.01 + amount: + 2021-01-01: 0.5 - threshold: - 2021-01-01: 2 + 2021-01-01: 750.01 amount: - 2021-01-01: 4_000 + 2021-01-01: 0.75 metadata: - type: single_amount - threshold_unit: people - amount_unit: currency-CAD + type: marginal_rate + threshold_unit: currency-CAD + amount_unit: /1 period: year - label: Nova Scotia Income Assistance asset limit + label: Nova Scotia Income Assistance earned income exemption rates reference: - - title: Employment Support and Income Assistance Act, Section 21, Assets (26), (1) + - title: Employment Support and Income Assistance Act, Section 33, (1) href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates_supported.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates_supported.yaml new file mode 100644 index 000000000..4a33bcad1 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates_supported.yaml @@ -0,0 +1,27 @@ +description: Earned income is partially exempted, with the remainder considered chargeable for supported employement under the Nova Scotia Income Assistance program. +brackets: + - threshold: + 2021-01-01: 0 + amount: + 2021-01-01: 0 + - threshold: + 2021-01-01: 350.01 + amount: + 2021-01-01: 0.25 + - threshold: + 2021-01-01: 500.01 + amount: + 2021-01-01: 0.5 + - threshold: + 2021-01-01: 750.01 + amount: + 2021-01-01: 0.75 +metadata: + type: marginal_rate + threshold_unit: currency-CAD + amount_unit: /1 + period: year + label: Nova Scotia Income Assistance earned income exemption rates for supported employment + reference: + - title: Employment Support and Income Assistance Act, Section 33, (2) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/harvest_connection_program_wages_exempt.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/harvest_connection_program_wages_exempt.yaml new file mode 100644 index 000000000..787d990bb --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/harvest_connection_program_wages_exempt.yaml @@ -0,0 +1,8 @@ +description: Nova Scotia exempts the following chargeable income under the Income Assistance program. + 2021-01-01: 3_000 +metadata: + unit: currency-CAD + label: Nova Scotia Income Assistance harvest connection program wages exemption + reference: + - title: Employment Support and Income Assistance Act, Section 36 + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/chargeable_rent_base.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/chargeable_rent_base.yaml new file mode 100644 index 000000000..9b8ca40b1 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/chargeable_rent_base.yaml @@ -0,0 +1,8 @@ +description: Nova Scotia sets minimum chargeable rent income under Income Assistance program. + 2021-01-01: 600 +metadata: + unit: currency-CAD + label: Nova Scotia Income Assistance chargeable rent from boarders + reference: + - title: Employment Support and Income Assistance Act, Section 32 + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_boarders_rate.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_boarders_rate.yaml new file mode 100644 index 000000000..cda56c758 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_boarders_rate.yaml @@ -0,0 +1,8 @@ +description: Nova Scotia considers a percentage of rent as chargeable income when recipients live with boarders under the Income Assistance program. + 2021-01-01: 0.25 +metadata: + unit: /1 + label: Nova Scotia Income Assistance chargeable rent from boarders + reference: + - title: Employment Support and Income Assistance Act, Section 32, (e) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_roomers_rate copy.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_roomers_rate copy.yaml new file mode 100644 index 000000000..02019614a --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_roomers_rate copy.yaml @@ -0,0 +1,8 @@ +description: Nova Scotia considers a percentage of rent as chargeable income when recipients live with roomers under the Income Assistance program. + 2021-01-01: 0.7 +metadata: + unit: /1 + label: Nova Scotia Income Assistance chargeable rent from boarders + reference: + - title: Employment Support and Income Assistance Act, Section 32, (f) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties_rate.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties_rate.yaml new file mode 100644 index 000000000..88f16f372 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties_rate.yaml @@ -0,0 +1,8 @@ +description: Nova Scotia considers a percentage of rent as chargeable income when recipients receive rent from properties under the Income Assistance program. + 2021-01-01: 0.7 +metadata: + unit: /1 + label: Nova Scotia Income Assistance chargeable rent from properties + reference: + - title: Employment Support and Income Assistance Act, Section 32, (g) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/training_allowance_exempt.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/training_allowance_exempt.yaml index fb2f396ec..156d740a2 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/training_allowance_exempt.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/training_allowance_exempt.yaml @@ -1,9 +1,8 @@ -description: A training allowance received by a recipient is chargeable income, except that the first $150 of the allowance is exempt. -values: +description: Nova Scotia exempts the following chargeable income under the Income Assistance program. 2021-01-01: 150 metadata: unit: currency-CAD - label: Nova Scotia Training Allowance Exempt + label: Nova Scotia Income Assistance training allowance exemption reference: - title: Employment Support and Income Assistance Act, Section 34, Definitions (2) href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/unearned_income.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/unearned_income.yaml index 4446a7f5d..264000f98 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/unearned_income.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/unearned_income.yaml @@ -1,12 +1,12 @@ -description: “Unearned income” includes all of the following. +description: Nova Scotia exempts the following unearned income under the Income Assistance program. values: 2021-01-01: - - government_income_payments + - government_financial_assistance_payments - workers_compensation - - regular_periodic_insurance_payments - - mortgages_income + - benefits_income + - mortgage_income - spousal_support_payments - - superannuation + - pension_and_savings_plan_income - investment_income metadata: unit: list diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_earned_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_earned_income.py new file mode 100644 index 000000000..db116f8e5 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_earned_income.py @@ -0,0 +1,23 @@ +from policyengine_canada.model_api import * + + +class ns_chargeable_earned_income(Variable): + value_type = float + entity = Person + label = "Nova Scotia Income Assistance chargeable earned income" + unit = CAD + definition_period = YEAR + reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + defined_for = ProvinceCode.NS + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.ns.tax.income.income_assistance.eligibility.income + is_disabled = person('is_disabled', period) + earned_income = p.earned_income + chargeable_earned_income = p.earned_income_exemption_rates.calc(earned_income) + # chargeable earned income for general employment + chargeable_earned_income_supported = p.earned_income_exemption_rates_supported.calc(earned_income) + # chargeable earned income for supported employment + return (is_disabled, chargeable_earned_income_supported, chargeable_earned_income) diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_income.py new file mode 100644 index 000000000..67dd4877b --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_income.py @@ -0,0 +1,24 @@ +from policyengine_canada.model_api import * + + +class ns_chargeable_income(Variable): + value_type = float + entity = Person + label = "Nova Scotia Income Assistance chargeable income" + unit = CAD + definition_period = YEAR + reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + defined_for = ProvinceCode.NS + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.ns.tax.income.income_assistance.eligibility.income + earned_income = person('ns_chargeable_earned_income', period) + rent_received = person('ns_chargeable_rent_income', period) + training_allowance = person('ns_training_allowance', period) + net_training_allowance = max_(0, (training_allowance - p.training_allowance_exempt)) + harvest_connection_program_wages = person('ns_harvest_connection_program_wages', period) + net_harvest_connection_program_wages= max_(0, (harvest_connection_program_wages - p.harvest_connection_program_wages_exempt)) + + return p.unearned_income + earned_income + rent_received + net_training_allowance + net_harvest_connection_program_wages diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_rent_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_rent_income.py new file mode 100644 index 000000000..ff58f529d --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_rent_income.py @@ -0,0 +1,39 @@ +from policyengine_canada.model_api import * + + +class ns_chargeable_rent_income(Variable): + value_type = float + entity = Person + label = "Nova Scotia Income Assistance rent received" + unit = CAD + definition_period = YEAR + reference = "https://novascotia.ca/employmentnovascotia/programs/documents/Skills_Development_Guidelines.pdf" + defined_for = ProvinceCode.NS + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.ns.tax.income.income_assistance.eligibility.income.rent + base = p.chargeable_rent_base + boarders_living = person("boarders_living", period) + roomers_living = person("roomers_living", period) + rent_from_properties = person("rent_from_properties", period) + rent_income = person("rent_income", period) + # Define the conditions and corresponding values + conditions = [ + boarders_living > 0, + roomers_living > 0, + rent_from_properties > 0 + ] + + values = [ + max_(base, (rent_income * p.live_with_boarders_rate)), # for living with boarders + max_(base, (rent_income * p.live_with_roomers_rate)), # for living with roomers + (rent_income * p.rent_from_properties_rate) # for rent from properties + ] + + # Calculate the chargeable rent income based on the conditions + chargeable_rent_income = np.select(conditions, values, default=2) + + return chargeable_rent_income + diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/boarders_living.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/boarders_living.py new file mode 100644 index 000000000..03ba59608 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/boarders_living.py @@ -0,0 +1,10 @@ +from policyengine_canada.model_api import * + + +class boarders_living(Variable): + value_type = bool + entity = Person + label = "boarders living" + definition_period = YEAR + reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + defined_for = ProvinceCode.NS \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py new file mode 100644 index 000000000..04b935f8c --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py @@ -0,0 +1,10 @@ +from policyengine_canada.model_api import * + + +class rent_from_properties(Variable): + value_type = bool + entity = Person + label = "rent from properties" + definition_period = YEAR + reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + defined_for = ProvinceCode.NS \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_income.py new file mode 100644 index 000000000..777b16650 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_income.py @@ -0,0 +1,11 @@ +from policyengine_canada.model_api import * + + +class rent_income(Variable): + value_type = float + entity = Person + label = "Rent income" + unit = CAD + documentation = "Money received from the rental or leasing of property" + definition_period = YEAR + reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/roomers_living.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/roomers_living.py new file mode 100644 index 000000000..868d78ebb --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/roomers_living.py @@ -0,0 +1,10 @@ +from policyengine_canada.model_api import * + + +class roomers_living(Variable): + value_type = bool + entity = Person + label = "roomers living" + definition_period = YEAR + reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + defined_for = ProvinceCode.NS \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/ns_harvest_connection_program_wages.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/ns_harvest_connection_program_wages.py new file mode 100644 index 000000000..661ad6e42 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/ns_harvest_connection_program_wages.py @@ -0,0 +1,11 @@ +from policyengine_canada.model_api import * + + +class ns_harvest_connection_program_wages(Variable): + value_type = float + entity = Person + label = "Nova Scotia harvest connection program wages" + unit = CAD + definition_period = YEAR + reference = "https://novascotia.ca/coms/employment/income_assistance/HarvestConnectionProgram.html" + defined_for = ProvinceCode.NS diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/ns_training_allowance.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/ns_training_allowance.py new file mode 100644 index 000000000..35aab6aec --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/ns_training_allowance.py @@ -0,0 +1,11 @@ +from policyengine_canada.model_api import * + + +class ns_training_allowance(Variable): + value_type = float + entity = Person + label = "Nova Scotia training allowance" + unit = CAD + definition_period = YEAR + reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + defined_for = ProvinceCode.NS diff --git a/policyengine_canada/variables/household/income/individual/government_financial_assistance_income.py b/policyengine_canada/variables/household/income/individual/government_financial_assistance_income.py new file mode 100644 index 000000000..48b8d899f --- /dev/null +++ b/policyengine_canada/variables/household/income/individual/government_financial_assistance_income.py @@ -0,0 +1,13 @@ +from policyengine_canada.model_api import * + + +class government_financial_assistance_payments(Variable): + value_type = float + entity = Person + label = "Government financial assistance payments" + unit = CAD + documentation = ( + "Income from financial assistance provided by the government" + ) + definition_period = YEAR + reference = "" diff --git a/policyengine_canada/variables/household/income/individual/mortgage_income.py b/policyengine_canada/variables/household/income/individual/mortgage_income.py new file mode 100644 index 000000000..beb8079f5 --- /dev/null +++ b/policyengine_canada/variables/household/income/individual/mortgage_income.py @@ -0,0 +1,13 @@ +from policyengine_canada.model_api import * + + +class mortgage_income(Variable): + value_type = float + entity = Person + label = "Mortgage income" + unit = CAD + documentation = ( + "Revenue generated by individuals through lending money to borrowers in the form of mortgages" + ) + definition_period = YEAR + reference = "" diff --git a/policyengine_canada/variables/household/income/individual/spousal_support_payments.py b/policyengine_canada/variables/household/income/individual/spousal_support_payments.py new file mode 100644 index 000000000..e1b710549 --- /dev/null +++ b/policyengine_canada/variables/household/income/individual/spousal_support_payments.py @@ -0,0 +1,11 @@ +from policyengine_canada.model_api import * + + +class spousal_support_payments(Variable): + value_type = float + entity = Person + label = "Spousal support payments" + unit = CAD + documentation = "Money paid by one spouse to the other after they separate or divorce" + definition_period = YEAR + reference = "https://www.canada.ca/en/revenue-agency/services/forms-publications/publications/p102/support-payments.html" diff --git a/policyengine_canada/variables/household/income/individual/workers_compensation.py b/policyengine_canada/variables/household/income/individual/workers_compensation.py new file mode 100644 index 000000000..4c2bcd5b1 --- /dev/null +++ b/policyengine_canada/variables/household/income/individual/workers_compensation.py @@ -0,0 +1,11 @@ +from policyengine_canada.model_api import * + + +class workers_compensation(Variable): + value_type = float + entity = Person + label = "Worker's compensation" + unit = CAD + documentation = "Insurance for work-related injuries and illnesses, providing cash benefits and medical care" + definition_period = YEAR + reference = "https://www.tbs-sct.canada.ca/pol/doc-eng.aspx?id=12143" From 5d2c4c0ab3de6411853a0086d0f4128b65c13a5f Mon Sep 17 00:00:00 2001 From: Ziyu <91107507+ziyuliuzilla@users.noreply.github.com> Date: Wed, 19 Jul 2023 21:09:23 +0000 Subject: [PATCH 03/10] Test on rent income --- changelog_entry.yaml | 1 + .../eligibility/income/earned_income.yaml | 2 +- ...ml => earned_income_chargeable_rates.yaml} | 2 +- ...ned_income_chargeable_rates_disabled.yaml} | 6 +- ...rvest_connection_program_wages_exempt.yaml | 5 +- .../income/rent/chargeable_rent_base.yaml | 5 +- .../income/rent/live_with_boarders_rate.yaml | 5 +- ... copy.yaml => live_with_roomers_rate.yaml} | 5 +- .../rent/rent_from_properties_rate.yaml | 5 +- .../income/student_chargeable_income/age.yaml | 24 +++++++ .../calendar_month.yaml | 9 +++ .../exempt_month.yaml | 9 +++ .../income/training_allowance_exempt.yaml | 5 +- .../eligibility/income/unearned_income.yaml | 2 +- .../credits/pension/ab_pension_credit.yaml | 2 +- .../rent/ns_chargeable_rent_income.yaml | 69 +++++++++++++++++++ .../income/ns_chargeable_earned_income.py | 26 ++++--- .../income/ns_chargeable_income.py | 34 ++++++--- .../income/ns_chargeable_rent_income.py | 39 ----------- .../income/rent/boarders_living.py | 10 --- .../income/rent/ns_chargeable_rent_income.py | 41 +++++++++++ .../income/rent/rent_from_boarders.py | 13 ++++ .../income/rent/rent_from_properties.py | 11 +-- .../income/rent/rent_from_roomers.py | 13 ++++ .../eligibility/income/rent/rent_income.py | 11 --- .../eligibility/income/rent/roomers_living.py | 10 --- .../ns/tax/income/ns_training_allowance.py | 4 +- .../government_financial_assistance_income.py | 4 +- .../income/individual/mortgage_income.py | 5 +- .../individual/spousal_support_payments.py | 4 +- 30 files changed, 265 insertions(+), 116 deletions(-) rename policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/{earned_income_exemption_rates.yaml => earned_income_chargeable_rates.yaml} (98%) rename policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/{earned_income_exemption_rates_supported.yaml => earned_income_chargeable_rates_disabled.yaml} (82%) rename policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/{live_with_roomers_rate copy.yaml => live_with_roomers_rate.yaml} (62%) create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/age.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/calendar_month.yaml create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/exempt_month.yaml create mode 100644 policyengine_canada/tests/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.yaml delete mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_rent_income.py delete mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/boarders_living.py create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_roomers.py delete mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_income.py delete mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/roomers_living.py diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..8b1378917 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1 @@ + diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml index 5ba824de0..3fa2ac227 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml @@ -7,4 +7,4 @@ metadata: unit: list reference: - title: Employment Support and Income Assistance Act, Definitions - href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates.yaml similarity index 98% rename from policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates.yaml rename to policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates.yaml index 77ce1741c..49f1a5141 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates.yaml @@ -24,4 +24,4 @@ metadata: label: Nova Scotia Income Assistance earned income exemption rates reference: - title: Employment Support and Income Assistance Act, Section 33, (1) - href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates_supported.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates_disabled.yaml similarity index 82% rename from policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates_supported.yaml rename to policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates_disabled.yaml index 4a33bcad1..1bff417e2 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_exemption_rates_supported.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates_disabled.yaml @@ -1,4 +1,4 @@ -description: Earned income is partially exempted, with the remainder considered chargeable for supported employement under the Nova Scotia Income Assistance program. +description: Earned income is partially exempted, with the remainder considered chargeable for disabled employement under the Nova Scotia Income Assistance program. brackets: - threshold: 2021-01-01: 0 @@ -21,7 +21,7 @@ metadata: threshold_unit: currency-CAD amount_unit: /1 period: year - label: Nova Scotia Income Assistance earned income exemption rates for supported employment + label: Nova Scotia Income Assistance earned income exemption rates for disabled employment reference: - title: Employment Support and Income Assistance Act, Section 33, (2) - href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/harvest_connection_program_wages_exempt.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/harvest_connection_program_wages_exempt.yaml index 787d990bb..9093571ae 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/harvest_connection_program_wages_exempt.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/harvest_connection_program_wages_exempt.yaml @@ -1,8 +1,9 @@ description: Nova Scotia exempts the following chargeable income under the Income Assistance program. +values: 2021-01-01: 3_000 metadata: unit: currency-CAD label: Nova Scotia Income Assistance harvest connection program wages exemption reference: - - title: Employment Support and Income Assistance Act, Section 36 - href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file + - title: Employment Support and Income Assistance Act, Section 36 + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/chargeable_rent_base.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/chargeable_rent_base.yaml index 9b8ca40b1..c2819b1d7 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/chargeable_rent_base.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/chargeable_rent_base.yaml @@ -1,8 +1,9 @@ description: Nova Scotia sets minimum chargeable rent income under Income Assistance program. +values: 2021-01-01: 600 metadata: unit: currency-CAD label: Nova Scotia Income Assistance chargeable rent from boarders reference: - - title: Employment Support and Income Assistance Act, Section 32 - href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file + - title: Employment Support and Income Assistance Act, Section 32 + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_boarders_rate.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_boarders_rate.yaml index cda56c758..3ec1831d2 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_boarders_rate.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_boarders_rate.yaml @@ -1,8 +1,9 @@ description: Nova Scotia considers a percentage of rent as chargeable income when recipients live with boarders under the Income Assistance program. +values: 2021-01-01: 0.25 metadata: unit: /1 label: Nova Scotia Income Assistance chargeable rent from boarders reference: - - title: Employment Support and Income Assistance Act, Section 32, (e) - href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file + - title: Employment Support and Income Assistance Act, Section 32, (e) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_roomers_rate copy.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_roomers_rate.yaml similarity index 62% rename from policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_roomers_rate copy.yaml rename to policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_roomers_rate.yaml index 02019614a..2bd8579c9 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_roomers_rate copy.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/live_with_roomers_rate.yaml @@ -1,8 +1,9 @@ description: Nova Scotia considers a percentage of rent as chargeable income when recipients live with roomers under the Income Assistance program. +values: 2021-01-01: 0.7 metadata: unit: /1 label: Nova Scotia Income Assistance chargeable rent from boarders reference: - - title: Employment Support and Income Assistance Act, Section 32, (f) - href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file + - title: Employment Support and Income Assistance Act, Section 32, (f) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties_rate.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties_rate.yaml index 88f16f372..42b234dad 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties_rate.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties_rate.yaml @@ -1,8 +1,9 @@ description: Nova Scotia considers a percentage of rent as chargeable income when recipients receive rent from properties under the Income Assistance program. +values: 2021-01-01: 0.7 metadata: unit: /1 label: Nova Scotia Income Assistance chargeable rent from properties reference: - - title: Employment Support and Income Assistance Act, Section 32, (g) - href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file + - title: Employment Support and Income Assistance Act, Section 32, (g) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/age.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/age.yaml new file mode 100644 index 000000000..5afda2f02 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/age.yaml @@ -0,0 +1,24 @@ +description: Aged 16 to 21, attending an approved educational program qualifies for student chargeable income under Nova Scotia Income Assistance. +brackets: + - threshold: + 2021-01-01: 0 + amount: + 2021-01-01: 0 + - threshold: + 2021-01-01: 16 + amount: + 2021-01-01: 1 + - threshold: + 2021-01-01: 21 + amount: + 2021-01-01: 0 + +metadata: + type: single_amount + threshold_unit: year + amount_unit: /1 + period: year + label: Nova Scotia Income Assistance student chargeable income age + reference: + - title: Employment Support and Income Assistance Act, Section 33 + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/calendar_month.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/calendar_month.yaml new file mode 100644 index 000000000..c36d4755e --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/calendar_month.yaml @@ -0,0 +1,9 @@ +description: Under Income Assistance, full-time employment income is chargeable for a standard duration of 12 months per year by default. +values: + 2021-01-01: 12 +metadata: + unit: month + label: Income Assistance default chargeable month for full-time employment + reference: + - title: Employment Support and Income Assistance Act, Section 33, (3) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/exempt_month.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/exempt_month.yaml new file mode 100644 index 000000000..f3daef905 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/exempt_month.yaml @@ -0,0 +1,9 @@ +description: Full-time employment income is non-chargeable for qualified Nova Scotia students under Income Assistance for 3 months per year. +values: + 2021-01-01: 3 +metadata: + unit: month + label: Income Assistance non-chargeable employment month for NS student + reference: + - title: Employment Support and Income Assistance Act, Section 33, (3) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/training_allowance_exempt.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/training_allowance_exempt.yaml index 156d740a2..f0b797271 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/training_allowance_exempt.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/training_allowance_exempt.yaml @@ -1,8 +1,9 @@ description: Nova Scotia exempts the following chargeable income under the Income Assistance program. +values: 2021-01-01: 150 metadata: unit: currency-CAD label: Nova Scotia Income Assistance training allowance exemption reference: - - title: Employment Support and Income Assistance Act, Section 34, Definitions (2) - href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file + - title: Employment Support and Income Assistance Act, Section 34, Definitions (2) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/unearned_income.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/unearned_income.yaml index 264000f98..fdfd52aa0 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/unearned_income.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/unearned_income.yaml @@ -12,4 +12,4 @@ metadata: unit: list reference: - title: Employment Support and Income Assistance Act, Definitions - href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 \ No newline at end of file + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml b/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml index e3c23fabd..a9faa8c92 100644 --- a/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml +++ b/policyengine_canada/tests/gov/provinces/ab/tax/income/credits/pension/ab_pension_credit.yaml @@ -20,4 +20,4 @@ pension_and_savings_plan_income: 0 province_code: AB output: - ab_pension_credit: 0 \ No newline at end of file + ab_pension_credit: 0 diff --git a/policyengine_canada/tests/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.yaml b/policyengine_canada/tests/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.yaml new file mode 100644 index 000000000..e538ed468 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.yaml @@ -0,0 +1,69 @@ +- name: Nova Scotia Income Assistance chargeable rent income; with 0 from roomers and properties + period: 2023 + input: + province_code: NS + rent_from_boarders: 3_000 + rent_from_roomers: 0 + rent_from_properties: 0 + output: + ns_chargeable_rent_income: 750 + +- name: Nova Scotia Income Assistance chargeable rent income; with 0 from roomers and properties; lower than rent base + period: 2023 + input: + province_code: NS + rent_from_boarders: 2_399 + rent_from_roomers: 0 + rent_from_properties: 0 + output: + ns_chargeable_rent_income: 600 + +- name: Nova Scotia Income Assistance chargeable rent income; with 0 from boarders and properties + period: 2023 + input: + province_code: NS + rent_from_boarders: 0 + rent_from_roomers: 1_000 + rent_from_properties: 0 + output: + ns_chargeable_rent_income: 700 + +- name: Nova Scotia Income Assistance chargeable rent income; with 0 from boarders and properties; lower than rent base + period: 2023 + input: + province_code: NS + rent_from_boarders: 0 + rent_from_roomers: 800 + rent_from_properties: 0 + output: + ns_chargeable_rent_income: 600 + +- name: Nova Scotia Income Assistance chargeable rent income; with 0 from roomers and boarders + period: 2023 + input: + province_code: NS + rent_from_boarders: 0 + rent_from_roomers: 0 + rent_from_properties: 1_000 + output: + ns_chargeable_rent_income: 700 + +- name: Nova Scotia Income Assistance chargeable rent income + period: 2023 + input: + province_code: NS + rent_from_boarders: 3_000 + rent_from_roomers: 1_000 + rent_from_properties: 1_000 + output: + ns_chargeable_rent_income: 2_150 + +- name: Nova Scotia Income Assistance chargeable rent income; lower than rent base + period: 2023 + input: + province_code: NS + rent_from_boarders: 2_399 + rent_from_roomers: 800 + rent_from_properties: 0 + output: + ns_chargeable_rent_income: 1_200 diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_earned_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_earned_income.py index db116f8e5..86baaa275 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_earned_income.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_earned_income.py @@ -7,17 +7,27 @@ class ns_chargeable_earned_income(Variable): label = "Nova Scotia Income Assistance chargeable earned income" unit = CAD definition_period = YEAR - reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + reference = ( + "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + ) defined_for = ProvinceCode.NS def formula(person, period, parameters): p = parameters( period ).gov.provinces.ns.tax.income.income_assistance.eligibility.income - is_disabled = person('is_disabled', period) - earned_income = p.earned_income - chargeable_earned_income = p.earned_income_exemption_rates.calc(earned_income) - # chargeable earned income for general employment - chargeable_earned_income_supported = p.earned_income_exemption_rates_supported.calc(earned_income) - # chargeable earned income for supported employment - return (is_disabled, chargeable_earned_income_supported, chargeable_earned_income) + is_disabled = person("is_disabled", period) + earned_income = p.earned_income + chargeable_earned_income = p.earned_income_exemption_rates.calc( + earned_income + ) + # chargeable earned income for general employment + chargeable_earned_income_supported = ( + p.earned_income_exemption_rates_supported.calc(earned_income) + ) + # chargeable earned income for supported employment + return ( + is_disabled, + chargeable_earned_income_supported, + chargeable_earned_income, + ) diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_income.py index 67dd4877b..694a9e36b 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_income.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_income.py @@ -7,18 +7,36 @@ class ns_chargeable_income(Variable): label = "Nova Scotia Income Assistance chargeable income" unit = CAD definition_period = YEAR - reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + reference = ( + "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + ) defined_for = ProvinceCode.NS def formula(person, period, parameters): p = parameters( period ).gov.provinces.ns.tax.income.income_assistance.eligibility.income - earned_income = person('ns_chargeable_earned_income', period) - rent_received = person('ns_chargeable_rent_income', period) - training_allowance = person('ns_training_allowance', period) - net_training_allowance = max_(0, (training_allowance - p.training_allowance_exempt)) - harvest_connection_program_wages = person('ns_harvest_connection_program_wages', period) - net_harvest_connection_program_wages= max_(0, (harvest_connection_program_wages - p.harvest_connection_program_wages_exempt)) + earned_income = person("ns_chargeable_earned_income", period) + rent_received = person("ns_chargeable_rent_income", period) + training_allowance = person("ns_training_allowance", period) + net_training_allowance = max_( + 0, (training_allowance - p.training_allowance_exempt) + ) + harvest_connection_program_wages = person( + "ns_harvest_connection_program_wages", period + ) + net_harvest_connection_program_wages = max_( + 0, + ( + harvest_connection_program_wages + - p.harvest_connection_program_wages_exempt + ), + ) - return p.unearned_income + earned_income + rent_received + net_training_allowance + net_harvest_connection_program_wages + return ( + p.unearned_income + + earned_income + + rent_received + + net_training_allowance + + net_harvest_connection_program_wages + ) diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_rent_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_rent_income.py deleted file mode 100644 index ff58f529d..000000000 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_rent_income.py +++ /dev/null @@ -1,39 +0,0 @@ -from policyengine_canada.model_api import * - - -class ns_chargeable_rent_income(Variable): - value_type = float - entity = Person - label = "Nova Scotia Income Assistance rent received" - unit = CAD - definition_period = YEAR - reference = "https://novascotia.ca/employmentnovascotia/programs/documents/Skills_Development_Guidelines.pdf" - defined_for = ProvinceCode.NS - - def formula(person, period, parameters): - p = parameters( - period - ).gov.provinces.ns.tax.income.income_assistance.eligibility.income.rent - base = p.chargeable_rent_base - boarders_living = person("boarders_living", period) - roomers_living = person("roomers_living", period) - rent_from_properties = person("rent_from_properties", period) - rent_income = person("rent_income", period) - # Define the conditions and corresponding values - conditions = [ - boarders_living > 0, - roomers_living > 0, - rent_from_properties > 0 - ] - - values = [ - max_(base, (rent_income * p.live_with_boarders_rate)), # for living with boarders - max_(base, (rent_income * p.live_with_roomers_rate)), # for living with roomers - (rent_income * p.rent_from_properties_rate) # for rent from properties - ] - - # Calculate the chargeable rent income based on the conditions - chargeable_rent_income = np.select(conditions, values, default=2) - - return chargeable_rent_income - diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/boarders_living.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/boarders_living.py deleted file mode 100644 index 03ba59608..000000000 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/boarders_living.py +++ /dev/null @@ -1,10 +0,0 @@ -from policyengine_canada.model_api import * - - -class boarders_living(Variable): - value_type = bool - entity = Person - label = "boarders living" - definition_period = YEAR - reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" - defined_for = ProvinceCode.NS \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py new file mode 100644 index 000000000..5fe16b624 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py @@ -0,0 +1,41 @@ +from policyengine_canada.model_api import * + + +class ns_chargeable_rent_income(Variable): + value_type = float + entity = Person + label = "Nova Scotia Income Assistance chargeable rent income" + unit = CAD + definition_period = YEAR + reference = "https://novascotia.ca/employmentnovascotia/programs/documents/Skills_Development_Guidelines.pdf" + defined_for = ProvinceCode.NS + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.ns.tax.income.income_assistance.eligibility.income.rent + base = p.chargeable_rent_base + boarder_rent = person("rent_from_boarders", period) + boarder_rent_rate = boarder_rent * p.live_with_boarders_rate + roomers_rent = person("rent_from_roomers", period) + roomers_rent_rate = roomers_rent * p.live_with_roomers_rate + properties_rent = person("rent_from_properties", period) + amount_with_boarders = where( + boarder_rent > 0, + max_(base, boarder_rent_rate), + 0, + ) + amount_with_roomers = where( + roomers_rent > 0, + max_(base, roomers_rent_rate), + 0, + ) + amount_with_properties = where( + properties_rent > 0, + properties_rent * p.rent_from_properties_rate, + 0, + ) + + return ( + amount_with_boarders + amount_with_roomers + amount_with_properties + ) diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py new file mode 100644 index 000000000..86a254ac7 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py @@ -0,0 +1,13 @@ +from policyengine_canada.model_api import * + + +class rent_from_boarders(Variable): + value_type = float + entity = Person + label = "rent income from boarders living" + unit = CAD + documentation = "rent income received from boarders living" + definition_period = YEAR + reference = ( + "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + ) diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py index 04b935f8c..cb7a5169e 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py @@ -2,9 +2,12 @@ class rent_from_properties(Variable): - value_type = bool + value_type = float entity = Person - label = "rent from properties" + label = "rent income from properties" + unit = CAD + documentation = "rent income received from properties" definition_period = YEAR - reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" - defined_for = ProvinceCode.NS \ No newline at end of file + reference = ( + "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + ) diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_roomers.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_roomers.py new file mode 100644 index 000000000..d3c1073d9 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_roomers.py @@ -0,0 +1,13 @@ +from policyengine_canada.model_api import * + + +class rent_from_roomers(Variable): + value_type = float + entity = Person + label = "rent income from roomers living" + unit = CAD + documentation = "rent income received from roomers living" + definition_period = YEAR + reference = ( + "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + ) diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_income.py deleted file mode 100644 index 777b16650..000000000 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_income.py +++ /dev/null @@ -1,11 +0,0 @@ -from policyengine_canada.model_api import * - - -class rent_income(Variable): - value_type = float - entity = Person - label = "Rent income" - unit = CAD - documentation = "Money received from the rental or leasing of property" - definition_period = YEAR - reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/roomers_living.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/roomers_living.py deleted file mode 100644 index 868d78ebb..000000000 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/roomers_living.py +++ /dev/null @@ -1,10 +0,0 @@ -from policyengine_canada.model_api import * - - -class roomers_living(Variable): - value_type = bool - entity = Person - label = "roomers living" - definition_period = YEAR - reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" - defined_for = ProvinceCode.NS \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/ns_training_allowance.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/ns_training_allowance.py index 35aab6aec..219a231d8 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/ns_training_allowance.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/ns_training_allowance.py @@ -7,5 +7,7 @@ class ns_training_allowance(Variable): label = "Nova Scotia training allowance" unit = CAD definition_period = YEAR - reference = "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + reference = ( + "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + ) defined_for = ProvinceCode.NS diff --git a/policyengine_canada/variables/household/income/individual/government_financial_assistance_income.py b/policyengine_canada/variables/household/income/individual/government_financial_assistance_income.py index 48b8d899f..5d11fa2de 100644 --- a/policyengine_canada/variables/household/income/individual/government_financial_assistance_income.py +++ b/policyengine_canada/variables/household/income/individual/government_financial_assistance_income.py @@ -10,4 +10,6 @@ class government_financial_assistance_payments(Variable): "Income from financial assistance provided by the government" ) definition_period = YEAR - reference = "" + reference = ( + "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + ) diff --git a/policyengine_canada/variables/household/income/individual/mortgage_income.py b/policyengine_canada/variables/household/income/individual/mortgage_income.py index beb8079f5..4669b1077 100644 --- a/policyengine_canada/variables/household/income/individual/mortgage_income.py +++ b/policyengine_canada/variables/household/income/individual/mortgage_income.py @@ -6,8 +6,5 @@ class mortgage_income(Variable): entity = Person label = "Mortgage income" unit = CAD - documentation = ( - "Revenue generated by individuals through lending money to borrowers in the form of mortgages" - ) + documentation = "Revenue generated by individuals through lending money to borrowers in the form of mortgages" definition_period = YEAR - reference = "" diff --git a/policyengine_canada/variables/household/income/individual/spousal_support_payments.py b/policyengine_canada/variables/household/income/individual/spousal_support_payments.py index e1b710549..dfc6a1b1c 100644 --- a/policyengine_canada/variables/household/income/individual/spousal_support_payments.py +++ b/policyengine_canada/variables/household/income/individual/spousal_support_payments.py @@ -6,6 +6,8 @@ class spousal_support_payments(Variable): entity = Person label = "Spousal support payments" unit = CAD - documentation = "Money paid by one spouse to the other after they separate or divorce" + documentation = ( + "Money paid by one spouse to the other after they separate or divorce" + ) definition_period = YEAR reference = "https://www.canada.ca/en/revenue-agency/services/forms-publications/publications/p102/support-payments.html" From 92454dd4b8edb87c63bf0378de76eec867bd0c75 Mon Sep 17 00:00:00 2001 From: Ziyu <91107507+ziyuliuzilla@users.noreply.github.com> Date: Thu, 27 Jul 2023 20:12:40 +0000 Subject: [PATCH 04/10] Nova Scotia Income Assistance Income Eligibility Fixes #344 --- .../eligibility/income/rent/rent_from_boarders.py | 4 ++++ .../is_approved_educational_program.py | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/is_approved_educational_program.py diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py index 86a254ac7..0c2bd179e 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py @@ -11,3 +11,7 @@ class rent_from_boarders(Variable): reference = ( "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" ) + + # def formula(person, period, parameters): + # is_dependant = person("is_dependant", period) + # return where (is_dependant, 0, rent_from_boarders) \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/is_approved_educational_program.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/is_approved_educational_program.py new file mode 100644 index 000000000..95b29e862 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/is_approved_educational_program.py @@ -0,0 +1,11 @@ +from policyengine_canada.model_api import * + + +class is_approved_educational_program(Variable): + value_type = bool + entity = Person + label = "Is attending approved educational program" + definition_period = YEAR + +# is attending a high school, adult day school, upgrading or literacy program, or +# technical or professional training of up to 2 years; \ No newline at end of file From 380e471e83180c315659fcf962329e6185a7afb9 Mon Sep 17 00:00:00 2001 From: Ziyu <91107507+ziyuliuzilla@users.noreply.github.com> Date: Mon, 31 Jul 2023 00:17:03 +0000 Subject: [PATCH 05/10] Nova Scotia Income Assistance Income Eligibility Fixes #344 --- .../eligibility/income/rent/ns_chargeable_rent_income.py | 1 + 1 file changed, 1 insertion(+) diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py index 5fe16b624..d4eceb834 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py @@ -20,6 +20,7 @@ def formula(person, period, parameters): roomers_rent = person("rent_from_roomers", period) roomers_rent_rate = roomers_rent * p.live_with_roomers_rate properties_rent = person("rent_from_properties", period) + amount_with_boarders = where( boarder_rent > 0, max_(base, boarder_rent_rate), From 6e17bb91a6c091f8ef2f64fe342376a9e7eea0d6 Mon Sep 17 00:00:00 2001 From: Ziyu <91107507+ziyuliuzilla@users.noreply.github.com> Date: Wed, 30 Aug 2023 22:02:35 +0000 Subject: [PATCH 06/10] Add change log and variables --- changelog_entry.yaml | 5 ++++- .../income/not_chargeable_income.yaml | 19 +++++++++++++++++++ .../income/ns_chargeable_income.py | 2 ++ .../income/ns_not_chargeable_income.py | 15 +++++++++++++++ .../income/rent/ns_chargeable_rent_income.py | 8 ++++++-- .../income/rent/rent_from_boarders.py | 10 +++++----- .../income/rent/rent_from_properties.py | 4 ++-- .../income/rent/rent_from_roomers.py | 4 ++-- 8 files changed, 55 insertions(+), 12 deletions(-) create mode 100644 policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/not_chargeable_income.yaml create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_not_chargeable_income.py diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 8b1378917..0c2eef279 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1 +1,4 @@ - +- bump: minor + changes: + added: + - Nova Scotia Income Assistance income eligibility. diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/not_chargeable_income.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/not_chargeable_income.yaml new file mode 100644 index 000000000..58acfc699 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/not_chargeable_income.yaml @@ -0,0 +1,19 @@ +description: Not chargeable income includes all of the following. +values: + 2021-01-01: + - child_benefit + - child_disability_benefit + - child_support_payments + - children_family_services_act_payments + - alternative_family_care_program_payments + # - gst_credit # goods and services tax credit + - canada_workers_benefit + - poverty_reduction_credit + - affordable_living_tax_credit + - dependant_child_wages + - canada_nova_scotia_targeted_housing_benefit +metadata: + unit: list + reference: + - title: Employment Support and Income Assistance Act, Section 35 + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_income.py index 694a9e36b..0be26eeaf 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_income.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_chargeable_income.py @@ -32,6 +32,7 @@ def formula(person, period, parameters): - p.harvest_connection_program_wages_exempt ), ) + not_chargeable_income = person("ns_not_chargeable_income", period) return ( p.unearned_income @@ -39,4 +40,5 @@ def formula(person, period, parameters): + rent_received + net_training_allowance + net_harvest_connection_program_wages + - not_chargeable_income ) diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_not_chargeable_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_not_chargeable_income.py new file mode 100644 index 000000000..40f4cdc5e --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_not_chargeable_income.py @@ -0,0 +1,15 @@ +from policyengine_canada.model_api import * + + +class ns_not_chargeable_income(Variable): + value_type = float + entity = Person + label = "Nova Scotia income assistance not chargeable income" + unit = CAD + definition_period = YEAR + reference = ( + "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + ) + defined_for = ProvinceCode.NS + + adds = "gov.provinces.ns.tax.income.income_assistance.eligibility.income.not_chargeable_income" \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py index d4eceb834..9f1a77a65 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py @@ -21,16 +21,20 @@ def formula(person, period, parameters): roomers_rent_rate = roomers_rent * p.live_with_roomers_rate properties_rent = person("rent_from_properties", period) + max_with_boarders = max_(base, boarder_rent_rate) amount_with_boarders = where( boarder_rent > 0, - max_(base, boarder_rent_rate), + max_with_boarders, 0, ) + + max_with_roomers = max_(base, roomers_rent_rate) amount_with_roomers = where( roomers_rent > 0, - max_(base, roomers_rent_rate), + max_with_roomers, 0, ) + amount_with_properties = where( properties_rent > 0, properties_rent * p.rent_from_properties_rate, diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py index 0c2bd179e..f86e11c45 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py @@ -4,14 +4,14 @@ class rent_from_boarders(Variable): value_type = float entity = Person - label = "rent income from boarders living" + label = "Rent collected from boarders" unit = CAD - documentation = "rent income received from boarders living" definition_period = YEAR reference = ( "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" ) + defined_for = ProvinceCode.NS - # def formula(person, period, parameters): - # is_dependant = person("is_dependant", period) - # return where (is_dependant, 0, rent_from_boarders) \ No newline at end of file + def formula(person, period, parameters): + is_dependant = person("is_dependant", period) + return where (is_dependant, 0, rent_from_boarders) \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py index cb7a5169e..6e1a218d7 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py @@ -4,10 +4,10 @@ class rent_from_properties(Variable): value_type = float entity = Person - label = "rent income from properties" + label = "Rent collected from properties" unit = CAD - documentation = "rent income received from properties" definition_period = YEAR reference = ( "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" ) + defined_for = ProvinceCode.NS \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_roomers.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_roomers.py index d3c1073d9..5ea39861e 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_roomers.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_roomers.py @@ -4,10 +4,10 @@ class rent_from_roomers(Variable): value_type = float entity = Person - label = "rent income from roomers living" + label = "Rent collected from roomers" unit = CAD - documentation = "rent income received from roomers living" definition_period = YEAR reference = ( "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" ) + defined_for = ProvinceCode.NS From caf9bf9835ad85bbfc8070af27dc121070cd7920 Mon Sep 17 00:00:00 2001 From: Ziyu <91107507+ziyuliuzilla@users.noreply.github.com> Date: Tue, 10 Oct 2023 22:18:28 +0000 Subject: [PATCH 07/10] Minor changes --- .../rent/ns_chargeable_earned_income.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 policyengine_canada/tests/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_earned_income.yaml diff --git a/policyengine_canada/tests/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_earned_income.yaml b/policyengine_canada/tests/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_earned_income.yaml new file mode 100644 index 000000000..147bd5bd3 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_earned_income.yaml @@ -0,0 +1,17 @@ +- name: Nova Scotia Income Assistance chargeable earned income; + period: 2023 + input: + province_code: NS + is_disabled: 0 + earned_income: + output: + ns_chargeable_earned_income: + +- name: Nova Scotia Income Assistance chargeable earned income; disabled + period: 2023 + input: + province_code: NS + is_disabled: 1 + earned_income: + output: + ns_chargeable_earned_income: \ No newline at end of file From ac3ec72a67f386ff4d01015c261a5bd9d65c5ee4 Mon Sep 17 00:00:00 2001 From: Ziyu <91107507+ziyuliuzilla@users.noreply.github.com> Date: Tue, 10 Oct 2023 22:18:55 +0000 Subject: [PATCH 08/10] Minor changes --- changelog_entry.yaml | 3 ++- .../eligibility/income/earned_income.yaml | 3 ++- .../income/earned_income_chargeable_rates.yaml | 2 +- .../earned_income_chargeable_rates_disabled.yaml | 2 +- .../eligibility/income/not_chargeable_income.yaml | 2 +- .../income/student_chargeable_income/age.yaml | 8 ++++---- .../student_chargeable_income/exempt_month.yaml | 2 +- .../income/ns_income_assistance_earned_income.py | 15 +++++++++++++++ .../income/rent/ns_chargeable_rent_income.py | 2 +- ..._from_boarders.py => ns_rent_from_boarders.py} | 6 +++--- .../expenses/housing}/rent_from_properties.py | 2 +- .../expenses/housing}/rent_from_roomers.py | 2 +- 12 files changed, 33 insertions(+), 16 deletions(-) create mode 100644 policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_income_assistance_earned_income.py rename policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/{rent_from_boarders.py => ns_rent_from_boarders.py} (70%) rename policyengine_canada/variables/{gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent => household/expenses/housing}/rent_from_properties.py (90%) rename policyengine_canada/variables/{gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent => household/expenses/housing}/rent_from_roomers.py (90%) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 0c2eef279..d79c23b67 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,5 @@ - bump: minor changes: added: - - Nova Scotia Income Assistance income eligibility. + - Nova Scotia income assistance income eligibility. + diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml index 3fa2ac227..aa2ffb792 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml @@ -1,4 +1,5 @@ -description: “Earned income” includes all of the following. +description: Nova Scotia considers the following income types as earned income for the Income Assistance program. + values: 2021-01-01: - employment_income diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates.yaml index 49f1a5141..15ff2a271 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates.yaml @@ -1,4 +1,4 @@ -description: Earned income is partially exempted, with the remainder considered chargeable under the Nova Scotia Income Assistance program. +description: ENova Scotia exempts partial earned income, with the remainder considered chargeable under the Income Assistance program. brackets: - threshold: 2021-01-01: 0 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates_disabled.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates_disabled.yaml index 1bff417e2..0370ffd24 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates_disabled.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates_disabled.yaml @@ -1,4 +1,4 @@ -description: Earned income is partially exempted, with the remainder considered chargeable for disabled employement under the Nova Scotia Income Assistance program. +description: Nova Scotia exempts partial earned income, with the remainder considered chargeable for disabled employement under the Income Assistance program. brackets: - threshold: 2021-01-01: 0 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/not_chargeable_income.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/not_chargeable_income.yaml index 58acfc699..6e1b7953a 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/not_chargeable_income.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/not_chargeable_income.yaml @@ -1,4 +1,4 @@ -description: Not chargeable income includes all of the following. +description: Nova Scotia considers the following income types as not chaegeable income for the Income Assistance program. values: 2021-01-01: - child_benefit diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/age.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/age.yaml index 5afda2f02..c9ce78c96 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/age.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/age.yaml @@ -3,20 +3,20 @@ brackets: - threshold: 2021-01-01: 0 amount: - 2021-01-01: 0 + 2021-01-01: false - threshold: 2021-01-01: 16 amount: - 2021-01-01: 1 + 2021-01-01: true - threshold: 2021-01-01: 21 amount: - 2021-01-01: 0 + 2021-01-01: false metadata: type: single_amount threshold_unit: year - amount_unit: /1 + amount_unit: bool period: year label: Nova Scotia Income Assistance student chargeable income age reference: diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/exempt_month.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/exempt_month.yaml index f3daef905..d326dd253 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/exempt_month.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/exempt_month.yaml @@ -3,7 +3,7 @@ values: 2021-01-01: 3 metadata: unit: month - label: Income Assistance non-chargeable employment month for NS student + label: Nova Scotia Income Assistance non-chargeable student employment months reference: - title: Employment Support and Income Assistance Act, Section 33, (3) href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_income_assistance_earned_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_income_assistance_earned_income.py new file mode 100644 index 000000000..92c259262 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/ns_income_assistance_earned_income.py @@ -0,0 +1,15 @@ +from policyengine_canada.model_api import * + + +class ns_income_assistance_earned_income (Variable): + value_type = float + entity = Person + label = "Nova Scotia income assistance earned income" + unit = CAD + definition_period = YEAR + reference = ( + "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" + ) + defined_for = ProvinceCode.NS + + adds = "gov.provinces.ns.tax.income.income_assistance.eligibility.income.earned_income" \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py index 9f1a77a65..0139f45bb 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_rent_income.py @@ -15,7 +15,7 @@ def formula(person, period, parameters): period ).gov.provinces.ns.tax.income.income_assistance.eligibility.income.rent base = p.chargeable_rent_base - boarder_rent = person("rent_from_boarders", period) + boarder_rent = person("ns_rent_from_boarders", period) boarder_rent_rate = boarder_rent * p.live_with_boarders_rate roomers_rent = person("rent_from_roomers", period) roomers_rent_rate = roomers_rent * p.live_with_roomers_rate diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_rent_from_boarders.py similarity index 70% rename from policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py rename to policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_rent_from_boarders.py index f86e11c45..ea2f02778 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_boarders.py +++ b/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_rent_from_boarders.py @@ -1,10 +1,10 @@ from policyengine_canada.model_api import * -class rent_from_boarders(Variable): +class ns_rent_from_boarders(Variable): value_type = float entity = Person - label = "Rent collected from boarders" + label = "Nova Scotia rent collected from boarders" unit = CAD definition_period = YEAR reference = ( @@ -14,4 +14,4 @@ class rent_from_boarders(Variable): def formula(person, period, parameters): is_dependant = person("is_dependant", period) - return where (is_dependant, 0, rent_from_boarders) \ No newline at end of file + return where (is_dependant, 0, ns_rent_from_boarders) \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py b/policyengine_canada/variables/household/expenses/housing/rent_from_properties.py similarity index 90% rename from policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py rename to policyengine_canada/variables/household/expenses/housing/rent_from_properties.py index 6e1a218d7..2a3149323 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_properties.py +++ b/policyengine_canada/variables/household/expenses/housing/rent_from_properties.py @@ -10,4 +10,4 @@ class rent_from_properties(Variable): reference = ( "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" ) - defined_for = ProvinceCode.NS \ No newline at end of file + \ No newline at end of file diff --git a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_roomers.py b/policyengine_canada/variables/household/expenses/housing/rent_from_roomers.py similarity index 90% rename from policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_roomers.py rename to policyengine_canada/variables/household/expenses/housing/rent_from_roomers.py index 5ea39861e..25f96e972 100644 --- a/policyengine_canada/variables/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/rent_from_roomers.py +++ b/policyengine_canada/variables/household/expenses/housing/rent_from_roomers.py @@ -10,4 +10,4 @@ class rent_from_roomers(Variable): reference = ( "https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4" ) - defined_for = ProvinceCode.NS + From 4acd7fe46629de420e594446b10ad2eaae1f52bc Mon Sep 17 00:00:00 2001 From: Ziyu <91107507+ziyuliuzilla@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:49:53 +0000 Subject: [PATCH 09/10] Description rewrite --- .../income_assistance/eligibility/income/earned_income.yaml | 2 +- .../eligibility/income/earned_income_chargeable_rates.yaml | 2 +- .../eligibility/income/student_chargeable_income/age.yaml | 6 +++--- .../income/student_chargeable_income/calendar_month.yaml | 2 +- .../income/student_chargeable_income/exempt_month.yaml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml index aa2ffb792..d32178d77 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income.yaml @@ -1,4 +1,4 @@ -description: Nova Scotia considers the following income types as earned income for the Income Assistance program. +description: Nova Scotia considers the following income types as earned income under the Income Assistance program. values: 2021-01-01: diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates.yaml index 15ff2a271..9950a4a70 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/earned_income_chargeable_rates.yaml @@ -1,4 +1,4 @@ -description: ENova Scotia exempts partial earned income, with the remainder considered chargeable under the Income Assistance program. +description: Nova Scotia exempts partial earned income, with the remainder considered chargeable under the Income Assistance program. brackets: - threshold: 2021-01-01: 0 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/age.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/age.yaml index c9ce78c96..2e93f5161 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/age.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/age.yaml @@ -1,4 +1,4 @@ -description: Aged 16 to 21, attending an approved educational program qualifies for student chargeable income under Nova Scotia Income Assistance. +description: Nova Scotia designates partial full-time employment income as non-chargeable for individuals aged 16 to 21, participating in an approved educational program under the Income Assistance program. brackets: - threshold: 2021-01-01: 0 @@ -20,5 +20,5 @@ metadata: period: year label: Nova Scotia Income Assistance student chargeable income age reference: - - title: Employment Support and Income Assistance Act, Section 33 - href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC2_4 + - title: Employment Support and Income Assistance Act, Section 33 (3) + href: https://novascotia.ca/just/regulations/regs/esiaregs.htm#TOC3_33 diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/calendar_month.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/calendar_month.yaml index c36d4755e..2002421e5 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/calendar_month.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/calendar_month.yaml @@ -1,4 +1,4 @@ -description: Under Income Assistance, full-time employment income is chargeable for a standard duration of 12 months per year by default. +description: Nova Scotia categorizes full-time employment income as chargeable for a standard duration of 12 months per year under the Income Assistance program. values: 2021-01-01: 12 metadata: diff --git a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/exempt_month.yaml b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/exempt_month.yaml index d326dd253..f3bf8643f 100644 --- a/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/exempt_month.yaml +++ b/policyengine_canada/parameters/gov/provinces/ns/tax/income/income_assistance/eligibility/income/student_chargeable_income/exempt_month.yaml @@ -1,4 +1,4 @@ -description: Full-time employment income is non-chargeable for qualified Nova Scotia students under Income Assistance for 3 months per year. +description: Nova Scotia designates full-time employment income as non-chargeable for qualified students for up to three months annually under the Income Assistance program. values: 2021-01-01: 3 metadata: From 0c5554cad6de151676c08cdaa7df7f3118df193e Mon Sep 17 00:00:00 2001 From: Ziyu <91107507+ziyuliuzilla@users.noreply.github.com> Date: Tue, 7 Nov 2023 22:39:18 +0000 Subject: [PATCH 10/10] Testing --- .../eligibility/income/rent/ns_chargeable_earned_income.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_canada/tests/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_earned_income.yaml b/policyengine_canada/tests/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_earned_income.yaml index 147bd5bd3..fe3f32130 100644 --- a/policyengine_canada/tests/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_earned_income.yaml +++ b/policyengine_canada/tests/gov/provinces/ns/tax/income/income_assistance/eligibility/income/rent/ns_chargeable_earned_income.yaml @@ -3,7 +3,7 @@ input: province_code: NS is_disabled: 0 - earned_income: + earned_income: 100 output: ns_chargeable_earned_income: