policyengine-us 1.387.3__py3-none-any.whl → 1.389.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of policyengine-us might be problematic. Click here for more details.

Files changed (65) hide show
  1. policyengine_us/parameters/gov/local/ca/riv/general_relief/age_threshold.yaml +12 -0
  2. policyengine_us/parameters/gov/local/ca/riv/general_relief/income/deductions/sources.yaml +16 -0
  3. policyengine_us/parameters/gov/local/ca/riv/general_relief/income/sources/earned.yaml +15 -0
  4. policyengine_us/parameters/gov/local/ca/riv/general_relief/income/sources/unearned.yaml +20 -0
  5. policyengine_us/parameters/gov/local/ca/riv/general_relief/needs_standards/food.yaml +21 -0
  6. policyengine_us/parameters/gov/local/ca/riv/general_relief/needs_standards/housing.yaml +21 -0
  7. policyengine_us/parameters/gov/local/ca/riv/general_relief/needs_standards/personal_needs.yaml +21 -0
  8. policyengine_us/parameters/gov/local/ca/riv/general_relief/needs_standards/special_needs/transportation.yaml +12 -0
  9. policyengine_us/parameters/gov/local/ca/riv/general_relief/property/limit.yaml +12 -0
  10. policyengine_us/parameters/gov/local/ca/riv/general_relief/property/sources.yaml +14 -0
  11. policyengine_us/parameters/gov/local/ca/riv/general_relief/property/vehicle_exemption/amount.yaml +11 -0
  12. policyengine_us/parameters/gov/local/ca/riv/general_relief/qualified_immigration_status.yaml +19 -0
  13. policyengine_us/parameters/gov/local/ca/riv/general_relief/work_exempted_age/older.yaml +12 -0
  14. policyengine_us/parameters/gov/local/ca/riv/general_relief/work_exempted_age/younger.yaml +12 -0
  15. policyengine_us/parameters/gov/states/il/dceo/README.md +1 -0
  16. policyengine_us/parameters/gov/states/il/dceo/liheap/eligibility/fpg_limit.yaml +11 -0
  17. policyengine_us/parameters/gov/states/il/dceo/liheap/eligibility/rent_rate.yaml +11 -0
  18. policyengine_us/parameters/gov/states/il/dceo/liheap/payment/base_amount/max.yaml +11 -0
  19. policyengine_us/parameters/gov/states/il/dceo/liheap/payment/base_amount/min.yaml +11 -0
  20. policyengine_us/parameters/gov/states/il/dceo/liheap/payment/crisis_amount/max.yaml +11 -0
  21. policyengine_us/tests/policy/baseline/gov/local/ca/riv/general_relief/ca_giv_general_relief_countable_income.yaml +58 -0
  22. policyengine_us/tests/policy/baseline/gov/local/ca/riv/general_relief/ca_riv_general_relief_countable_vehicle_value.yaml +23 -0
  23. policyengine_us/tests/policy/baseline/gov/local/ca/riv/general_relief/ca_riv_general_relief_excluded_income.yaml +19 -0
  24. policyengine_us/tests/policy/baseline/gov/local/ca/riv/general_relief/ca_riv_general_relief_needs_standards.yaml +17 -0
  25. policyengine_us/tests/policy/baseline/gov/local/ca/riv/general_relief/eligibility/ca_riv_general_relief_eligible.yaml +45 -0
  26. policyengine_us/tests/policy/baseline/gov/local/ca/riv/general_relief/eligibility/ca_riv_general_relief_immigration_status_eligible.yaml +23 -0
  27. policyengine_us/tests/policy/baseline/gov/local/ca/riv/general_relief/eligibility/ca_riv_general_relief_income_eligible.yaml +17 -0
  28. policyengine_us/tests/policy/baseline/gov/local/ca/riv/general_relief/eligibility/ca_riv_general_relief_ineligible_person.yaml +43 -0
  29. policyengine_us/tests/policy/baseline/gov/local/ca/riv/general_relief/eligibility/ca_riv_general_relief_meets_work_requirements.yaml +75 -0
  30. policyengine_us/tests/policy/baseline/gov/local/ca/riv/general_relief/eligibility/ca_riv_general_relief_property_eligible.yaml +15 -0
  31. policyengine_us/tests/policy/baseline/gov/local/ca/riv/general_relief/integration.yaml +88 -0
  32. policyengine_us/tests/policy/baseline/gov/states/il/dceo/liheap/eligibility/il_liheap_eligible.yaml +54 -0
  33. policyengine_us/tests/policy/baseline/gov/states/il/dceo/liheap/eligibility/il_liheap_income_eligible.yaml +58 -0
  34. policyengine_us/tests/policy/baseline/gov/states/il/dceo/liheap/integration.yaml +149 -0
  35. policyengine_us/tests/policy/baseline/gov/states/il/dceo/liheap/payment/il_liheap_base_payment.yaml +83 -0
  36. policyengine_us/variables/gov/local/ca/riv/general_relief/ca_riv_general_relief.py +16 -0
  37. policyengine_us/variables/gov/local/ca/riv/general_relief/ca_riv_general_relief_budget_unit_size.py +14 -0
  38. policyengine_us/variables/gov/local/ca/riv/general_relief/eligibility/ca_riv_general_relief_eligible.py +47 -0
  39. policyengine_us/variables/gov/local/ca/riv/general_relief/eligibility/ca_riv_general_relief_immigration_status_eligible.py +15 -0
  40. policyengine_us/variables/gov/local/ca/riv/general_relief/eligibility/ca_riv_general_relief_income_eligible.py +18 -0
  41. policyengine_us/variables/gov/local/ca/riv/general_relief/eligibility/ca_riv_general_relief_ineligible_person.py +25 -0
  42. policyengine_us/variables/gov/local/ca/riv/general_relief/eligibility/ca_riv_general_relief_meets_work_requirements.py +43 -0
  43. policyengine_us/variables/gov/local/ca/riv/general_relief/eligibility/ca_riv_general_relief_property_eligible.py +16 -0
  44. policyengine_us/variables/gov/local/ca/riv/general_relief/income/ca_riv_general_relief_countable_income.py +16 -0
  45. policyengine_us/variables/gov/local/ca/riv/general_relief/income/ca_riv_general_relief_countable_income_person.py +14 -0
  46. policyengine_us/variables/gov/local/ca/riv/general_relief/income/ca_riv_general_relief_excluded_income.py +22 -0
  47. policyengine_us/variables/gov/local/ca/riv/general_relief/income/ca_riv_general_relief_unearned_income.py +12 -0
  48. policyengine_us/variables/gov/local/ca/riv/general_relief/income/earned/ca_riv_general_relief_earned_income.py +12 -0
  49. policyengine_us/variables/gov/local/ca/riv/general_relief/income/earned/ca_riv_general_relief_earned_income_deductions.py +12 -0
  50. policyengine_us/variables/gov/local/ca/riv/general_relief/income/earned/ca_riv_general_relief_net_earned_income.py +17 -0
  51. policyengine_us/variables/gov/local/ca/riv/general_relief/payment/ca_riv_general_relief_needs_standards.py +24 -0
  52. policyengine_us/variables/gov/local/ca/riv/general_relief/payment/ca_riv_general_relief_special_needs_amount.py +14 -0
  53. policyengine_us/variables/gov/local/ca/riv/general_relief/property/ca_riv_general_relief_countable_property_value.py +12 -0
  54. policyengine_us/variables/gov/local/ca/riv/general_relief/property/ca_riv_general_relief_countable_vehicle_value.py +19 -0
  55. policyengine_us/variables/gov/states/il/dceo/liheap/eligibility/il_liheap_eligible.py +24 -0
  56. policyengine_us/variables/gov/states/il/dceo/liheap/eligibility/il_liheap_eligible_for_crisis_assistance.py +14 -0
  57. policyengine_us/variables/gov/states/il/dceo/liheap/eligibility/il_liheap_income_eligible.py +30 -0
  58. policyengine_us/variables/gov/states/il/dceo/liheap/il_liheap.py +13 -0
  59. policyengine_us/variables/gov/states/il/dceo/liheap/payment/il_liheap_base_payment.py +28 -0
  60. policyengine_us/variables/gov/states/il/dceo/liheap/payment/il_liheap_crisis_assistance_amount.py +13 -0
  61. {policyengine_us-1.387.3.dist-info → policyengine_us-1.389.0.dist-info}/METADATA +1 -1
  62. {policyengine_us-1.387.3.dist-info → policyengine_us-1.389.0.dist-info}/RECORD +65 -5
  63. {policyengine_us-1.387.3.dist-info → policyengine_us-1.389.0.dist-info}/WHEEL +0 -0
  64. {policyengine_us-1.387.3.dist-info → policyengine_us-1.389.0.dist-info}/entry_points.txt +0 -0
  65. {policyengine_us-1.387.3.dist-info → policyengine_us-1.389.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,88 @@
1
+ - name: Case 1, household of 2 with no income.
2
+ period: 2024-01
3
+ input:
4
+ people:
5
+ person1:
6
+ age: 30
7
+ employment_income: 0
8
+ ssi: 0
9
+ person2:
10
+ age: 65
11
+ employment_income: 0
12
+ ssi: 0
13
+ is_incapable_of_self_care: true
14
+ households:
15
+ household:
16
+ members: [person1, person2]
17
+ in_riv: true
18
+ spm_units:
19
+ spm_unit:
20
+ members: [person1, person2]
21
+ ca_tanf: 0
22
+ housing_cost: 300 * 12
23
+ output:
24
+ ca_riv_general_relief_eligible: true
25
+ ca_riv_general_relief: 438.5
26
+ # 436 + 30/12
27
+ ## $30 annual special needs amount
28
+
29
+ - name: Case 2, household of 2 with $500 monthly income.
30
+ period: 2024-01
31
+ absolute_error_margin: 0.2
32
+ input:
33
+ people:
34
+ person1:
35
+ age: 30
36
+ employment_income: 500 * 12
37
+ ssi: 0
38
+ person2:
39
+ age: 65
40
+ employment_income: 0
41
+ ssi: 0
42
+ households:
43
+ household:
44
+ members: [person1, person2]
45
+ in_riv: true
46
+ spm_units:
47
+ spm_unit:
48
+ members: [person1, person2]
49
+ ca_tanf: 0
50
+ housing_cost: 300 * 12
51
+ output:
52
+ state_withheld_income_tax: 0.38
53
+ ca_riv_general_relief_earned_income_deductions: [38.63, 0.38]
54
+ ca_riv_general_relief_countable_income: 461.37 # 500 - 38.63
55
+ ca_riv_general_relief_needs_standards: 436
56
+ ca_riv_general_relief_income_eligible: false
57
+
58
+ - name: Case 3, household of 2 with $450 monthly income.
59
+ period: 2024-01
60
+ absolute_error_margin: 0.2
61
+ input:
62
+ people:
63
+ person1:
64
+ age: 30
65
+ employment_income: 450 * 12
66
+ ssi: 0
67
+ person2:
68
+ age: 65
69
+ employment_income: 0
70
+ ssi: 0
71
+ households:
72
+ household:
73
+ members: [person1, person2]
74
+ in_riv: true
75
+ spm_units:
76
+ spm_unit:
77
+ members: [person1, person2]
78
+ ca_tanf: 0
79
+ housing_cost: 300 * 12
80
+ output:
81
+ ca_riv_general_relief_earned_income_deductions: [34.43, 0]
82
+ ca_riv_general_relief_countable_income: 415.57 # 450 - 34.43
83
+ ca_riv_general_relief_needs_standards: 436
84
+ ca_riv_general_relief_income_eligible: true
85
+ ca_riv_general_relief_eligible: true
86
+ ca_riv_general_relief_special_needs_amount: 2.5
87
+ ca_riv_general_relief: 22.93
88
+ # 436 + 2.5 - 415.57
@@ -0,0 +1,54 @@
1
+ - name: Income eligible household with own heating is eligible
2
+ period: 2024
3
+ input:
4
+ state_code: IL
5
+ il_liheap_income_eligible: true
6
+ heat_expense_included_in_rent: false
7
+ rent: 1_000
8
+ irs_gross_income: 30_000
9
+ output:
10
+ il_liheap_eligible: true
11
+
12
+ - name: Income eligible renter with heat in rent and rent > 30% income is eligible
13
+ period: 2024
14
+ input:
15
+ state_code: IL
16
+ il_liheap_income_eligible: true
17
+ heat_expense_included_in_rent: true
18
+ rent: 10_000 # Annual rent
19
+ irs_gross_income: 30_000 # Rent is 33.3% of income
20
+ output:
21
+ il_liheap_eligible: true
22
+
23
+ - name: Income eligible renter with heat in rent but rent < 30% income is not eligible
24
+ period: 2024
25
+ input:
26
+ state_code: IL
27
+ il_liheap_income_eligible: true
28
+ heat_expense_included_in_rent: true
29
+ rent: 5_000 # Annual rent
30
+ irs_gross_income: 30_000 # Rent is 16.7% of income
31
+ output:
32
+ il_liheap_eligible: false
33
+
34
+ - name: Income eligible renter with heat in rent and rent exactly 30% income is not eligible
35
+ period: 2024
36
+ input:
37
+ state_code: IL
38
+ il_liheap_income_eligible: true
39
+ heat_expense_included_in_rent: true
40
+ rent: 9_000 # Annual rent
41
+ irs_gross_income: 30_000 # Rent is exactly 30% of income
42
+ output:
43
+ il_liheap_eligible: false
44
+
45
+ - name: Not income eligible is not eligible regardless of rent
46
+ period: 2024
47
+ input:
48
+ state_code: IL
49
+ il_liheap_income_eligible: false
50
+ heat_expense_included_in_rent: false
51
+ rent: 1_000
52
+ irs_gross_income: 100_000
53
+ output:
54
+ il_liheap_eligible: false
@@ -0,0 +1,58 @@
1
+ - name: Single person below 60% SMI is eligible
2
+ period: 2024
3
+ input:
4
+ state_code: IL
5
+ irs_gross_income: 25_000
6
+ # smi and fpg computed automatically from household size
7
+ output:
8
+ il_liheap_income_eligible: true
9
+
10
+ - name: Single person above 60% SMI but below 200% FPG is eligible
11
+ period: 2024
12
+ input:
13
+ state_code: IL
14
+ irs_gross_income: 28_000
15
+ # Person below 200% FPG so should be eligible
16
+ output:
17
+ il_liheap_income_eligible: true
18
+
19
+ - name: Family of 4 below income limits is eligible
20
+ period: 2024
21
+ input:
22
+ people:
23
+ parent1:
24
+ irs_gross_income: 30_000
25
+ parent2:
26
+ irs_gross_income: 15_000
27
+ child1:
28
+ age: 10
29
+ child2:
30
+ age: 5
31
+ spm_units:
32
+ spm_unit:
33
+ members: [parent1, parent2, child1, child2]
34
+ households:
35
+ household:
36
+ members: [parent1, parent2, child1, child2]
37
+ state_code: IL
38
+ # smi and fpg computed automatically from spm_unit_size
39
+ output:
40
+ il_liheap_income_eligible: true
41
+
42
+ - name: High income household not eligible
43
+ period: 2024
44
+ input:
45
+ state_code: IL
46
+ irs_gross_income: 100_000
47
+ # High income above both limits
48
+ output:
49
+ il_liheap_income_eligible: false
50
+
51
+ - name: Income exactly at 200% FPG is eligible
52
+ period: 2024
53
+ input:
54
+ state_code: IL
55
+ irs_gross_income: 30_120 # Exactly 200% of FPG
56
+ # Exactly at 200% FPG limit
57
+ output:
58
+ il_liheap_income_eligible: true
@@ -0,0 +1,149 @@
1
+ - name: Senior citizen with disability priority group
2
+ period: 2024
3
+ input:
4
+ people:
5
+ senior:
6
+ age: 65
7
+ is_disabled: true
8
+ social_security: 12_000
9
+ irs_gross_income: 12_000
10
+ rent: 6_000
11
+ heating_expense_person: 800
12
+ tax_units:
13
+ tax_unit:
14
+ members: [senior]
15
+ spm_units:
16
+ spm_unit:
17
+ members: [senior]
18
+ heat_expense_included_in_rent: false
19
+ households:
20
+ household:
21
+ members: [senior]
22
+ state_code: IL
23
+ output:
24
+ il_liheap_income_eligible: true
25
+ il_liheap_eligible: true
26
+ il_liheap_base_payment: 800 # Based on heating expenses
27
+ il_liheap: 800 # Base payment only (no crisis assistance)
28
+
29
+ - name: Family with young children priority group
30
+ period: 2024
31
+ input:
32
+ people:
33
+ parent1:
34
+ age: 30
35
+ employment_income: 25_000
36
+ irs_gross_income: 25_000
37
+ rent: 12_000
38
+ heating_expense_person: 900 # Half of family heating costs
39
+ parent2:
40
+ age: 28
41
+ employment_income: 20_000
42
+ irs_gross_income: 20_000
43
+ heating_expense_person: 900 # Half of family heating costs
44
+ child1:
45
+ age: 4 # Under 5 - priority group
46
+ heating_expense_person: 0
47
+ child2:
48
+ age: 2 # Under 5 - priority group
49
+ heating_expense_person: 0
50
+ tax_units:
51
+ tax_unit:
52
+ members: [parent1, parent2, child1, child2]
53
+ spm_units:
54
+ spm_unit:
55
+ members: [parent1, parent2, child1, child2]
56
+ heat_expense_included_in_rent: false
57
+ households:
58
+ household:
59
+ members: [parent1, parent2, child1, child2]
60
+ state_code: IL
61
+ output:
62
+ il_liheap_income_eligible: true # 45k total income eligible
63
+ il_liheap_eligible: true
64
+ il_liheap_base_payment: 1_800 # Based on heating expenses
65
+ il_liheap: 1_800 # Base payment only (no crisis assistance)
66
+
67
+ - name: Renter with heat included must meet rent threshold
68
+ period: 2024
69
+ input:
70
+ people:
71
+ renter:
72
+ age: 35
73
+ employment_income: 24_000
74
+ irs_gross_income: 24_000
75
+ rent: 8_000 # 33.3% of income
76
+ heating_expense_person: 1_200 # Irrelevant for heat included
77
+ tax_units:
78
+ tax_unit:
79
+ members: [renter]
80
+ spm_units:
81
+ spm_unit:
82
+ members: [renter]
83
+ heat_expense_included_in_rent: true
84
+ households:
85
+ household:
86
+ members: [renter]
87
+ state_code: IL
88
+ output:
89
+ il_liheap_income_eligible: true # 24k < 60% of 50k (30k)
90
+ il_liheap_eligible: true # Rent (8k) > 30% of income (7.2k)
91
+ il_liheap_base_payment: 315 # Fixed minimum for heat included
92
+ il_liheap: 315 # Base payment only (no crisis assistance)
93
+
94
+ - name: Renter with heat included but low rent not eligible
95
+ period: 2024
96
+ input:
97
+ people:
98
+ renter:
99
+ age: 40
100
+ employment_income: 28_000
101
+ irs_gross_income: 28_000
102
+ rent: 7_000 # 25% of income
103
+ heating_expense_person: 1_000 # Irrelevant for heat included
104
+ tax_units:
105
+ tax_unit:
106
+ members: [renter]
107
+ spm_units:
108
+ spm_unit:
109
+ members: [renter]
110
+ heat_expense_included_in_rent: true
111
+ households:
112
+ household:
113
+ members: [renter]
114
+ state_code: IL
115
+ output:
116
+ il_liheap_income_eligible: true # 28k < 60% of 50k (30k)
117
+ il_liheap_eligible: false # Rent (7k) <= 30% of income (8.4k)
118
+ il_liheap: 0
119
+
120
+ - name: High income household not eligible
121
+ period: 2024
122
+ input:
123
+ people:
124
+ adult1:
125
+ age: 45
126
+ employment_income: 50_000
127
+ irs_gross_income: 50_000
128
+ rent: 24_000
129
+ heating_expense_person: 1_250 # Half of family heating costs
130
+ adult2:
131
+ age: 43
132
+ employment_income: 45_000
133
+ irs_gross_income: 45_000
134
+ heating_expense_person: 1_250 # Half of family heating costs
135
+ tax_units:
136
+ tax_unit:
137
+ members: [adult1, adult2]
138
+ spm_units:
139
+ spm_unit:
140
+ members: [adult1, adult2]
141
+ heat_expense_included_in_rent: false
142
+ households:
143
+ household:
144
+ members: [adult1, adult2]
145
+ state_code: IL
146
+ output:
147
+ il_liheap_income_eligible: false # 95k > 60% of 70k (42k) and > 200% of 20.4k (40.8k)
148
+ il_liheap_eligible: false
149
+ il_liheap: 0
@@ -0,0 +1,83 @@
1
+ - name: Heat not included in rent - benefit based on heating expenses
2
+ period: 2024
3
+ input:
4
+ people:
5
+ person:
6
+ age: 30
7
+ heating_expense_person: 1_000
8
+ tax_units:
9
+ tax_unit:
10
+ members: [person]
11
+ spm_units:
12
+ spm_unit:
13
+ members: [person]
14
+ heat_expense_included_in_rent: false
15
+ households:
16
+ household:
17
+ members: [person]
18
+ state_code: IL
19
+ output:
20
+ il_liheap_base_payment: 1_000 # Heating expenses within range
21
+
22
+ - name: Heat not included in rent - expenses exceed maximum
23
+ period: 2024
24
+ input:
25
+ people:
26
+ person:
27
+ age: 30
28
+ heating_expense_person: 3_000
29
+ tax_units:
30
+ tax_unit:
31
+ members: [person]
32
+ spm_units:
33
+ spm_unit:
34
+ members: [person]
35
+ heat_expense_included_in_rent: false
36
+ households:
37
+ household:
38
+ members: [person]
39
+ state_code: IL
40
+ output:
41
+ il_liheap_base_payment: 2_075 # Capped at maximum
42
+
43
+ - name: Heat included in rent - minimum cash benefit
44
+ period: 2024
45
+ input:
46
+ people:
47
+ person:
48
+ age: 30
49
+ heating_expense_person: 500 # Irrelevant when heat included
50
+ tax_units:
51
+ tax_unit:
52
+ members: [person]
53
+ spm_units:
54
+ spm_unit:
55
+ members: [person]
56
+ heat_expense_included_in_rent: true
57
+ households:
58
+ household:
59
+ members: [person]
60
+ state_code: IL
61
+ output:
62
+ il_liheap_base_payment: 315 # Fixed minimum for heat included in rent
63
+
64
+ - name: Heat not included in rent - low heating expenses get actual amount
65
+ period: 2024
66
+ input:
67
+ people:
68
+ person:
69
+ age: 30
70
+ heating_expense_person: 200
71
+ tax_units:
72
+ tax_unit:
73
+ members: [person]
74
+ spm_units:
75
+ spm_unit:
76
+ members: [person]
77
+ heat_expense_included_in_rent: false
78
+ households:
79
+ household:
80
+ members: [person]
81
+ state_code: IL
82
+ output:
83
+ il_liheap_base_payment: 200 # Gets actual heating expenses
@@ -0,0 +1,16 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class ca_riv_general_relief(Variable):
5
+ value_type = float
6
+ entity = SPMUnit
7
+ unit = USD
8
+ label = "Riverside County General Relief"
9
+ definition_period = MONTH
10
+ defined_for = "ca_riv_general_relief_eligible"
11
+
12
+ adds = [
13
+ "ca_riv_general_relief_needs_standards",
14
+ "ca_riv_general_relief_special_needs_amount",
15
+ ]
16
+ subtracts = ["ca_riv_general_relief_countable_income"]
@@ -0,0 +1,14 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class ca_riv_general_relief_budget_unit_size(Variable):
5
+ value_type = int
6
+ entity = SPMUnit
7
+ label = "Riverside County General Relief budget unit size"
8
+ definition_period = MONTH
9
+ defined_for = "in_riv"
10
+
11
+ # Ineligible persons in the SPM Unit cannot receive GR benefits.
12
+ # The number of ineligible person would never exceed the number of people in the SPM Unit.
13
+ adds = ["spm_unit_size"]
14
+ subtracts = ["ca_riv_general_relief_ineligible_person"]
@@ -0,0 +1,47 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class ca_riv_general_relief_eligible(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Eligible for the Riverside County General Relief"
8
+ definition_period = MONTH
9
+ defined_for = "in_riv"
10
+
11
+ def formula(spm_unit, period, parameters):
12
+ p = parameters(period).gov.local.ca.riv.general_relief
13
+ age = spm_unit.members("monthly_age", period)
14
+ # Adults with dependent children under certain age are NOT eligible for GA.
15
+ # They should apply for CalWORKs (California's TANF) instead.
16
+ age_eligible = spm_unit.all(age >= p.age_threshold)
17
+
18
+ immigration_status_eligible = (
19
+ add(
20
+ spm_unit,
21
+ period,
22
+ ["ca_riv_general_relief_immigration_status_eligible"],
23
+ )
24
+ > 0
25
+ )
26
+ meets_work_requirements = (
27
+ add(
28
+ spm_unit,
29
+ period,
30
+ ["ca_riv_general_relief_meets_work_requirements"],
31
+ )
32
+ > 0
33
+ )
34
+ property_eligible = spm_unit(
35
+ "ca_riv_general_relief_property_eligible", period
36
+ )
37
+ income_eligible = spm_unit(
38
+ "ca_riv_general_relief_income_eligible", period
39
+ )
40
+
41
+ return (
42
+ age_eligible
43
+ & immigration_status_eligible
44
+ & property_eligible
45
+ & income_eligible
46
+ & meets_work_requirements
47
+ )
@@ -0,0 +1,15 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class ca_riv_general_relief_immigration_status_eligible(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Eligible for the Riverside County General Relief due to immigration status"
8
+ definition_period = MONTH
9
+ defined_for = "in_riv"
10
+
11
+ def formula(person, period, parameters):
12
+ p = parameters(period).gov.local.ca.riv.general_relief
13
+ immigration_status = person("immigration_status", period)
14
+ immigration_status_str = immigration_status.decode_to_str()
15
+ return np.isin(immigration_status_str, p.qualified_immigration_status)
@@ -0,0 +1,18 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class ca_riv_general_relief_income_eligible(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Eligible for the Riverside County General Relief due to income"
8
+ definition_period = MONTH
9
+ defined_for = "in_riv"
10
+
11
+ def formula(spm_unit, period, parameters):
12
+ countable_income = spm_unit(
13
+ "ca_riv_general_relief_countable_income", period
14
+ )
15
+ needs_standards = spm_unit(
16
+ "ca_riv_general_relief_needs_standards", period
17
+ )
18
+ return countable_income <= needs_standards
@@ -0,0 +1,25 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class ca_riv_general_relief_ineligible_person(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Ineligible person for the Riverside County General Relief"
8
+ definition_period = MONTH
9
+ defined_for = "in_riv"
10
+
11
+ def formula(person, period, parameters):
12
+ receives_ssi_or_tanf = (
13
+ add(person.spm_unit, period, ["ssi", "ca_tanf"]) > 0
14
+ )
15
+ immigration_status_eligible = person(
16
+ "ca_riv_general_relief_immigration_status_eligible", period
17
+ )
18
+ meets_work_requirement = person(
19
+ "ca_riv_general_relief_meets_work_requirements", period
20
+ )
21
+ return (
22
+ receives_ssi_or_tanf
23
+ | ~immigration_status_eligible
24
+ | ~meets_work_requirement
25
+ )
@@ -0,0 +1,43 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class ca_riv_general_relief_meets_work_requirements(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Meets work requirements for the Riverside County General Relief"
8
+ definition_period = MONTH
9
+ defined_for = "in_riv"
10
+
11
+ def formula(person, period, parameters):
12
+ p = parameters(
13
+ period
14
+ ).gov.local.ca.riv.general_relief.work_exempted_age
15
+ # Person who is actively searching for jobs also qualify for work requirements
16
+ is_working = (
17
+ add(
18
+ person, period, ["employment_income", "self_employment_income"]
19
+ )
20
+ > 0
21
+ )
22
+ # Check if person is a qualifying secondary school student
23
+ age = person("monthly_age", period)
24
+ is_full_time_student = person("is_full_time_student", period)
25
+ in_secondary_school = person("is_in_secondary_school", period)
26
+ is_qualifying_secondary_student = (
27
+ is_full_time_student & in_secondary_school
28
+ )
29
+ # Age-based exemptions have different thresholds based on student status:
30
+ # - Full-time secondary students: exempt if younger than threshold
31
+ # - Non-students: exempt if older than threshold (senior citizens)
32
+ work_exempted_due_to_age = where(
33
+ is_qualifying_secondary_student,
34
+ age < p.younger, # Student exemption: too young
35
+ age >= p.older, # Senior exemption: too old
36
+ )
37
+ # Incapacitated or need to caring full time for a member of household
38
+ has_incapable_of_self_care = person.spm_unit.any(
39
+ person("is_incapable_of_self_care", period)
40
+ )
41
+ return (
42
+ is_working | work_exempted_due_to_age | has_incapable_of_self_care
43
+ )
@@ -0,0 +1,16 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class ca_riv_general_relief_property_eligible(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Meets property limit for Riverside County General Relief"
8
+ definition_period = YEAR
9
+ defined_for = "in_riv"
10
+
11
+ def formula(spm_unit, period, parameters):
12
+ p = parameters(period).gov.local.ca.riv.general_relief.property
13
+ total_property_value = spm_unit(
14
+ "ca_riv_general_relief_countable_property_value", period
15
+ )
16
+ return total_property_value < p.limit
@@ -0,0 +1,16 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class ca_riv_general_relief_countable_income(Variable):
5
+ value_type = float
6
+ entity = SPMUnit
7
+ unit = USD
8
+ label = "Riverside County General Relief countable income"
9
+ definition_period = MONTH
10
+ defined_for = "in_riv"
11
+
12
+ # This value cannot be negative because the exclusion is calculated
13
+ # as a fraction of the excluded person's income, determined by
14
+ # household size and the number of applicants.
15
+ adds = ["ca_riv_general_relief_countable_income_person"]
16
+ subtracts = ["ca_riv_general_relief_excluded_income"]
@@ -0,0 +1,14 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class ca_riv_general_relief_countable_income_person(Variable):
5
+ value_type = float
6
+ entity = Person
7
+ unit = USD
8
+ label = "Person's countable income before proration"
9
+ definition_period = MONTH
10
+
11
+ adds = [
12
+ "ca_riv_general_relief_net_earned_income",
13
+ "ca_riv_general_relief_unearned_income",
14
+ ]
@@ -0,0 +1,22 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class ca_riv_general_relief_excluded_income(Variable):
5
+ value_type = float
6
+ entity = Person
7
+ unit = USD
8
+ label = "Income amount excluded from ineligible household members due to proration under Riverside County General Relief Program"
9
+ definition_period = MONTH
10
+ defined_for = "ca_riv_general_relief_ineligible_person"
11
+
12
+ def formula(person, period, parameters):
13
+ income = person(
14
+ "ca_riv_general_relief_countable_income_person", period
15
+ )
16
+ spm_unit = person.spm_unit
17
+ needs_unit_size = spm_unit("spm_unit_size", period)
18
+ budget_unit_size = spm_unit(
19
+ "ca_riv_general_relief_budget_unit_size", period
20
+ )
21
+ exclusion_rate = (needs_unit_size - budget_unit_size) / needs_unit_size
22
+ return exclusion_rate * income