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.
- 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/parameters/gov/states/tx/uct/lifeline/fpg_limit.yaml +10 -0
- policyengine_us/parameters/gov/states/tx/uct/lifeline/supplement.yaml +10 -0
- policyengine_us/tests/policy/baseline/gov/fcc/lifeline/is_lifeline_eligible.yaml +10 -0
- policyengine_us/tests/policy/baseline/gov/fcc/lifeline/is_lifeline_income_eligible.yaml +47 -0
- policyengine_us/tests/policy/baseline/gov/fcc/lifeline/lifeline.yaml +19 -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/gov/states/tx/uct/lifeline/integration.yaml +251 -0
- policyengine_us/tests/policy/baseline/household/demographic/person/is_citizen_or_legal_immigrant.yaml +55 -0
- policyengine_us/variables/gov/fcc/lifeline/is_lifeline_eligible.py +3 -4
- policyengine_us/variables/gov/fcc/lifeline/is_lifeline_income_eligible.py +35 -0
- policyengine_us/variables/gov/fcc/lifeline/lifeline.py +5 -2
- 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/gov/states/tx/uct/lifeline/tx_lifeline_supplement.py +13 -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.420.0.dist-info}/METADATA +1 -1
- {policyengine_us-1.418.0.dist-info → policyengine_us-1.420.0.dist-info}/RECORD +97 -12
- 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.420.0.dist-info}/WHEEL +0 -0
- {policyengine_us-1.418.0.dist-info → policyengine_us-1.420.0.dist-info}/entry_points.txt +0 -0
- {policyengine_us-1.418.0.dist-info → policyengine_us-1.420.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -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
|
+
]
|
policyengine_us/variables/gov/states/tx/tanf/income/tx_tanf_income_for_budgetary_needs_test.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_income_for_budgetary_needs_test(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Texas TANF income for budgetary needs test"
|
|
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-Tex-Admin-Code-SS-372-408",
|
|
13
|
+
)
|
|
14
|
+
defined_for = StateCode.TX
|
|
15
|
+
|
|
16
|
+
def formula(spm_unit, period, parameters):
|
|
17
|
+
# Budgetary needs test uses income WITHOUT earned income disregards (1/3 or 90%)
|
|
18
|
+
# Deductions applied:
|
|
19
|
+
# 1. Work expense ($120)
|
|
20
|
+
# 2. Dependent care costs
|
|
21
|
+
# 3. Child support deduction (from unearned income)
|
|
22
|
+
|
|
23
|
+
person = spm_unit.members
|
|
24
|
+
p = parameters(period).gov.states.tx.tanf.income
|
|
25
|
+
|
|
26
|
+
# Earned income after work expense only (no 1/3 or 90% disregard)
|
|
27
|
+
gross_earned = person("tx_tanf_gross_earned_income", period)
|
|
28
|
+
work_expense = min_(p.deductions.work_expense, gross_earned)
|
|
29
|
+
earned_after_work_expense = max_(gross_earned - work_expense, 0)
|
|
30
|
+
|
|
31
|
+
# Sum across household members
|
|
32
|
+
total_earned_after_work_expense = spm_unit.sum(
|
|
33
|
+
earned_after_work_expense
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
# Apply dependent care deduction
|
|
37
|
+
dependent_care_deduction = spm_unit(
|
|
38
|
+
"tx_tanf_dependent_care_deduction", period
|
|
39
|
+
)
|
|
40
|
+
earned_after_deductions = max_(
|
|
41
|
+
total_earned_after_work_expense - dependent_care_deduction, 0
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
# Add unearned income (already has child support deduction applied)
|
|
45
|
+
unearned_income = spm_unit("tx_tanf_countable_unearned_income", period)
|
|
46
|
+
|
|
47
|
+
return earned_after_deductions + unearned_income
|
policyengine_us/variables/gov/states/tx/tanf/income/unearned/tx_tanf_countable_unearned_income.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_countable_unearned_income(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Texas TANF countable unearned 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 gross unearned income
|
|
18
|
+
gross_unearned = add(
|
|
19
|
+
spm_unit, period, ["tx_tanf_gross_unearned_income"]
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
# Apply household-level child support deduction (up to $75/month per household)
|
|
23
|
+
child_support_deduction = spm_unit(
|
|
24
|
+
"tx_tanf_child_support_deduction", period
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
return max_(gross_unearned - child_support_deduction, 0)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_gross_unearned_income(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = Person
|
|
7
|
+
label = "Texas TANF gross unearned 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.unearned"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_ottanf(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Texas One-Time TANF (OTTANF) payment"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = MONTH
|
|
10
|
+
reference = "https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-2410-general-policy"
|
|
11
|
+
defined_for = "tx_ottanf_eligible"
|
|
12
|
+
|
|
13
|
+
def formula(spm_unit, period, parameters):
|
|
14
|
+
p = parameters(period).gov.states.tx.tanf.ottanf
|
|
15
|
+
|
|
16
|
+
# One-time payment of $1,000 divided by 12 for monthly equivalent
|
|
17
|
+
return p.payment_amount / MONTHS_IN_YEAR
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_ottanf_crisis_criteria(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
definition_period = MONTH
|
|
8
|
+
label = "Meets Texas OTTANF crisis criteria"
|
|
9
|
+
reference = (
|
|
10
|
+
"https://www.law.cornell.edu/regulations/texas/1-Tex-Admin-Code-SS-372-802",
|
|
11
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-2420-eligibility-requirements",
|
|
12
|
+
)
|
|
13
|
+
defined_for = StateCode.TX
|
|
14
|
+
|
|
15
|
+
# Crisis criteria per § 372.802 (b):
|
|
16
|
+
# 1. Lost employment in past 2 months (not voluntary quit)
|
|
17
|
+
# 2. Single parent: child lost financial support in last 12 months + parent has recent employment
|
|
18
|
+
# 3. Recent graduate: unemployed/underemployed, not in school, has degree, previously received TANF
|
|
19
|
+
# 4. Currently employed facing crisis: potential loss of transportation/shelter or medical emergency
|
|
20
|
+
#
|
|
21
|
+
# This variable has no formula - user must input whether household meets crisis criteria
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_ottanf_eligible(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Eligible for Texas One-Time TANF (OTTANF)"
|
|
8
|
+
definition_period = MONTH
|
|
9
|
+
reference = (
|
|
10
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-2421-eligibility-criteria",
|
|
11
|
+
"https://www.law.cornell.edu/regulations/texas/1-Tex-Admin-Code-SS-372-801",
|
|
12
|
+
)
|
|
13
|
+
defined_for = StateCode.TX
|
|
14
|
+
|
|
15
|
+
def formula(spm_unit, period, parameters):
|
|
16
|
+
# OTTANF eligibility per A-2421:
|
|
17
|
+
# 1. Must meet all regular TANF eligibility requirements
|
|
18
|
+
# (child, income, resources, immigration)
|
|
19
|
+
# 2. Must be eligible for TANF grant of $10 or more
|
|
20
|
+
# 3. Must meet one of four crisis criteria
|
|
21
|
+
|
|
22
|
+
# Regular TANF eligibility (child, income, resources, immigration)
|
|
23
|
+
regular_tanf_eligible = spm_unit("tx_tanf_eligible", period)
|
|
24
|
+
|
|
25
|
+
# Must be eligible for at least $10 grant
|
|
26
|
+
payment_standard = spm_unit("tx_tanf_payment_standard", period)
|
|
27
|
+
countable_income = spm_unit("tx_tanf_countable_income", period)
|
|
28
|
+
potential_grant = payment_standard - countable_income
|
|
29
|
+
|
|
30
|
+
p = parameters(period).gov.states.tx.tanf
|
|
31
|
+
eligible_for_min_grant = potential_grant >= p.minimum_grant
|
|
32
|
+
|
|
33
|
+
# Crisis criteria (user input)
|
|
34
|
+
crisis = spm_unit("tx_ottanf_crisis_criteria", period)
|
|
35
|
+
|
|
36
|
+
return regular_tanf_eligible & eligible_for_min_grant & crisis
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf_countable_resources(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Texas TANF countable resources"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = MONTH
|
|
10
|
+
reference = (
|
|
11
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1210-general-policy",
|
|
12
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1220-limits",
|
|
13
|
+
)
|
|
14
|
+
defined_for = StateCode.TX
|
|
15
|
+
|
|
16
|
+
def formula(spm_unit, period, parameters):
|
|
17
|
+
# Countable resources = liquid resources + excess vehicle value
|
|
18
|
+
# Household must have countable resources ≤ $1,000 to be eligible
|
|
19
|
+
|
|
20
|
+
# Liquid resources (cash, checking, savings) - stocks use period.this_year
|
|
21
|
+
cash_assets = spm_unit("spm_unit_cash_assets", period.this_year)
|
|
22
|
+
|
|
23
|
+
# Vehicle resources (apply vehicle exemption: one automobile up to $4,650)
|
|
24
|
+
vehicle_value = spm_unit.household(
|
|
25
|
+
"household_vehicles_value", period.this_year
|
|
26
|
+
)
|
|
27
|
+
p = parameters(period).gov.states.tx.tanf.resources
|
|
28
|
+
countable_vehicle_value = max_(vehicle_value - p.vehicle_exemption, 0)
|
|
29
|
+
|
|
30
|
+
# Total countable resources (no period conversion - resources are stocks)
|
|
31
|
+
return cash_assets + countable_vehicle_value
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_regular_tanf(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = (
|
|
8
|
+
"Texas Temporary Assistance for Needy Families (TANF) regular benefit"
|
|
9
|
+
)
|
|
10
|
+
unit = USD
|
|
11
|
+
definition_period = MONTH
|
|
12
|
+
reference = (
|
|
13
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-1340-income-limits",
|
|
14
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/c-110-tanf",
|
|
15
|
+
)
|
|
16
|
+
defined_for = "tx_tanf_eligible"
|
|
17
|
+
|
|
18
|
+
def formula(spm_unit, period, parameters):
|
|
19
|
+
payment_standard = spm_unit("tx_tanf_payment_standard", period)
|
|
20
|
+
countable_income = spm_unit("tx_tanf_countable_income", period)
|
|
21
|
+
p = parameters(period).gov.states.tx.tanf
|
|
22
|
+
|
|
23
|
+
# Calculate benefit as payment standard minus countable income
|
|
24
|
+
calculated_benefit = max_(payment_standard - countable_income, 0)
|
|
25
|
+
|
|
26
|
+
# Apply minimum grant rule
|
|
27
|
+
return max_(calculated_benefit, p.minimum_grant)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tx_tanf(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = SPMUnit
|
|
7
|
+
label = "Texas Temporary Assistance for Needy Families (TANF)"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = MONTH
|
|
10
|
+
reference = (
|
|
11
|
+
"https://www.hhs.texas.gov/handbooks/texas-works-handbook/a-2410-general-policy",
|
|
12
|
+
)
|
|
13
|
+
defined_for = StateCode.TX
|
|
14
|
+
|
|
15
|
+
def formula(spm_unit, period, parameters):
|
|
16
|
+
# Compare monthly TANF benefit with monthly equivalent of OTTANF
|
|
17
|
+
# Return whichever is higher for the household
|
|
18
|
+
|
|
19
|
+
# Regular TANF: monthly benefit
|
|
20
|
+
regular_tanf = spm_unit("tx_regular_tanf", period)
|
|
21
|
+
|
|
22
|
+
# OTTANF: one-time payment divided by 12 for monthly equivalent
|
|
23
|
+
ottanf = spm_unit("tx_ottanf", period)
|
|
24
|
+
|
|
25
|
+
return max_(regular_tanf, ottanf)
|