Repository: PolicyEngine/policyengine-canada (language: python)

Issue:
British Columbia Basic Personal Amount
Reference: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1bc/td1bc-23e.pdf#page=1


Discussion / hints:

Fix patch:
diff --git a/changelog_entry.yaml b/changelog_entry.yaml
index e69de29bb..e171e6234 100644
--- a/changelog_entry.yaml
+++ b/changelog_entry.yaml
@@ -0,0 +1,4 @@
+- bump: minor
+  changes:
+    added:
+    - British Columbia basic personal amount.
diff --git a/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml
new file mode 100644
index 000000000..5400c9729
--- /dev/null
+++ b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/basic_personal_amount/base.yaml
@@ -0,0 +1,16 @@
+description: British Columbia provides the following basic personal amount. 
+values:
+  2022-01-01: 11_302
+  2023-01-01: 11_981
+metadata:
+  unit: currency-CAD
+  period: year
+  label: British Columbia basic personal amount
+  reference:
+  - title: 2022 British Columbia, Personal Tax Credits Return, TD1BC
+    href: https://tsaykeh.com/files/pdf/1650179447_BC%20Tax%20Form.pdf#page=1
+  - title: 2023 British Columbia, Personal Tax Credits Return, TD1BC
+    href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1bc/td1bc-23e.pdf#page=1
+  # The income tax act specifies inflation unadjusted amounts
+  - title: British Columbia Income Tax Act, Division 2, 4.3, 1.1
+    href: https://www.bclaws.gov.bc.ca/civix/document/id/complete/statreg/96215_01
diff --git a/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/non_refundable.yaml b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/non_refundable.yaml
index f3d40c64f..0286b63e5 100644
--- a/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/non_refundable.yaml
+++ b/policyengine_canada/parameters/gov/provinces/bc/tax/income/credits/non_refundable.yaml
@@ -1,8 +1,11 @@
-description: British Columbia list of non-refundable tax credits.
+description: British Columbia provides the following non-refundable tax credits.
 values:
   2022-01-01:
     - bc_tax_reduction_credit
     - bc_age_credit
+    - bc_basic_personal_amount
 
 metadata:
-  unit: program
+  unit: list
+  period: year
+  label: British Columbia non-refundable tax credits
diff --git a/policyengine_canada/variables/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.py b/policyengine_canada/variables/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.py
new file mode 100644
index 000000000..1f6f9f1ea
--- /dev/null
+++ b/policyengine_canada/variables/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.py
@@ -0,0 +1,17 @@
+from policyengine_canada.model_api import *
+
+
+class bc_basic_personal_amount(Variable):
+    value_type = float
+    entity = Person
+    label = "British Columbia basic personal amount"
+    unit = CAD
+    definition_period = YEAR
+    reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1bc/td1bc-23e.pdf#page=1"
+    defined_for = ProvinceCode.BC
+
+    def formula(person, period, parameters):
+        p = parameters(
+            period
+        ).gov.provinces.bc.tax.income.credits.basic_personal_amount
+        return p.base


Test patch:
diff --git a/policyengine_canada/tests/gov/integration.yaml b/policyengine_canada/tests/gov/integration.yaml
index a10b8a3ec..9cfc3e277 100644
--- a/policyengine_canada/tests/gov/integration.yaml
+++ b/policyengine_canada/tests/gov/integration.yaml
@@ -88,33 +88,3 @@
     benefits: 3_706
     income_tax_before_refundable_credits: 0
     income_tax_before_credits: 0
-
-
-- name: Integration - British Columbia
-  period: 2023
-  absolute_error_margin: 0.5
-  input:
-    people:
-      parent:
-        age: 40
-        bc_taxable_income: 10_000
-      c1:
-        age: 12
-        full_custody: false
-    household:
-      members: [parent, c1]
-      province_code_str: BC
-      adjusted_family_net_income: 20_000
-      is_married: false
-      family_working_income: 3_000
-  output:
-    on_non_refundable_credits: 0
-    on_refundable_credits: 0
-    on_benefits: 0
-    household_net_income: 4_551.46
-    bc_non_refundable_credits: 521
-    bc_refundable_credits:  386.9
-    bc_benefits: 1_599.96
-    non_refundable_tax_credits: 15_000
-    income_tax_before_refundable_credits: 0
-    income_tax_before_credits: 0
diff --git a/policyengine_canada/tests/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.yaml b/policyengine_canada/tests/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.yaml
new file mode 100644
index 000000000..25c777f80
--- /dev/null
+++ b/policyengine_canada/tests/gov/provinces/bc/tax/income/credits/basic_personal_amount/bc_basic_personal_amount.yaml
@@ -0,0 +1,13 @@
+- name: 2023 Basic personal amount
+  period: 2023
+  input:
+    province_code: BC
+  output:
+    bc_basic_personal_amount: 11_981
+
+- name: 2022 Basic personal amount
+  period: 2022
+  input:
+    province_code: BC
+  output:
+    bc_basic_personal_amount: 11_302