policyengine-us 1.418.0__py3-none-any.whl → 1.419.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.
- policyengine_us/parameters/gov/dhs/immigration/qualified_noncitizen_status.yaml +18 -0
- policyengine_us/parameters/gov/states/tx/tanf/age_threshold/minor_child.yaml +13 -0
- policyengine_us/parameters/gov/states/tx/tanf/age_threshold/student_dependent.yaml +13 -0
- policyengine_us/parameters/gov/states/tx/tanf/income/deductions/child_support.yaml +14 -0
- policyengine_us/parameters/gov/states/tx/tanf/income/deductions/dependent_care.yaml +23 -0
- policyengine_us/parameters/gov/states/tx/tanf/income/deductions/work_expense.yaml +13 -0
- policyengine_us/parameters/gov/states/tx/tanf/income/disregards/applicant_fraction.yaml +12 -0
- policyengine_us/parameters/gov/states/tx/tanf/income/disregards/continuing_recipient_cap.yaml +13 -0
- policyengine_us/parameters/gov/states/tx/tanf/income/disregards/continuing_recipient_months.yaml +14 -0
- policyengine_us/parameters/gov/states/tx/tanf/income/disregards/continuing_recipient_rate.yaml +13 -0
- policyengine_us/parameters/gov/states/tx/tanf/income/sources/earned.yaml +15 -0
- policyengine_us/parameters/gov/states/tx/tanf/income/sources/unearned.yaml +28 -0
- policyengine_us/parameters/gov/states/tx/tanf/minimum_grant.yaml +13 -0
- policyengine_us/parameters/gov/states/tx/tanf/needs_standard/budgetary_needs/additional_person.yaml +17 -0
- policyengine_us/parameters/gov/states/tx/tanf/needs_standard/budgetary_needs/caretaker_with_second_parent.yaml +81 -0
- policyengine_us/parameters/gov/states/tx/tanf/needs_standard/budgetary_needs/caretaker_without_second_parent.yaml +85 -0
- policyengine_us/parameters/gov/states/tx/tanf/needs_standard/budgetary_needs/non_caretaker.yaml +85 -0
- policyengine_us/parameters/gov/states/tx/tanf/needs_standard/recognizable_needs/additional_person.yaml +17 -0
- policyengine_us/parameters/gov/states/tx/tanf/needs_standard/recognizable_needs/rate.yaml +17 -0
- policyengine_us/parameters/gov/states/tx/tanf/ottanf/payment_amount.yaml +13 -0
- policyengine_us/parameters/gov/states/tx/tanf/payment_standard/additional_person.yaml +19 -0
- policyengine_us/parameters/gov/states/tx/tanf/payment_standard/caretaker_with_second_parent.yaml +105 -0
- policyengine_us/parameters/gov/states/tx/tanf/payment_standard/caretaker_without_second_parent.yaml +112 -0
- policyengine_us/parameters/gov/states/tx/tanf/payment_standard/non_caretaker.yaml +111 -0
- policyengine_us/parameters/gov/states/tx/tanf/resources/resource_limit.yaml +13 -0
- policyengine_us/parameters/gov/states/tx/tanf/resources/vehicle_exemption.yaml +11 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/assistance_unit/tx_tanf_age_eligible_child.yaml +34 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/assistance_unit/tx_tanf_assistance_unit_size.yaml +62 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/assistance_unit/tx_tanf_categorically_eligible_person.yaml +49 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/assistance_unit/tx_tanf_eligible_child.yaml +34 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/assistance_unit/tx_tanf_eligible_parent.yaml +38 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_budgetary_needs.yaml +65 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_budgetary_needs_test.yaml +30 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_caretaker_type.yaml +116 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_eligible.yaml +123 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_income_eligible.yaml +69 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_recognizable_needs_test.yaml +54 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/eligibility/tx_tanf_resources_eligible.yaml +44 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/income/deductions/tx_tanf_child_support_deduction.yaml +55 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/income/deductions/tx_tanf_dependent_care_deduction.yaml +54 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/income/earned/tx_tanf_countable_earned_income.yaml +39 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/income/earned/tx_tanf_earned_income_after_disregard_person.yaml +36 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/income/tx_tanf_income_for_budgetary_needs_test.yaml +102 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/income/unearned/tx_tanf_countable_unearned_income.yaml +49 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/integration.yaml +291 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/ottanf/tx_ottanf.yaml +47 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/ottanf/tx_ottanf_crisis_criteria.yaml +17 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/ottanf/tx_ottanf_eligible.yaml +158 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/resources/tx_tanf_countable_resources.yaml +39 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/tx_regular_tanf.yaml +74 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/tx_tanf.yaml +89 -0
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/tx_tanf_payment_standard.yaml +61 -0
- policyengine_us/tests/policy/baseline/household/demographic/person/is_citizen_or_legal_immigrant.yaml +55 -0
- policyengine_us/variables/gov/states/tx/tanf/assistance_unit/tx_tanf_age_eligible_child.py +27 -0
- policyengine_us/variables/gov/states/tx/tanf/assistance_unit/tx_tanf_assistance_unit_size.py +18 -0
- policyengine_us/variables/gov/states/tx/tanf/assistance_unit/tx_tanf_categorically_eligible_person.py +19 -0
- policyengine_us/variables/gov/states/tx/tanf/assistance_unit/tx_tanf_eligible_child.py +24 -0
- policyengine_us/variables/gov/states/tx/tanf/assistance_unit/tx_tanf_eligible_parent.py +24 -0
- policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_budgetary_needs.py +57 -0
- policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_budgetary_needs_test.py +21 -0
- policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_caretaker_type.py +50 -0
- policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_eligible.py +29 -0
- policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_income_eligible.py +40 -0
- policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_recognizable_needs_test.py +23 -0
- policyengine_us/variables/gov/states/tx/tanf/eligibility/tx_tanf_resources_eligible.py +19 -0
- policyengine_us/variables/gov/states/tx/tanf/income/deductions/tx_tanf_child_support_deduction.py +21 -0
- policyengine_us/variables/gov/states/tx/tanf/income/deductions/tx_tanf_dependent_care_deduction.py +39 -0
- policyengine_us/variables/gov/states/tx/tanf/income/earned/tx_tanf_countable_earned_income.py +28 -0
- policyengine_us/variables/gov/states/tx/tanf/income/earned/tx_tanf_earned_income_after_disregard_person.py +52 -0
- policyengine_us/variables/gov/states/tx/tanf/income/earned/tx_tanf_gross_earned_income.py +16 -0
- policyengine_us/variables/gov/states/tx/tanf/income/tx_tanf_countable_income.py +19 -0
- policyengine_us/variables/gov/states/tx/tanf/income/tx_tanf_income_for_budgetary_needs_test.py +47 -0
- policyengine_us/variables/gov/states/tx/tanf/income/unearned/tx_tanf_countable_unearned_income.py +27 -0
- policyengine_us/variables/gov/states/tx/tanf/income/unearned/tx_tanf_gross_unearned_income.py +16 -0
- policyengine_us/variables/gov/states/tx/tanf/ottanf/tx_ottanf.py +17 -0
- policyengine_us/variables/gov/states/tx/tanf/ottanf/tx_ottanf_crisis_criteria.py +21 -0
- policyengine_us/variables/gov/states/tx/tanf/ottanf/tx_ottanf_eligible.py +36 -0
- policyengine_us/variables/gov/states/tx/tanf/resources/tx_tanf_countable_resources.py +31 -0
- policyengine_us/variables/gov/states/tx/tanf/tx_regular_tanf.py +27 -0
- policyengine_us/variables/gov/states/tx/tanf/tx_tanf.py +25 -0
- policyengine_us/variables/gov/states/tx/tanf/tx_tanf_payment_standard.py +51 -0
- policyengine_us/variables/household/demographic/person/is_citizen_or_legal_immigrant.py +22 -0
- {policyengine_us-1.418.0.dist-info → policyengine_us-1.419.0.dist-info}/METADATA +1 -1
- {policyengine_us-1.418.0.dist-info → policyengine_us-1.419.0.dist-info}/RECORD +87 -8
- policyengine_us/parameters/gov/states/tx/tanf/monthly_income_limit.yaml +0 -31
- policyengine_us/tests/policy/baseline/gov/states/tx/tanf/tx_tanf_income_limit.yaml +0 -17
- policyengine_us/variables/gov/states/tx/tanf/tx_tanf_income_limit.py +0 -18
- {policyengine_us-1.418.0.dist-info → policyengine_us-1.419.0.dist-info}/WHEEL +0 -0
- {policyengine_us-1.418.0.dist-info → policyengine_us-1.419.0.dist-info}/entry_points.txt +0 -0
- {policyengine_us-1.418.0.dist-info → policyengine_us-1.419.0.dist-info}/licenses/LICENSE +0 -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,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
|
|
@@ -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
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_budgetary_needs_test(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Meets Texas TANF budgetary needs test"
|
|
8
|
+
definition_period = MONTH
|
|
9
|
+
reference = "https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1340-income-limits"
|
|
10
|
+
defined_for = StateCode.TX
|
|
11
|
+
|
|
12
|
+
def formula(spm_unit, period, parameters):
|
|
13
|
+
# Budgetary needs test applies to applicants (not receiving TANF in last 4 months)
|
|
14
|
+
# Household passes if budgetary needs > income
|
|
15
|
+
|
|
16
|
+
budgetary_needs = spm_unit("tx_tanf_budgetary_needs", period)
|
|
17
|
+
income_for_test = spm_unit(
|
|
18
|
+
"tx_tanf_income_for_budgetary_needs_test", period
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
return budgetary_needs > income_for_test
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class TxTanfCaretakerType(Enum):
|
|
5
|
+
NON_CARETAKER = "Non-caretaker"
|
|
6
|
+
CARETAKER_WITHOUT_SECOND_PARENT = "Caretaker without second parent"
|
|
7
|
+
CARETAKER_WITH_SECOND_PARENT = "Caretaker with second parent"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class tx_tanf_caretaker_type(Variable):
|
|
11
|
+
value_type = Enum
|
|
12
|
+
possible_values = TxTanfCaretakerType
|
|
13
|
+
default_value = TxTanfCaretakerType.NON_CARETAKER
|
|
14
|
+
entity = SPMUnit
|
|
15
|
+
label = "Texas TANF caretaker type"
|
|
16
|
+
definition_period = MONTH
|
|
17
|
+
reference = (
|
|
18
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/c-110-tanf"
|
|
19
|
+
)
|
|
20
|
+
defined_for = StateCode.TX
|
|
21
|
+
|
|
22
|
+
def formula(spm_unit, period, parameters):
|
|
23
|
+
# Caretaker type determines payment standard amount
|
|
24
|
+
# Based on number of parents included in certified group
|
|
25
|
+
|
|
26
|
+
person = spm_unit.members
|
|
27
|
+
eligible_parent = person("tx_tanf_eligible_parent", period)
|
|
28
|
+
eligible_child = person("tx_tanf_eligible_child", period)
|
|
29
|
+
|
|
30
|
+
# Count payment-eligible parents and children
|
|
31
|
+
parent_count = spm_unit.sum(eligible_parent)
|
|
32
|
+
has_eligible_child = spm_unit.any(eligible_child)
|
|
33
|
+
|
|
34
|
+
# Determine caretaker type
|
|
35
|
+
# Non-caretaker: No parents in certified group (child-only cases)
|
|
36
|
+
# Caretaker without second: One parent in certified group
|
|
37
|
+
# Caretaker with second: Two or more parents in certified group
|
|
38
|
+
non_caretaker = has_eligible_child & (parent_count == 0)
|
|
39
|
+
caretaker_without_second = has_eligible_child & (parent_count == 1)
|
|
40
|
+
caretaker_with_second = has_eligible_child & (parent_count >= 2)
|
|
41
|
+
|
|
42
|
+
return select(
|
|
43
|
+
[non_caretaker, caretaker_without_second, caretaker_with_second],
|
|
44
|
+
[
|
|
45
|
+
TxTanfCaretakerType.NON_CARETAKER,
|
|
46
|
+
TxTanfCaretakerType.CARETAKER_WITHOUT_SECOND_PARENT,
|
|
47
|
+
TxTanfCaretakerType.CARETAKER_WITH_SECOND_PARENT,
|
|
48
|
+
],
|
|
49
|
+
default=TxTanfCaretakerType.NON_CARETAKER,
|
|
50
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_eligible(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Eligible for Texas Temporary Assistance for Needy Families (TANF)"
|
|
8
|
+
definition_period = MONTH
|
|
9
|
+
reference = (
|
|
10
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-220-tanf",
|
|
11
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-2420-eligibility-requirements",
|
|
12
|
+
"https://www.law.cornell.edu/regulations/texas/title-1/part-15/chapter-372/subchapter-B",
|
|
13
|
+
)
|
|
14
|
+
defined_for = StateCode.TX
|
|
15
|
+
|
|
16
|
+
def formula(spm_unit, period, parameters):
|
|
17
|
+
person = spm_unit.members
|
|
18
|
+
|
|
19
|
+
# Must have at least one eligible child in certified group
|
|
20
|
+
# (eligible child already includes immigration and SSI checks)
|
|
21
|
+
has_eligible_child = spm_unit.any(
|
|
22
|
+
person("tx_tanf_eligible_child", period)
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
# Financial eligibility
|
|
26
|
+
income_eligible = spm_unit("tx_tanf_income_eligible", period)
|
|
27
|
+
resources_eligible = spm_unit("tx_tanf_resources_eligible", period)
|
|
28
|
+
|
|
29
|
+
return has_eligible_child & income_eligible & resources_eligible
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_income_eligible(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Meets Texas TANF income test"
|
|
8
|
+
definition_period = MONTH
|
|
9
|
+
reference = "https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1340-income-limits"
|
|
10
|
+
defined_for = StateCode.TX
|
|
11
|
+
|
|
12
|
+
def formula(spm_unit, period, parameters):
|
|
13
|
+
# Texas TANF has two income eligibility tests per § 372.408:
|
|
14
|
+
#
|
|
15
|
+
# Budgetary needs test (§ 372.408 (a)(1)):
|
|
16
|
+
# - Uses income WITHOUT earned income disregards (1/3 or 90%)
|
|
17
|
+
# - Income < budgetary needs amount (100% of needs)
|
|
18
|
+
# - Applies to: NEW applicants only
|
|
19
|
+
#
|
|
20
|
+
# Recognizable needs test (§ 372.408 (a)(2)):
|
|
21
|
+
# - Uses income WITH earned income disregards (1/3 or 90%)
|
|
22
|
+
# - Income < recognizable needs amount (25% of budgetary needs)
|
|
23
|
+
# - Applies to: EVERYONE (applicants AND continuing recipients)
|
|
24
|
+
#
|
|
25
|
+
# Test requirements by enrollment status:
|
|
26
|
+
# - New applicants: Must pass budgetary test AND recognizable test
|
|
27
|
+
# - Continuing recipients: Must pass recognizable test only
|
|
28
|
+
|
|
29
|
+
is_enrolled = spm_unit("is_tanf_enrolled", period)
|
|
30
|
+
passes_budgetary = spm_unit("tx_tanf_budgetary_needs_test", period)
|
|
31
|
+
passes_recognizable = spm_unit(
|
|
32
|
+
"tx_tanf_recognizable_needs_test", period
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
# Apply the appropriate test(s) based on enrollment status
|
|
36
|
+
return where(
|
|
37
|
+
is_enrolled,
|
|
38
|
+
passes_recognizable, # Continuing: recognizable test only
|
|
39
|
+
passes_budgetary & passes_recognizable, # Applicants: BOTH tests
|
|
40
|
+
)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_recognizable_needs_test(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Meets Texas TANF recognizable needs test"
|
|
8
|
+
definition_period = MONTH
|
|
9
|
+
reference = "https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1340-income-limits"
|
|
10
|
+
defined_for = StateCode.TX
|
|
11
|
+
|
|
12
|
+
def formula(spm_unit, period, parameters):
|
|
13
|
+
# Recognizable needs test applies to continuing recipients
|
|
14
|
+
# Household passes if recognizable needs > countable income
|
|
15
|
+
|
|
16
|
+
budgetary_needs = spm_unit("tx_tanf_budgetary_needs", period)
|
|
17
|
+
countable_income = spm_unit("tx_tanf_countable_income", period)
|
|
18
|
+
p = parameters(period).gov.states.tx.tanf.needs_standard
|
|
19
|
+
|
|
20
|
+
# Recognizable needs is 25% of budgetary needs
|
|
21
|
+
recognizable_needs = budgetary_needs * p.recognizable_needs.rate
|
|
22
|
+
|
|
23
|
+
return countable_income < recognizable_needs
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_resources_eligible(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Meets Texas TANF resource test"
|
|
8
|
+
definition_period = MONTH
|
|
9
|
+
reference = (
|
|
10
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1220-limits",
|
|
11
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-2420-eligibility-requirements",
|
|
12
|
+
)
|
|
13
|
+
defined_for = StateCode.TX
|
|
14
|
+
|
|
15
|
+
def formula(spm_unit, period, parameters):
|
|
16
|
+
countable_resources = spm_unit("tx_tanf_countable_resources", period)
|
|
17
|
+
p = parameters(period).gov.states.tx.tanf.resources
|
|
18
|
+
|
|
19
|
+
return countable_resources <= p.resource_limit
|
policyengine_us/variables/gov/states/tx/tanf/income/deductions/tx_tanf_child_support_deduction.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_child_support_deduction(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Texas TANF child support deduction"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = MONTH
|
|
10
|
+
reference = (
|
|
11
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1420-types-deductions#a-1422-75-disregard-deduction",
|
|
12
|
+
"https://www.law.cornell.edu/regulations/texas/1-Tex-Admin-Code-SS-372-404",
|
|
13
|
+
)
|
|
14
|
+
defined_for = StateCode.TX
|
|
15
|
+
|
|
16
|
+
def formula(spm_unit, period, parameters):
|
|
17
|
+
# Up to $75/month in child support can be deducted per household
|
|
18
|
+
p = parameters(period).gov.states.tx.tanf.income
|
|
19
|
+
child_support = spm_unit("child_support_received", period)
|
|
20
|
+
|
|
21
|
+
return min_(child_support, p.deductions.child_support)
|
policyengine_us/variables/gov/states/tx/tanf/income/deductions/tx_tanf_dependent_care_deduction.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_dependent_care_deduction(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Texas TANF dependent care deduction"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = MONTH
|
|
10
|
+
reference = (
|
|
11
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1420-types-deductions",
|
|
12
|
+
"https://www.law.cornell.edu/regulations/texas/1-Tex-Admin-Code-SS-372-409",
|
|
13
|
+
)
|
|
14
|
+
defined_for = StateCode.TX
|
|
15
|
+
|
|
16
|
+
def formula(spm_unit, period, parameters):
|
|
17
|
+
# Actual cost of dependent child care, capped at maximum by age
|
|
18
|
+
# Per § 372.409 (a)(3): up to $200/month for children under 2, $175/month for children 2+
|
|
19
|
+
|
|
20
|
+
# Get actual childcare expenses
|
|
21
|
+
childcare_expenses = spm_unit("childcare_expenses", period)
|
|
22
|
+
|
|
23
|
+
# Calculate maximum deduction for dependents (children or incapacitated adults)
|
|
24
|
+
person = spm_unit.members
|
|
25
|
+
is_dependent = person("is_tax_unit_dependent", period)
|
|
26
|
+
is_incapacitated = person("is_incapable_of_self_care", period)
|
|
27
|
+
age = person("monthly_age", period)
|
|
28
|
+
|
|
29
|
+
# Eligible for deduction: dependent child OR incapacitated adult
|
|
30
|
+
eligible_for_deduction = is_dependent | is_incapacitated
|
|
31
|
+
|
|
32
|
+
p = parameters(period).gov.states.tx.tanf.income
|
|
33
|
+
max_per_person = where(
|
|
34
|
+
eligible_for_deduction, p.deductions.dependent_care.calc(age), 0
|
|
35
|
+
)
|
|
36
|
+
total_max_deduction = spm_unit.sum(max_per_person)
|
|
37
|
+
|
|
38
|
+
# Deduction is the lesser of actual expenses or maximum
|
|
39
|
+
return min_(childcare_expenses, total_max_deduction)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_countable_earned_income(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Texas TANF countable earned income"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = MONTH
|
|
10
|
+
reference = (
|
|
11
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1340-income-limits",
|
|
12
|
+
"https://www.law.cornell.edu/regulations/texas/1-TAC-372-605",
|
|
13
|
+
)
|
|
14
|
+
defined_for = StateCode.TX
|
|
15
|
+
|
|
16
|
+
def formula(spm_unit, period, parameters):
|
|
17
|
+
# Sum person-level earned income after work expense and disregards
|
|
18
|
+
earned_after_disregards = spm_unit(
|
|
19
|
+
"tx_tanf_earned_income_after_disregard_person", period
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
# Apply dependent care deduction (per § 372.409 (a)(3))
|
|
23
|
+
dependent_care_deduction = spm_unit(
|
|
24
|
+
"tx_tanf_dependent_care_deduction", period
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
# Countable earned income after all deductions
|
|
28
|
+
return max_(earned_after_disregards - dependent_care_deduction, 0)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_earned_income_after_disregard_person(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Texas TANF earned income after disregards (person)"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = MONTH
|
|
10
|
+
reference = (
|
|
11
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1420-types-deductions",
|
|
12
|
+
"https://www.law.cornell.edu/regulations/texas/1-Tex-Admin-Code-SS-372-409",
|
|
13
|
+
)
|
|
14
|
+
defined_for = StateCode.TX
|
|
15
|
+
|
|
16
|
+
def formula(person, period, parameters):
|
|
17
|
+
# Get gross earned income
|
|
18
|
+
gross_earned = person("tx_tanf_gross_earned_income", period)
|
|
19
|
+
p = parameters(period).gov.states.tx.tanf.income
|
|
20
|
+
|
|
21
|
+
# Step 1: Subtract work expense deduction ($120, not to exceed earnings)
|
|
22
|
+
work_expense = min_(p.deductions.work_expense, gross_earned)
|
|
23
|
+
after_work_expense = max_(gross_earned - work_expense, 0)
|
|
24
|
+
|
|
25
|
+
# Step 2: Apply appropriate earned income disregard
|
|
26
|
+
# Check if household is enrolled in TANF
|
|
27
|
+
spm_unit = person.spm_unit
|
|
28
|
+
is_enrolled = spm_unit("is_tanf_enrolled", period)
|
|
29
|
+
|
|
30
|
+
# For applicants (not enrolled): 1/3 disregard
|
|
31
|
+
applicant_disregard = (
|
|
32
|
+
after_work_expense * p.disregards.applicant_fraction
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
# For continuing recipients (enrolled): 90% disregard (capped at $1,400)
|
|
36
|
+
# Note: This disregard is limited to 4 months per 12-month period (not yet implemented)
|
|
37
|
+
potential_recipient_disregard = (
|
|
38
|
+
after_work_expense * p.disregards.continuing_recipient_rate
|
|
39
|
+
)
|
|
40
|
+
actual_recipient_disregard = min_(
|
|
41
|
+
potential_recipient_disregard,
|
|
42
|
+
p.disregards.continuing_recipient_cap,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
# Return appropriate value based on enrollment status
|
|
46
|
+
disregard = where(
|
|
47
|
+
is_enrolled,
|
|
48
|
+
actual_recipient_disregard,
|
|
49
|
+
applicant_disregard,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
return max_(after_work_expense - disregard, 0)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_gross_earned_income(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Texas TANF gross earned income"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = MONTH
|
|
10
|
+
reference = (
|
|
11
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1340-income-limits",
|
|
12
|
+
"https://www.law.cornell.edu/regulations/texas/1-TAC-372-601",
|
|
13
|
+
)
|
|
14
|
+
defined_for = StateCode.TX
|
|
15
|
+
|
|
16
|
+
adds = "gov.states.tx.tanf.income.sources.earned"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_countable_income(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Texas TANF countable income"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = MONTH
|
|
10
|
+
reference = (
|
|
11
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1340-income-limits",
|
|
12
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1350-calculating-household-income",
|
|
13
|
+
)
|
|
14
|
+
defined_for = StateCode.TX
|
|
15
|
+
|
|
16
|
+
adds = [
|
|
17
|
+
"tx_tanf_countable_earned_income",
|
|
18
|
+
"tx_tanf_countable_unearned_income",
|
|
19
|
+
]
|