policyengine-us 1.418.0__py3-none-any.whl → 1.420.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 (100) hide show
  1. policyengine_us/parameters/gov/dhs/immigration/qualified_noncitizen_status.yaml +18 -0
  2. policyengine_us/parameters/gov/states/tx/tanf/age_threshold/minor_child.yaml +13 -0
  3. policyengine_us/parameters/gov/states/tx/tanf/age_threshold/student_dependent.yaml +13 -0
  4. policyengine_us/parameters/gov/states/tx/tanf/income/deductions/child_support.yaml +14 -0
  5. policyengine_us/parameters/gov/states/tx/tanf/income/deductions/dependent_care.yaml +23 -0
  6. policyengine_us/parameters/gov/states/tx/tanf/income/deductions/work_expense.yaml +13 -0
  7. policyengine_us/parameters/gov/states/tx/tanf/income/disregards/applicant_fraction.yaml +12 -0
  8. policyengine_us/parameters/gov/states/tx/tanf/income/disregards/continuing_recipient_cap.yaml +13 -0
  9. policyengine_us/parameters/gov/states/tx/tanf/income/disregards/continuing_recipient_months.yaml +14 -0
  10. policyengine_us/parameters/gov/states/tx/tanf/income/disregards/continuing_recipient_rate.yaml +13 -0
  11. policyengine_us/parameters/gov/states/tx/tanf/income/sources/earned.yaml +15 -0
  12. policyengine_us/parameters/gov/states/tx/tanf/income/sources/unearned.yaml +28 -0
  13. policyengine_us/parameters/gov/states/tx/tanf/minimum_grant.yaml +13 -0
  14. policyengine_us/parameters/gov/states/tx/tanf/needs_standard/budgetary_needs/additional_person.yaml +17 -0
  15. policyengine_us/parameters/gov/states/tx/tanf/needs_standard/budgetary_needs/caretaker_with_second_parent.yaml +81 -0
  16. policyengine_us/parameters/gov/states/tx/tanf/needs_standard/budgetary_needs/caretaker_without_second_parent.yaml +85 -0
  17. policyengine_us/parameters/gov/states/tx/tanf/needs_standard/budgetary_needs/non_caretaker.yaml +85 -0
  18. policyengine_us/parameters/gov/states/tx/tanf/needs_standard/recognizable_needs/additional_person.yaml +17 -0
  19. policyengine_us/parameters/gov/states/tx/tanf/needs_standard/recognizable_needs/rate.yaml +17 -0
  20. policyengine_us/parameters/gov/states/tx/tanf/ottanf/payment_amount.yaml +13 -0
  21. policyengine_us/parameters/gov/states/tx/tanf/payment_standard/additional_person.yaml +19 -0
  22. policyengine_us/parameters/gov/states/tx/tanf/payment_standard/caretaker_with_second_parent.yaml +105 -0
  23. policyengine_us/parameters/gov/states/tx/tanf/payment_standard/caretaker_without_second_parent.yaml +112 -0
  24. policyengine_us/parameters/gov/states/tx/tanf/payment_standard/non_caretaker.yaml +111 -0
  25. policyengine_us/parameters/gov/states/tx/tanf/resources/resource_limit.yaml +13 -0
  26. policyengine_us/parameters/gov/states/tx/tanf/resources/vehicle_exemption.yaml +11 -0
  27. policyengine_us/parameters/gov/states/tx/uct/lifeline/fpg_limit.yaml +10 -0
  28. policyengine_us/parameters/gov/states/tx/uct/lifeline/supplement.yaml +10 -0
  29. policyengine_us/tests/policy/baseline/gov/fcc/lifeline/is_lifeline_eligible.yaml +10 -0
  30. policyengine_us/tests/policy/baseline/gov/fcc/lifeline/is_lifeline_income_eligible.yaml +47 -0
  31. policyengine_us/tests/policy/baseline/gov/fcc/lifeline/lifeline.yaml +19 -0
  32. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/assistance_unit/tx_tanf_age_eligible_child.yaml +34 -0
  33. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/assistance_unit/tx_tanf_assistance_unit_size.yaml +62 -0
  34. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/assistance_unit/tx_tanf_categorically_eligible_person.yaml +49 -0
  35. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/assistance_unit/tx_tanf_eligible_child.yaml +34 -0
  36. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/assistance_unit/tx_tanf_eligible_parent.yaml +38 -0
  37. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_budgetary_needs.yaml +65 -0
  38. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_budgetary_needs_test.yaml +30 -0
  39. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_caretaker_type.yaml +116 -0
  40. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_eligible.yaml +123 -0
  41. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_income_eligible.yaml +69 -0
  42. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_recognizable_needs_test.yaml +54 -0
  43. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_resources_eligible.yaml +44 -0
  44. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/income/deductions/tx_tanf_child_support_deduction.yaml +55 -0
  45. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/income/deductions/tx_tanf_dependent_care_deduction.yaml +54 -0
  46. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/income/earned/tx_tanf_countable_earned_income.yaml +39 -0
  47. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/income/earned/tx_tanf_earned_income_after_disregard_person.yaml +36 -0
  48. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/income/tx_tanf_income_for_budgetary_needs_test.yaml +102 -0
  49. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/income/unearned/tx_tanf_countable_unearned_income.yaml +49 -0
  50. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/integration.yaml +291 -0
  51. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/ottanf/tx_ottanf.yaml +47 -0
  52. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/ottanf/tx_ottanf_crisis_criteria.yaml +17 -0
  53. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/ottanf/tx_ottanf_eligible.yaml +158 -0
  54. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/resources/tx_tanf_countable_resources.yaml +39 -0
  55. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/tx_regular_tanf.yaml +74 -0
  56. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/tx_tanf.yaml +89 -0
  57. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/tx_tanf_payment_standard.yaml +61 -0
  58. policyengine_us/tests/policy/baseline/gov/states/tx/uct/lifeline/integration.yaml +251 -0
  59. policyengine_us/tests/policy/baseline/household/demographic/person/is_citizen_or_legal_immigrant.yaml +55 -0
  60. policyengine_us/variables/gov/fcc/lifeline/is_lifeline_eligible.py +3 -4
  61. policyengine_us/variables/gov/fcc/lifeline/is_lifeline_income_eligible.py +35 -0
  62. policyengine_us/variables/gov/fcc/lifeline/lifeline.py +5 -2
  63. policyengine_us/variables/gov/states/tx/tanf/assistance_unit/tx_tanf_age_eligible_child.py +27 -0
  64. policyengine_us/variables/gov/states/tx/tanf/assistance_unit/tx_tanf_assistance_unit_size.py +18 -0
  65. policyengine_us/variables/gov/states/tx/tanf/assistance_unit/tx_tanf_categorically_eligible_person.py +19 -0
  66. policyengine_us/variables/gov/states/tx/tanf/assistance_unit/tx_tanf_eligible_child.py +24 -0
  67. policyengine_us/variables/gov/states/tx/tanf/assistance_unit/tx_tanf_eligible_parent.py +24 -0
  68. policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_budgetary_needs.py +57 -0
  69. policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_budgetary_needs_test.py +21 -0
  70. policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_caretaker_type.py +50 -0
  71. policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_eligible.py +29 -0
  72. policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_income_eligible.py +40 -0
  73. policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_recognizable_needs_test.py +23 -0
  74. policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_resources_eligible.py +19 -0
  75. policyengine_us/variables/gov/states/tx/tanf/income/deductions/tx_tanf_child_support_deduction.py +21 -0
  76. policyengine_us/variables/gov/states/tx/tanf/income/deductions/tx_tanf_dependent_care_deduction.py +39 -0
  77. policyengine_us/variables/gov/states/tx/tanf/income/earned/tx_tanf_countable_earned_income.py +28 -0
  78. policyengine_us/variables/gov/states/tx/tanf/income/earned/tx_tanf_earned_income_after_disregard_person.py +52 -0
  79. policyengine_us/variables/gov/states/tx/tanf/income/earned/tx_tanf_gross_earned_income.py +16 -0
  80. policyengine_us/variables/gov/states/tx/tanf/income/tx_tanf_countable_income.py +19 -0
  81. policyengine_us/variables/gov/states/tx/tanf/income/tx_tanf_income_for_budgetary_needs_test.py +47 -0
  82. policyengine_us/variables/gov/states/tx/tanf/income/unearned/tx_tanf_countable_unearned_income.py +27 -0
  83. policyengine_us/variables/gov/states/tx/tanf/income/unearned/tx_tanf_gross_unearned_income.py +16 -0
  84. policyengine_us/variables/gov/states/tx/tanf/ottanf/tx_ottanf.py +17 -0
  85. policyengine_us/variables/gov/states/tx/tanf/ottanf/tx_ottanf_crisis_criteria.py +21 -0
  86. policyengine_us/variables/gov/states/tx/tanf/ottanf/tx_ottanf_eligible.py +36 -0
  87. policyengine_us/variables/gov/states/tx/tanf/resources/tx_tanf_countable_resources.py +31 -0
  88. policyengine_us/variables/gov/states/tx/tanf/tx_regular_tanf.py +27 -0
  89. policyengine_us/variables/gov/states/tx/tanf/tx_tanf.py +25 -0
  90. policyengine_us/variables/gov/states/tx/tanf/tx_tanf_payment_standard.py +51 -0
  91. policyengine_us/variables/gov/states/tx/uct/lifeline/tx_lifeline_supplement.py +13 -0
  92. policyengine_us/variables/household/demographic/person/is_citizen_or_legal_immigrant.py +22 -0
  93. {policyengine_us-1.418.0.dist-info → policyengine_us-1.420.0.dist-info}/METADATA +1 -1
  94. {policyengine_us-1.418.0.dist-info → policyengine_us-1.420.0.dist-info}/RECORD +97 -12
  95. policyengine_us/parameters/gov/states/tx/tanf/monthly_income_limit.yaml +0 -31
  96. policyengine_us/tests/policy/baseline/gov/states/tx/tanf/tx_tanf_income_limit.yaml +0 -17
  97. policyengine_us/variables/gov/states/tx/tanf/tx_tanf_income_limit.py +0 -18
  98. {policyengine_us-1.418.0.dist-info → policyengine_us-1.420.0.dist-info}/WHEEL +0 -0
  99. {policyengine_us-1.418.0.dist-info → policyengine_us-1.420.0.dist-info}/entry_points.txt +0 -0
  100. {policyengine_us-1.418.0.dist-info → policyengine_us-1.420.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,89 @@
1
+ - name: Case 1, single parent with no income receives full grant.
2
+ period: 2025-01
3
+ input:
4
+ people:
5
+ person1:
6
+ age: 30
7
+ is_tax_unit_head_or_spouse: true
8
+ employment_income: 0
9
+ person2:
10
+ age: 10
11
+ spm_units:
12
+ spm_unit:
13
+ members: [person1, person2]
14
+ spm_unit_cash_assets: 800
15
+ is_tanf_enrolled: false
16
+ households:
17
+ household:
18
+ members: [person1, person2]
19
+ state_code: TX
20
+ output:
21
+ tx_regular_tanf: 320
22
+
23
+ - name: Case 2, benefit reduced by countable income.
24
+ period: 2025-01
25
+ absolute_error_margin: 0.01
26
+ input:
27
+ people:
28
+ person1:
29
+ age: 30
30
+ is_tax_unit_head_or_spouse: true
31
+ employment_income: 3_000
32
+ person2:
33
+ age: 10
34
+ spm_units:
35
+ spm_unit:
36
+ members: [person1, person2]
37
+ spm_unit_cash_assets: 800
38
+ is_tanf_enrolled: false
39
+ households:
40
+ household:
41
+ members: [person1, person2]
42
+ state_code: TX
43
+ output:
44
+ tx_regular_tanf: 232.90
45
+
46
+ - name: Case 3, minimum grant applied.
47
+ period: 2025-01
48
+ absolute_error_margin: 0.01
49
+ input:
50
+ people:
51
+ person1:
52
+ age: 30
53
+ is_tax_unit_head_or_spouse: true
54
+ employment_income: 3_720
55
+ person2:
56
+ age: 10
57
+ spm_units:
58
+ spm_unit:
59
+ members: [person1, person2]
60
+ spm_unit_cash_assets: 800
61
+ is_tanf_enrolled: false
62
+ households:
63
+ household:
64
+ members: [person1, person2]
65
+ state_code: TX
66
+ output:
67
+ tx_regular_tanf: 192.70
68
+
69
+ - name: Case 4, ineligible household receives zero.
70
+ period: 2025-01
71
+ input:
72
+ people:
73
+ person1:
74
+ age: 30
75
+ is_tax_unit_head_or_spouse: true
76
+ employment_income: 24_000
77
+ person2:
78
+ age: 10
79
+ spm_units:
80
+ spm_unit:
81
+ members: [person1, person2]
82
+ spm_unit_cash_assets: 800
83
+ is_tanf_enrolled: false
84
+ households:
85
+ household:
86
+ members: [person1, person2]
87
+ state_code: TX
88
+ output:
89
+ tx_regular_tanf: 0
@@ -0,0 +1,61 @@
1
+ - name: Case 1, caretaker without second parent size 2.
2
+ period: 2025-01
3
+ input:
4
+ people:
5
+ person1:
6
+ age: 30
7
+ is_tax_unit_head_or_spouse: true
8
+ person2:
9
+ age: 10
10
+ spm_units:
11
+ spm_unit:
12
+ members: [person1, person2]
13
+ households:
14
+ household:
15
+ members: [person1, person2]
16
+ state_code: TX
17
+ output:
18
+ tx_tanf_payment_standard: 320
19
+
20
+ - name: Case 2, caretaker with second parent size 3.
21
+ period: 2025-01
22
+ input:
23
+ people:
24
+ person1:
25
+ age: 30
26
+ is_tax_unit_head_or_spouse: true
27
+ person2:
28
+ age: 29
29
+ is_tax_unit_head_or_spouse: true
30
+ person3:
31
+ age: 10
32
+ spm_units:
33
+ spm_unit:
34
+ members: [person1, person2, person3]
35
+ households:
36
+ household:
37
+ members: [person1, person2, person3]
38
+ state_code: TX
39
+ output:
40
+ tx_tanf_payment_standard: 405
41
+
42
+ - name: Case 3, non-caretaker size 2.
43
+ period: 2025-01
44
+ input:
45
+ people:
46
+ person1:
47
+ age: 60
48
+ is_tax_unit_head_or_spouse: false
49
+ person2:
50
+ age: 10
51
+ person3:
52
+ age: 8
53
+ spm_units:
54
+ spm_unit:
55
+ members: [person1, person2, person3]
56
+ households:
57
+ household:
58
+ members: [person1, person2, person3]
59
+ state_code: TX
60
+ output:
61
+ tx_tanf_payment_standard: 182
@@ -0,0 +1,251 @@
1
+ - name: Texas Lifeline complete flow - low income eligible household
2
+ period: 2024
3
+ input:
4
+ people:
5
+ person1:
6
+ age: 35
7
+ employment_income: 15_000
8
+ spm_units:
9
+ spm_unit:
10
+ members: [person1]
11
+ fcc_fpg_ratio: 1.35 # Below 135% federal threshold and 150% Texas threshold
12
+ broadband_cost: 600 # $50/month
13
+ phone_cost: 360 # $30/month
14
+ households:
15
+ household:
16
+ members: [person1]
17
+ state_code: TX
18
+ output:
19
+ # Income eligibility checks
20
+ is_lifeline_eligible: true # Federal eligibility
21
+
22
+ # Total Lifeline benefit includes Texas supplement
23
+ # Base: $9.25/month, TX supplement: $3.50/month = $12.75/month
24
+ # Annual: $12.75 * 12 = $153
25
+ lifeline: 153
26
+
27
+ - name: Texas household at exactly 150% FPG threshold
28
+ period: 2024
29
+ input:
30
+ people:
31
+ person1:
32
+ age: 40
33
+ employment_income: 21_870 # Exactly 150% of FPG for 1 person
34
+ spm_units:
35
+ spm_unit:
36
+ members: [person1]
37
+ fcc_fpg_ratio: 1.50 # Exactly at Texas threshold
38
+ broadband_cost: 480 # $40/month
39
+ households:
40
+ household:
41
+ members: [person1]
42
+ state_code: TX
43
+ output:
44
+ is_lifeline_eligible: true
45
+ lifeline: 153 # ($9.25 + $3.50) * 12
46
+
47
+ - name: Texas household just above 150% FPG threshold
48
+ period: 2024
49
+ input:
50
+ people:
51
+ person1:
52
+ age: 40
53
+ employment_income: 22_000 # Just above 150% of FPG
54
+ spm_units:
55
+ spm_unit:
56
+ members: [person1]
57
+ fcc_fpg_ratio: 1.51 # Above Texas threshold
58
+ broadband_cost: 480
59
+ households:
60
+ household:
61
+ members: [person1]
62
+ state_code: TX
63
+ output:
64
+ is_lifeline_eligible: true # Federal limit is 135%, Texas is 150%
65
+ lifeline: 153 # Still gets benefit via federal eligibility
66
+
67
+ - name: Texas household with SNAP - categorically eligible
68
+ period: 2024
69
+ input:
70
+ people:
71
+ person1:
72
+ age: 30
73
+ employment_income: 30_000 # Above income limits
74
+ spm_units:
75
+ spm_unit:
76
+ members: [person1]
77
+ snap: 200 # Receives SNAP
78
+ fcc_fpg_ratio: 2.0 # Above income thresholds
79
+ broadband_cost: 720 # $60/month
80
+ households:
81
+ household:
82
+ members: [person1]
83
+ state_code: TX
84
+ output:
85
+ is_lifeline_eligible: true # But categorically eligible via SNAP
86
+ lifeline: 153 # Full benefit with supplement
87
+
88
+ - name: Texas family of four below income threshold
89
+ period: 2024
90
+ input:
91
+ people:
92
+ parent1:
93
+ age: 35
94
+ employment_income: 25_000
95
+ parent2:
96
+ age: 33
97
+ employment_income: 10_000
98
+ child1:
99
+ age: 10
100
+ child2:
101
+ age: 8
102
+ spm_units:
103
+ spm_unit:
104
+ members: [parent1, parent2, child1, child2]
105
+ fcc_fpg_ratio: 0.9 # Well below thresholds
106
+ broadband_cost: 600
107
+ phone_cost: 300
108
+ households:
109
+ household:
110
+ members: [parent1, parent2, child1, child2]
111
+ state_code: TX
112
+ output:
113
+ is_lifeline_eligible: true
114
+ lifeline: 153 # One benefit per SPM unit with TX supplement
115
+
116
+ - name: Texas elderly person with SSI - categorically eligible
117
+ period: 2024
118
+ input:
119
+ people:
120
+ person1:
121
+ age: 70
122
+ ssi: 9_600 # Annual SSI
123
+ spm_units:
124
+ spm_unit:
125
+ members: [person1]
126
+ broadband_cost: 480
127
+ households:
128
+ household:
129
+ members: [person1]
130
+ state_code: TX
131
+ output:
132
+ is_lifeline_eligible: true # SSI makes them categorically eligible
133
+ lifeline: 153
134
+
135
+ - name: Texas disabled person with Medicaid
136
+ period: 2024
137
+ input:
138
+ people:
139
+ person1:
140
+ age: 45
141
+ is_disabled: true
142
+ medicaid: 1
143
+ spm_units:
144
+ spm_unit:
145
+ members: [person1]
146
+ broadband_cost: 600
147
+ households:
148
+ household:
149
+ members: [person1]
150
+ state_code: TX
151
+ output:
152
+ is_lifeline_eligible: true # Medicaid makes them eligible
153
+ lifeline: 153
154
+
155
+ - name: Texas rural tribal land household gets both supplements
156
+ period: 2024
157
+ input:
158
+ people:
159
+ person1:
160
+ age: 40
161
+ employment_income: 18_000
162
+ spm_units:
163
+ spm_unit:
164
+ members: [person1]
165
+ fcc_fpg_ratio: 1.2
166
+ broadband_cost: 1_200 # $100/month
167
+ households:
168
+ household:
169
+ members: [person1]
170
+ state_code: TX
171
+ is_rural: true
172
+ is_on_tribal_land: true
173
+ output:
174
+ is_lifeline_eligible: true
175
+ # Base: $9.25 + Rural Tribal: $25 + TX: $3.50 = $37.75/month
176
+ lifeline: 453 # $37.75 * 12
177
+
178
+ - name: Texas household with costs below benefit cap
179
+ period: 2024
180
+ input:
181
+ people:
182
+ person1:
183
+ age: 30
184
+ employment_income: 15_000
185
+ spm_units:
186
+ spm_unit:
187
+ members: [person1]
188
+ fcc_fpg_ratio: 1.0
189
+ broadband_cost: 60 # Only $5/month
190
+ phone_cost: 36 # Only $3/month
191
+ households:
192
+ household:
193
+ members: [person1]
194
+ state_code: TX
195
+ output:
196
+ is_lifeline_eligible: true
197
+ # Actual costs ($96) are less than max benefit ($153)
198
+ lifeline: 96 # Limited to actual costs
199
+
200
+ - name: Texas household with zero telecom costs
201
+ period: 2024
202
+ input:
203
+ people:
204
+ person1:
205
+ age: 30
206
+ employment_income: 10_000
207
+ spm_units:
208
+ spm_unit:
209
+ members: [person1]
210
+ fcc_fpg_ratio: 0.7
211
+ broadband_cost: 0
212
+ phone_cost: 0
213
+ households:
214
+ household:
215
+ members: [person1]
216
+ state_code: TX
217
+ output:
218
+ is_lifeline_eligible: true
219
+ lifeline: 0 # No costs to offset
220
+
221
+
222
+ - name: Two SPM units in Texas household - both eligible
223
+ period: 2024
224
+ input:
225
+ people:
226
+ person1:
227
+ age: 35
228
+ employment_income: 12_000
229
+ person2:
230
+ age: 65
231
+ employment_income: 8_000
232
+ spm_units:
233
+ spm_unit1:
234
+ members: [person1]
235
+ fcc_fpg_ratio: 0.8
236
+ broadband_cost: 300
237
+ phone_cost: 150
238
+ spm_unit2:
239
+ members: [person2]
240
+ fcc_fpg_ratio: 0.6
241
+ broadband_cost: 300
242
+ phone_cost: 150
243
+ households:
244
+ household:
245
+ members: [person1, person2]
246
+ state_code: TX
247
+ output:
248
+ # Each SPM unit is evaluated separately
249
+ is_lifeline_eligible: [true, true]
250
+ # Each could receive up to $153 (with TX supplement)
251
+ lifeline: [153, 153]
@@ -0,0 +1,55 @@
1
+ - name: Case 1, citizen eligible.
2
+ period: 2025-01
3
+ input:
4
+ immigration_status: CITIZEN
5
+ output:
6
+ is_citizen_or_legal_immigrant: true
7
+ # Citizen → eligible
8
+
9
+ - name: Case 2, legal permanent resident eligible.
10
+ period: 2025-01
11
+ input:
12
+ immigration_status: LEGAL_PERMANENT_RESIDENT
13
+ output:
14
+ is_citizen_or_legal_immigrant: true
15
+ # Qualified noncitizen → eligible
16
+
17
+ - name: Case 3, refugee eligible.
18
+ period: 2025-01
19
+ input:
20
+ immigration_status: REFUGEE
21
+ output:
22
+ is_citizen_or_legal_immigrant: true
23
+ # Qualified noncitizen → eligible
24
+
25
+ - name: Case 4, undocumented not eligible.
26
+ period: 2025-01
27
+ input:
28
+ immigration_status: UNDOCUMENTED
29
+ output:
30
+ is_citizen_or_legal_immigrant: false
31
+ # Not qualified immigration status → not eligible
32
+
33
+ - name: Case 5, DACA not eligible.
34
+ period: 2025-01
35
+ input:
36
+ immigration_status: DACA
37
+ output:
38
+ is_citizen_or_legal_immigrant: false
39
+ # Not qualified immigration status → not eligible
40
+
41
+ - name: Case 6, asylee eligible.
42
+ period: 2025-01
43
+ input:
44
+ immigration_status: ASYLEE
45
+ output:
46
+ is_citizen_or_legal_immigrant: true
47
+ # Qualified noncitizen → eligible
48
+
49
+ - name: Case 7, Cuban/Haitian entrant eligible.
50
+ period: 2025-01
51
+ input:
52
+ immigration_status: CUBAN_HAITIAN_ENTRANT
53
+ output:
54
+ is_citizen_or_legal_immigrant: true
55
+ # Qualified noncitizen → eligible
@@ -24,7 +24,6 @@ class is_lifeline_eligible(Variable):
24
24
  np.any(tribal_lifeline_programs),
25
25
  np.any(non_tribal_lifeline_programs),
26
26
  )
27
- fpg_ratio = spm_unit("fcc_fpg_ratio", period)
28
- fpg_limit = p.fpg_limit
29
- fpg_eligible = fpg_ratio <= fpg_limit
30
- return categorically_eligible | fpg_eligible
27
+ # Use the new unified income eligibility variable
28
+ income_eligible = spm_unit("is_lifeline_income_eligible", period)
29
+ return categorically_eligible | income_eligible
@@ -0,0 +1,35 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class is_lifeline_income_eligible(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Income-eligible for Lifeline"
8
+ documentation = (
9
+ "Meets income requirements for Lifeline (federal or state-expanded)"
10
+ )
11
+ definition_period = YEAR
12
+ reference = (
13
+ "https://www.law.cornell.edu/cfr/text/47/54.409",
14
+ "https://statutes.capitol.texas.gov/Docs/UT/htm/UT.55.htm#55.015",
15
+ )
16
+
17
+ def formula(spm_unit, period, parameters):
18
+ p = parameters(period).gov.fcc.lifeline
19
+ fpg_ratio = spm_unit("fcc_fpg_ratio", period)
20
+
21
+ # Some states expand eligibility beyond federal limit
22
+ state = spm_unit.household("state_code_str", period)
23
+ is_tx = state == "TX"
24
+
25
+ # Texas expands to 150% FPG per Texas Utilities Code § 55.015(d-1)
26
+ tx_p = parameters(period).gov.states.tx.uct.lifeline
27
+
28
+ # Use state-specific limit where applicable, otherwise federal (135%)
29
+ # Convert to float32 to match fpg_ratio dtype for comparison
30
+ # Without this, float32(1.35) > float64(1.35) due to precision differences
31
+ fpg_limit = where(is_tx, tx_p.fpg_limit, p.fpg_limit).astype(
32
+ np.float32
33
+ )
34
+
35
+ return fpg_ratio <= fpg_limit
@@ -33,11 +33,14 @@ class lifeline(Variable):
33
33
  base_amount,
34
34
  )
35
35
 
36
- max_monthly_amount = (
36
+ federal_monthly_amount = (
37
37
  base_amount
38
38
  + is_rural_tribal * p.fcc.lifeline.amount.rural_tribal_supplement
39
39
  )
40
- max_amount = max_monthly_amount * MONTHS_IN_YEAR
40
+ # Get TX supplement for the specific month (now properly defined as MONTH period)
41
+ tx_supplement = spm_unit("tx_lifeline_supplement", period.first_month)
42
+ total_monthly_amount = federal_monthly_amount + tx_supplement
43
+ max_amount = total_monthly_amount * MONTHS_IN_YEAR
41
44
  phone_broadband_cost = add(
42
45
  spm_unit, period, ["phone_cost", "broadband_cost"]
43
46
  )
@@ -0,0 +1,27 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_tanf_age_eligible_child(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Age-eligible child for Texas TANF based on demographics"
8
+ definition_period = MONTH
9
+ reference = (
10
+ "https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-220-tanf",
11
+ "https://www.law.cornell.edu/regulations/texas/1-TAC-372-307",
12
+ )
13
+ defined_for = StateCode.TX
14
+
15
+ def formula(person, period, parameters):
16
+ p = parameters(period).gov.states.tx.tanf.age_threshold
17
+ age = person("monthly_age", period)
18
+ is_dependent = person("is_tax_unit_dependent", period)
19
+ is_full_time_student = person("is_full_time_student", period)
20
+
21
+ age_eligible = where(
22
+ is_full_time_student,
23
+ age < p.student_dependent,
24
+ age < p.minor_child,
25
+ )
26
+
27
+ return age_eligible & is_dependent
@@ -0,0 +1,18 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_tanf_assistance_unit_size(Variable):
5
+ value_type = int
6
+ entity = SPMUnit
7
+ label = "Texas TANF assistance unit size"
8
+ definition_period = MONTH
9
+ reference = (
10
+ "https://www.law.cornell.edu/regulations/texas/1-Tex-Admin-Code-SS-372-104",
11
+ "https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-220-tanf",
12
+ )
13
+ defined_for = StateCode.TX
14
+
15
+ adds = [
16
+ "tx_tanf_eligible_child",
17
+ "tx_tanf_eligible_parent",
18
+ ]
@@ -0,0 +1,19 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_tanf_categorically_eligible_person(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ definition_period = MONTH
8
+ label = "Categorically eligible person for Texas TANF"
9
+ reference = (
10
+ "https://www.law.cornell.edu/regulations/texas/1-Tex-Admin-Code-SS-372-201",
11
+ "https://www.law.cornell.edu/regulations/texas/1-Tex-Admin-Code-SS-372-104",
12
+ )
13
+ defined_for = StateCode.TX
14
+
15
+ def formula(person, period, parameters):
16
+ immigration_eligible = person("is_citizen_or_legal_immigrant", period)
17
+ ssi = person("ssi", period)
18
+
19
+ return immigration_eligible & (ssi == 0)
@@ -0,0 +1,24 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_tanf_eligible_child(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ definition_period = MONTH
8
+ label = "Eligible child for Texas TANF (included in certified group)"
9
+ reference = (
10
+ "https://www.law.cornell.edu/regulations/texas/1-Tex-Admin-Code-SS-372-104",
11
+ "https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-220-tanf",
12
+ )
13
+ defined_for = StateCode.TX
14
+
15
+ def formula(person, period, parameters):
16
+ # Child must meet age/demographic requirements
17
+ age_eligible = person("tx_tanf_age_eligible_child", period)
18
+
19
+ # And meet inclusion requirements (immigration eligible, not receiving SSI)
20
+ inclusion_requirements = person(
21
+ "tx_tanf_categorically_eligible_person", period
22
+ )
23
+
24
+ return age_eligible & inclusion_requirements
@@ -0,0 +1,24 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_tanf_eligible_parent(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ definition_period = MONTH
8
+ label = "Eligible parent for Texas TANF (included in certified group)"
9
+ reference = (
10
+ "https://www.law.cornell.edu/regulations/texas/1-Tex-Admin-Code-SS-372-104",
11
+ "https://www.law.cornell.edu/regulations/texas/1-Tex-Admin-Code-SS-372-102",
12
+ )
13
+ defined_for = StateCode.TX
14
+
15
+ def formula(person, period, parameters):
16
+ # Per § 372.104, parents living in household must be included in certified group
17
+ is_parent = person("is_tax_unit_head_or_spouse", period)
18
+
19
+ # Must meet inclusion requirements
20
+ inclusion_requirements = person(
21
+ "tx_tanf_categorically_eligible_person", period
22
+ )
23
+
24
+ return is_parent & inclusion_requirements
@@ -0,0 +1,57 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_tanf_budgetary_needs(Variable):
5
+ value_type = float
6
+ entity = SPMUnit
7
+ label = "Texas TANF budgetary needs amount"
8
+ unit = USD
9
+ definition_period = MONTH
10
+ reference = (
11
+ "https://www.hhs.texas.gov/handbooks/texas-works-handbook/c-110-tanf",
12
+ "https://www.law.cornell.edu/regulations/texas/1-Tex-Admin-Code-SS-372-2",
13
+ )
14
+ defined_for = StateCode.TX
15
+
16
+ def formula(spm_unit, period, parameters):
17
+ # Budgetary needs varies by caretaker type and household size
18
+ size = spm_unit("tx_tanf_assistance_unit_size", period)
19
+ caretaker_type = spm_unit("tx_tanf_caretaker_type", period)
20
+ p = parameters(period).gov.states.tx.tanf.needs_standard
21
+
22
+ # Determine caretaker type
23
+ non_caretaker = (
24
+ caretaker_type == caretaker_type.possible_values.NON_CARETAKER
25
+ )
26
+ caretaker_without_second = (
27
+ caretaker_type
28
+ == caretaker_type.possible_values.CARETAKER_WITHOUT_SECOND_PARENT
29
+ )
30
+ caretaker_with_second = (
31
+ caretaker_type
32
+ == caretaker_type.possible_values.CARETAKER_WITH_SECOND_PARENT
33
+ )
34
+
35
+ # For sizes <= 15, use table; for sizes > 15, use size 15 + increment
36
+ size_capped = min_(size, 15)
37
+ additional_people = max_(size - 15, 0)
38
+ additional_amount = (
39
+ additional_people * p.budgetary_needs.additional_person
40
+ )
41
+
42
+ # Get base amount for size (capped at 15)
43
+ base_amount = select(
44
+ [non_caretaker, caretaker_without_second, caretaker_with_second],
45
+ [
46
+ p.budgetary_needs.non_caretaker.calc(size_capped),
47
+ p.budgetary_needs.caretaker_without_second_parent.calc(
48
+ size_capped
49
+ ),
50
+ p.budgetary_needs.caretaker_with_second_parent.calc(
51
+ size_capped
52
+ ),
53
+ ],
54
+ default=0,
55
+ )
56
+
57
+ return base_amount + additional_amount