policyengine-us 1.420.0__py3-none-any.whl → 1.422.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 (82) hide show
  1. policyengine_us/parameters/gov/states/tx/dta/csfp/fpg_limit.yaml +10 -0
  2. policyengine_us/parameters/gov/states/tx/twc/README.md +1 -0
  3. policyengine_us/parameters/gov/states/tx/twc/ccs/README.md +1 -0
  4. policyengine_us/parameters/gov/states/tx/twc/ccs/age_threshold/child.yaml +11 -0
  5. policyengine_us/parameters/gov/states/tx/twc/ccs/age_threshold/disabled_child.yaml +11 -0
  6. policyengine_us/parameters/gov/states/tx/twc/ccs/age_threshold/infant.yaml +11 -0
  7. policyengine_us/parameters/gov/states/tx/twc/ccs/age_threshold/school_age.yaml +11 -0
  8. policyengine_us/parameters/gov/states/tx/twc/ccs/age_threshold/toddler.yaml +11 -0
  9. policyengine_us/parameters/gov/states/tx/twc/ccs/assets/limit.yaml +11 -0
  10. policyengine_us/parameters/gov/states/tx/twc/ccs/copay/rate/additional_child.yaml +13 -0
  11. policyengine_us/parameters/gov/states/tx/twc/ccs/copay/rate/first_child.yaml +55 -0
  12. policyengine_us/parameters/gov/states/tx/twc/ccs/copay/rate/maximum.yaml +11 -0
  13. policyengine_us/parameters/gov/states/tx/twc/ccs/income/smi_rate.yaml +11 -0
  14. policyengine_us/parameters/gov/states/tx/twc/ccs/income/sources.yaml +23 -0
  15. policyengine_us/parameters/gov/states/tx/twc/ccs/payment/rates.yaml +10459 -0
  16. policyengine_us/parameters/gov/states/tx/twc/ccs/region/alamo.yaml +25 -0
  17. policyengine_us/parameters/gov/states/tx/twc/ccs/region/borderplex.yaml +18 -0
  18. policyengine_us/parameters/gov/states/tx/twc/ccs/region/brazos_valley.yaml +19 -0
  19. policyengine_us/parameters/gov/states/tx/twc/ccs/region/cameron_county.yaml +13 -0
  20. policyengine_us/parameters/gov/states/tx/twc/ccs/region/capital_area.yaml +13 -0
  21. policyengine_us/parameters/gov/states/tx/twc/ccs/region/central_texas.yaml +19 -0
  22. policyengine_us/parameters/gov/states/tx/twc/ccs/region/coastal_bend.yaml +24 -0
  23. policyengine_us/parameters/gov/states/tx/twc/ccs/region/concho_valley.yaml +25 -0
  24. policyengine_us/parameters/gov/states/tx/twc/ccs/region/dallas_county.yaml +13 -0
  25. policyengine_us/parameters/gov/states/tx/twc/ccs/region/deep_east.yaml +24 -0
  26. policyengine_us/parameters/gov/states/tx/twc/ccs/region/east_texas.yaml +26 -0
  27. policyengine_us/parameters/gov/states/tx/twc/ccs/region/golden_crescent.yaml +19 -0
  28. policyengine_us/parameters/gov/states/tx/twc/ccs/region/gulf_coast.yaml +25 -0
  29. policyengine_us/parameters/gov/states/tx/twc/ccs/region/heart_of_texas.yaml +18 -0
  30. policyengine_us/parameters/gov/states/tx/twc/ccs/region/lower_rio.yaml +15 -0
  31. policyengine_us/parameters/gov/states/tx/twc/ccs/region/middle_rio.yaml +21 -0
  32. policyengine_us/parameters/gov/states/tx/twc/ccs/region/north_central.yaml +26 -0
  33. policyengine_us/parameters/gov/states/tx/twc/ccs/region/north_texas.yaml +23 -0
  34. policyengine_us/parameters/gov/states/tx/twc/ccs/region/northeast_texas.yaml +21 -0
  35. policyengine_us/parameters/gov/states/tx/twc/ccs/region/panhandle.yaml +38 -0
  36. policyengine_us/parameters/gov/states/tx/twc/ccs/region/permian_basin.yaml +29 -0
  37. policyengine_us/parameters/gov/states/tx/twc/ccs/region/rural_capital.yaml +21 -0
  38. policyengine_us/parameters/gov/states/tx/twc/ccs/region/south_plains.yaml +27 -0
  39. policyengine_us/parameters/gov/states/tx/twc/ccs/region/south_texas.yaml +15 -0
  40. policyengine_us/parameters/gov/states/tx/twc/ccs/region/southeast.yaml +15 -0
  41. policyengine_us/parameters/gov/states/tx/twc/ccs/region/tarrant_county.yaml +13 -0
  42. policyengine_us/parameters/gov/states/tx/twc/ccs/region/texoma.yaml +15 -0
  43. policyengine_us/parameters/gov/states/tx/twc/ccs/region/west_central.yaml +31 -0
  44. policyengine_us/parameters/gov/states/tx/twc/ccs/work_requirements/single_parent.yaml +11 -0
  45. policyengine_us/parameters/gov/states/tx/twc/ccs/work_requirements/two_parent.yaml +11 -0
  46. policyengine_us/tests/policy/baseline/gov/states/tx/dta/csfp/tx_dta_csfp_income_eligible.yaml +15 -0
  47. policyengine_us/tests/policy/baseline/gov/states/tx/twc/ccs/copay/tx_ccs_copay.yaml +165 -0
  48. policyengine_us/tests/policy/baseline/gov/states/tx/twc/ccs/eligibility/tx_ccs_asset_eligible.yaml +67 -0
  49. policyengine_us/tests/policy/baseline/gov/states/tx/twc/ccs/eligibility/tx_ccs_eligible.yaml +114 -0
  50. policyengine_us/tests/policy/baseline/gov/states/tx/twc/ccs/eligibility/tx_ccs_eligible_child.yaml +172 -0
  51. policyengine_us/tests/policy/baseline/gov/states/tx/twc/ccs/eligibility/tx_ccs_income_eligible.yaml +65 -0
  52. policyengine_us/tests/policy/baseline/gov/states/tx/twc/ccs/eligibility/tx_ccs_work_exempt.yaml +24 -0
  53. policyengine_us/tests/policy/baseline/gov/states/tx/twc/ccs/eligibility/tx_ccs_work_requirement_eligible.yaml +155 -0
  54. policyengine_us/tests/policy/baseline/gov/states/tx/twc/ccs/payment/tx_ccs_payment_rate.yaml +224 -0
  55. policyengine_us/tests/policy/baseline/gov/states/tx/twc/ccs/tx_ccs.yaml +132 -0
  56. policyengine_us/tests/policy/baseline/gov/states/tx/twc/ccs/tx_ccs_child_age_category.yaml +127 -0
  57. policyengine_us/tests/policy/baseline/gov/states/tx/twc/ccs/tx_ccs_maximum_payment.yaml +141 -0
  58. policyengine_us/tests/policy/baseline/gov/states/tx/twc/ccs/tx_ccs_workforce_board_region.yaml +79 -0
  59. policyengine_us/tests/policy/baseline/gov/usda/csfp/commodity_supplemental_food_program_eligible.yaml +171 -0
  60. policyengine_us/variables/gov/states/tx/dta/csfp/tx_dta_csfp_income_eligible.py +14 -0
  61. policyengine_us/variables/gov/states/tx/twc/ccs/copay/tx_ccs_copay.py +40 -0
  62. policyengine_us/variables/gov/states/tx/twc/ccs/eligibility/tx_ccs_asset_eligible.py +16 -0
  63. policyengine_us/variables/gov/states/tx/twc/ccs/eligibility/tx_ccs_eligible.py +28 -0
  64. policyengine_us/variables/gov/states/tx/twc/ccs/eligibility/tx_ccs_eligible_child.py +22 -0
  65. policyengine_us/variables/gov/states/tx/twc/ccs/eligibility/tx_ccs_income_eligible.py +19 -0
  66. policyengine_us/variables/gov/states/tx/twc/ccs/eligibility/tx_ccs_work_exempt.py +26 -0
  67. policyengine_us/variables/gov/states/tx/twc/ccs/eligibility/tx_ccs_work_requirement_eligible.py +44 -0
  68. policyengine_us/variables/gov/states/tx/twc/ccs/payment/tx_ccs_care_schedule.py +18 -0
  69. policyengine_us/variables/gov/states/tx/twc/ccs/payment/tx_ccs_payment_rate.py +36 -0
  70. policyengine_us/variables/gov/states/tx/twc/ccs/payment/tx_ccs_provider_rating.py +21 -0
  71. policyengine_us/variables/gov/states/tx/twc/ccs/payment/tx_ccs_provider_type.py +19 -0
  72. policyengine_us/variables/gov/states/tx/twc/ccs/tx_ccs.py +21 -0
  73. policyengine_us/variables/gov/states/tx/twc/ccs/tx_ccs_child_age_category.py +41 -0
  74. policyengine_us/variables/gov/states/tx/twc/ccs/tx_ccs_countable_income.py +13 -0
  75. policyengine_us/variables/gov/states/tx/twc/ccs/tx_ccs_maximum_payment.py +15 -0
  76. policyengine_us/variables/gov/states/tx/twc/ccs/tx_ccs_workforce_board_region.py +68 -0
  77. policyengine_us/variables/gov/usda/csfp/commodity_supplemental_food_program_eligible.py +7 -2
  78. {policyengine_us-1.420.0.dist-info → policyengine_us-1.422.0.dist-info}/METADATA +1 -1
  79. {policyengine_us-1.420.0.dist-info → policyengine_us-1.422.0.dist-info}/RECORD +82 -6
  80. {policyengine_us-1.420.0.dist-info → policyengine_us-1.422.0.dist-info}/WHEEL +0 -0
  81. {policyengine_us-1.420.0.dist-info → policyengine_us-1.422.0.dist-info}/entry_points.txt +0 -0
  82. {policyengine_us-1.420.0.dist-info → policyengine_us-1.422.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,141 @@
1
+ - name: Case 1 - Low income family maximum payment calculation
2
+ period: 2024-01
3
+ input:
4
+ people:
5
+ parent1:
6
+ age: 30
7
+ employment_income: 12_000 # Annual income ($1,000/month, <20% SMI)
8
+ child1:
9
+ age: 3
10
+ is_disabled: false
11
+ is_citizen_or_legal_immigrant: true
12
+ tx_ccs_payment_rate: 500 # Monthly reimbursement rate
13
+ spm_units:
14
+ spm_unit:
15
+ members: [parent1, child1]
16
+ spm_unit_size: 2
17
+ tx_ccs_eligible: true
18
+ households:
19
+ household:
20
+ members: [parent1, child1]
21
+ state_code: TX
22
+ output:
23
+ # Reimbursement ($500) - copay ($22.70, rate-based) = $477.30
24
+ tx_ccs_maximum_payment: 477.3
25
+
26
+ - name: Case 2 - Family with two children maximum payment
27
+ period: 2024-01
28
+ input:
29
+ people:
30
+ parent1:
31
+ age: 35
32
+ employment_income: 48_000 # Annual income ($4,000/month, ~55% SMI)
33
+ parent2:
34
+ age: 32
35
+ child1:
36
+ age: 5
37
+ is_disabled: false
38
+ is_citizen_or_legal_immigrant: true
39
+ tx_ccs_payment_rate: 600 # Monthly reimbursement for child1
40
+ child2:
41
+ age: 2
42
+ is_disabled: false
43
+ is_citizen_or_legal_immigrant: true
44
+ tx_ccs_payment_rate: 700 # Monthly reimbursement for child2
45
+ spm_units:
46
+ spm_unit:
47
+ members: [parent1, parent2, child1, child2]
48
+ spm_unit_size: 4
49
+ tx_ccs_eligible: true
50
+ households:
51
+ household:
52
+ members: [parent1, parent2, child1, child2]
53
+ state_code: TX
54
+ output:
55
+ # Total reimbursement ($1,300) - copay ($243.20, rate-based) = $1,056.80
56
+ tx_ccs_maximum_payment: 1_056.8
57
+
58
+ - name: Case 3 - High income family with lower maximum payment
59
+ period: 2024-01
60
+ input:
61
+ people:
62
+ parent1:
63
+ age: 40
64
+ employment_income: 84_000 # Annual income ($7,000/month, 75-80% SMI)
65
+ parent2:
66
+ age: 38
67
+ child1:
68
+ age: 8
69
+ is_disabled: false
70
+ is_citizen_or_legal_immigrant: true
71
+ tx_ccs_payment_rate: 400
72
+ child2:
73
+ age: 5
74
+ is_disabled: false
75
+ is_citizen_or_legal_immigrant: true
76
+ tx_ccs_payment_rate: 450
77
+ child3:
78
+ age: 2
79
+ is_disabled: false
80
+ is_citizen_or_legal_immigrant: true
81
+ tx_ccs_payment_rate: 500
82
+ spm_units:
83
+ spm_unit:
84
+ members: [parent1, parent2, child1, child2, child3]
85
+ spm_unit_size: 5
86
+ tx_ccs_eligible: true
87
+ households:
88
+ household:
89
+ members: [parent1, parent2, child1, child2, child3]
90
+ state_code: TX
91
+ output:
92
+ # Total reimbursement ($1,350) - copay ($490, capped at 7%) = $860
93
+ tx_ccs_maximum_payment: 860
94
+
95
+ - name: Case 4 - Copay exceeds reimbursement results in zero maximum payment
96
+ period: 2024-01
97
+ input:
98
+ people:
99
+ parent1:
100
+ age: 35
101
+ employment_income: 78_000 # High income
102
+ child1:
103
+ age: 6
104
+ is_disabled: false
105
+ is_citizen_or_legal_immigrant: true
106
+ tx_ccs_payment_rate: 200 # Low reimbursement rate
107
+ spm_units:
108
+ spm_unit:
109
+ members: [parent1, child1]
110
+ spm_unit_size: 2
111
+ tx_ccs_eligible: true
112
+ households:
113
+ household:
114
+ members: [parent1, child1]
115
+ state_code: TX
116
+ output:
117
+ tx_ccs_maximum_payment: 0 # Reimbursement ($200) < copay ($310), max(0, -110) = $0
118
+
119
+ - name: Case 5 - Not eligible household has zero maximum payment
120
+ period: 2024-01
121
+ input:
122
+ people:
123
+ parent1:
124
+ age: 30
125
+ employment_income: 36_000
126
+ child1:
127
+ age: 4
128
+ is_disabled: false
129
+ is_citizen_or_legal_immigrant: true
130
+ tx_ccs_payment_rate: 500
131
+ spm_units:
132
+ spm_unit:
133
+ members: [parent1, child1]
134
+ spm_unit_size: 2
135
+ tx_ccs_eligible: false # Not eligible
136
+ households:
137
+ household:
138
+ members: [parent1, child1]
139
+ state_code: TX
140
+ output:
141
+ tx_ccs_maximum_payment: 0 # Not eligible = no maximum payment
@@ -0,0 +1,79 @@
1
+ - name: Gulf Coast - Harris County
2
+ period: 2024
3
+ input:
4
+ county: HARRIS_COUNTY_TX
5
+ state_code: TX
6
+ output:
7
+ tx_ccs_workforce_board_region: GULF_COAST
8
+
9
+ - name: Gulf Coast - Fort Bend County
10
+ period: 2024
11
+ input:
12
+ county: FORT_BEND_COUNTY_TX
13
+ state_code: TX
14
+ output:
15
+ tx_ccs_workforce_board_region: GULF_COAST
16
+
17
+ - name: Dallas County - Dallas
18
+ period: 2024
19
+ input:
20
+ county: DALLAS_COUNTY_TX
21
+ state_code: TX
22
+ output:
23
+ tx_ccs_workforce_board_region: DALLAS_COUNTY
24
+
25
+ - name: Tarrant County - Fort Worth
26
+ period: 2024
27
+ input:
28
+ county: TARRANT_COUNTY_TX
29
+ state_code: TX
30
+ output:
31
+ tx_ccs_workforce_board_region: TARRANT_COUNTY
32
+
33
+ - name: Capital Area - Travis County (Austin)
34
+ period: 2024
35
+ input:
36
+ county: TRAVIS_COUNTY_TX
37
+ state_code: TX
38
+ output:
39
+ tx_ccs_workforce_board_region: CAPITAL_AREA
40
+
41
+ - name: Alamo - Bexar County (San Antonio)
42
+ period: 2024
43
+ input:
44
+ county: BEXAR_COUNTY_TX
45
+ state_code: TX
46
+ output:
47
+ tx_ccs_workforce_board_region: ALAMO
48
+
49
+ - name: Panhandle - Potter County (Amarillo)
50
+ period: 2024
51
+ input:
52
+ county: POTTER_COUNTY_TX
53
+ state_code: TX
54
+ output:
55
+ tx_ccs_workforce_board_region: PANHANDLE
56
+
57
+ - name: Borderplex - El Paso County
58
+ period: 2024
59
+ input:
60
+ county: EL_PASO_COUNTY_TX
61
+ state_code: TX
62
+ output:
63
+ tx_ccs_workforce_board_region: BORDERPLEX
64
+
65
+ - name: Heart of Texas - McLennan County (Waco)
66
+ period: 2024
67
+ input:
68
+ county: MCLENNAN_COUNTY_TX
69
+ state_code: TX
70
+ output:
71
+ tx_ccs_workforce_board_region: HEART_OF_TEXAS
72
+
73
+ - name: Cameron County - Brownsville
74
+ period: 2024
75
+ input:
76
+ county: CAMERON_COUNTY_TX
77
+ state_code: TX
78
+ output:
79
+ tx_ccs_workforce_board_region: CAMERON_COUNTY
@@ -0,0 +1,171 @@
1
+ - name: Person under 60 is not eligible regardless of income
2
+ period: 2024
3
+ input:
4
+ people:
5
+ person:
6
+ age: 59
7
+ spouse:
8
+ age: 62
9
+ spm_units:
10
+ spm_unit:
11
+ members: [person, spouse]
12
+ school_meal_fpg_ratio: 1.0 # Below the 130% limit
13
+ output:
14
+ commodity_supplemental_food_program_eligible: [false, true]
15
+
16
+ - name: Person exactly 60 is eligible with low income
17
+ period: 2024
18
+ input:
19
+ people:
20
+ person:
21
+ age: 60
22
+ spm_units:
23
+ spm_unit:
24
+ members: [person]
25
+ school_meal_fpg_ratio: 1.2 # Below the 130% limit
26
+ output:
27
+ commodity_supplemental_food_program_eligible: true
28
+
29
+ - name: Elderly person eligible with income at exactly 130% FPG
30
+ period: 2024
31
+ input:
32
+ people:
33
+ person:
34
+ age: 65
35
+ spm_units:
36
+ spm_unit:
37
+ members: [person]
38
+ school_meal_fpg_ratio: 1.3 # Exactly at the limit
39
+ output:
40
+ commodity_supplemental_food_program_eligible: true
41
+
42
+ - name: Elderly person not eligible with income above 130% FPG
43
+ period: 2024
44
+ input:
45
+ people:
46
+ person:
47
+ age: 70
48
+ spm_units:
49
+ spm_unit:
50
+ members: [person]
51
+ school_meal_fpg_ratio: 1.31 # Just above the limit
52
+ output:
53
+ commodity_supplemental_food_program_eligible: false
54
+
55
+ - name: Multiple household members with different eligibility
56
+ period: 2024
57
+ input:
58
+ people:
59
+ child:
60
+ age: 10
61
+ adult:
62
+ age: 45
63
+ senior1:
64
+ age: 60
65
+ senior2:
66
+ age: 75
67
+ spm_units:
68
+ spm_unit:
69
+ members: [child, adult, senior1, senior2]
70
+ school_meal_fpg_ratio: 1.2 # Below the 130% limit
71
+ output:
72
+ commodity_supplemental_food_program_eligible: [false, false, true, true]
73
+
74
+ - name: 2025 period with higher FPG limit of 150%
75
+ period: 2025
76
+ input:
77
+ people:
78
+ person:
79
+ age: 65
80
+ spm_units:
81
+ spm_unit:
82
+ members: [person]
83
+ school_meal_fpg_ratio: 1.45 # Between 130% and 150%
84
+ output:
85
+ commodity_supplemental_food_program_eligible: true
86
+
87
+ - name: 2025 period - not eligible above 150% FPG
88
+ period: 2025
89
+ input:
90
+ people:
91
+ person:
92
+ age: 65
93
+ spm_units:
94
+ spm_unit:
95
+ members: [person]
96
+ school_meal_fpg_ratio: 1.51 # Just above the 150% limit
97
+ output:
98
+ commodity_supplemental_food_program_eligible: false
99
+
100
+ - name: Edge case - person turns 60 during the year
101
+ period: 2024
102
+ input:
103
+ people:
104
+ person:
105
+ age: 60 # Assume they're 60 at some point in 2024
106
+ spm_units:
107
+ spm_unit:
108
+ members: [person]
109
+ school_meal_fpg_ratio: 1.0
110
+ output:
111
+ commodity_supplemental_food_program_eligible: true
112
+
113
+ - name: High income elderly person not eligible
114
+ period: 2024
115
+ input:
116
+ people:
117
+ person:
118
+ age: 80
119
+ spm_units:
120
+ spm_unit:
121
+ members: [person]
122
+ school_meal_fpg_ratio: 2.5 # Well above the 130% limit
123
+ output:
124
+ commodity_supplemental_food_program_eligible: false
125
+
126
+ - name: Young adult with very low income still not eligible
127
+ period: 2024
128
+ input:
129
+ people:
130
+ person:
131
+ age: 30
132
+ spm_units:
133
+ spm_unit:
134
+ members: [person]
135
+ school_meal_fpg_ratio: 0.5 # Very low income
136
+ output:
137
+ commodity_supplemental_food_program_eligible: false
138
+
139
+ - name: Texas income ineligible
140
+ period: 2025
141
+ input:
142
+ people:
143
+ person:
144
+ age: 65
145
+ spm_units:
146
+ spm_unit:
147
+ members: [person]
148
+ school_meal_fpg_ratio: 1.4
149
+ households:
150
+ household:
151
+ members: [person]
152
+ state_code: TX
153
+ output:
154
+ commodity_supplemental_food_program_eligible: false
155
+
156
+ - name: Texas income eligible
157
+ period: 2025
158
+ input:
159
+ people:
160
+ person:
161
+ age: 65
162
+ spm_units:
163
+ spm_unit:
164
+ members: [person]
165
+ school_meal_fpg_ratio: 1.3
166
+ households:
167
+ household:
168
+ members: [person]
169
+ state_code: TX
170
+ output:
171
+ commodity_supplemental_food_program_eligible: true
@@ -0,0 +1,14 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_dta_csfp_income_eligible(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ definition_period = YEAR
8
+ label = "Texas Commodity Supplemental Food Program income eligible"
9
+ defined_for = StateCode.TX
10
+
11
+ def formula(person, period, parameters):
12
+ p = parameters(period).gov.states.tx.dta.csfp
13
+ fpg = person.spm_unit("school_meal_fpg_ratio", period)
14
+ return fpg <= p.fpg_limit
@@ -0,0 +1,40 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_ccs_copay(Variable):
5
+ value_type = float
6
+ entity = SPMUnit
7
+ unit = USD
8
+ label = "Texas Child Care Services (CCS) copayment"
9
+ definition_period = MONTH
10
+ reference = "https://wspanhandle.com/child-care/for-parents/"
11
+ defined_for = "tx_ccs_eligible"
12
+
13
+ def formula(spm_unit, period, parameters):
14
+ p = parameters(period).gov.states.tx.twc.ccs.copay
15
+
16
+ # Get household income and SMI ratio
17
+ income = spm_unit("tx_ccs_countable_income", period)
18
+ smi = spm_unit("hhs_smi", period)
19
+ income_to_smi_ratio = income / smi
20
+
21
+ # Count eligible children in care
22
+ eligible_children = spm_unit.sum(
23
+ spm_unit.members("tx_ccs_eligible_child", period)
24
+ )
25
+
26
+ # Calculate copayment rates based on income bracket
27
+ # Use Panhandle Region's values
28
+ first_child_rate = p.rate.first_child.calc(income_to_smi_ratio)
29
+ additional_child_rate = p.rate.additional_child
30
+
31
+ # Calculate copayments as percentage of income
32
+ first_child_copay = first_child_rate * income
33
+ additional_children = max_(eligible_children - 1, 0)
34
+ additional_copay = additional_child_rate * income * additional_children
35
+
36
+ # Total copayment, capped at maximum rate
37
+ total_copay = first_child_copay + additional_copay
38
+ max_copay = p.rate.maximum * income
39
+
40
+ return min_(total_copay, max_copay)
@@ -0,0 +1,16 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_ccs_asset_eligible(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Texas CCS asset eligible"
8
+ definition_period = MONTH
9
+ reference = "https://www.law.cornell.edu/regulations/texas/40-Tex-Admin-Code-SS-809-41"
10
+ defined_for = StateCode.TX
11
+
12
+ def formula(spm_unit, period, parameters):
13
+ p = parameters(period).gov.states.tx.twc.ccs
14
+ assets = spm_unit("spm_unit_assets", period.this_year)
15
+ asset_limit = p.assets.limit
16
+ return assets <= asset_limit
@@ -0,0 +1,28 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_ccs_eligible(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Texas CCS eligible"
8
+ definition_period = MONTH
9
+ reference = "https://www.law.cornell.edu/regulations/texas/40-Tex-Admin-Code-SS-809-41"
10
+ defined_for = StateCode.TX
11
+
12
+ def formula(spm_unit, period, parameters):
13
+ # Check all eligibility criteria
14
+ income_eligible = spm_unit("tx_ccs_income_eligible", period)
15
+ asset_eligible = spm_unit("tx_ccs_asset_eligible", period)
16
+ work_eligible = spm_unit("tx_ccs_work_requirement_eligible", period)
17
+
18
+ # Check if at least one child is age-eligible
19
+ person = spm_unit.members
20
+ age_eligible = person("tx_ccs_eligible_child", period)
21
+ has_eligible_child = spm_unit.any(age_eligible)
22
+
23
+ return (
24
+ income_eligible
25
+ & asset_eligible
26
+ & work_eligible
27
+ & has_eligible_child
28
+ )
@@ -0,0 +1,22 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_ccs_eligible_child(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Texas CCS eligible child"
8
+ definition_period = MONTH
9
+ reference = "https://www.law.cornell.edu/regulations/texas/40-Tex-Admin-Code-SS-809-41"
10
+ defined_for = StateCode.TX
11
+
12
+ def formula(person, period, parameters):
13
+ p = parameters(period).gov.states.tx.twc.ccs.age_threshold
14
+ age = person("age", period.this_year)
15
+ is_disabled = person("is_disabled", period)
16
+ age_limit = where(is_disabled, p.disabled_child, p.child)
17
+ age_eligible = age < age_limit
18
+ is_dependent = person("is_tax_unit_dependent", period)
19
+ immigration_status_eligible = person(
20
+ "is_citizen_or_legal_immigrant", period
21
+ )
22
+ return age_eligible & is_dependent & immigration_status_eligible
@@ -0,0 +1,19 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_ccs_income_eligible(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Texas CCS income eligible"
8
+ definition_period = MONTH
9
+ reference = "https://www.law.cornell.edu/regulations/texas/40-Tex-Admin-Code-SS-809-41"
10
+ defined_for = StateCode.TX
11
+
12
+ def formula(spm_unit, period, parameters):
13
+ p = parameters(period).gov.states.tx.twc.ccs
14
+ # Get monthly countable income
15
+ monthly_income = spm_unit("tx_ccs_countable_income", period)
16
+ # Calculate monthly SMI limit
17
+ smi = spm_unit("hhs_smi", period)
18
+ income_limit = smi * p.income.smi_rate
19
+ return monthly_income <= income_limit
@@ -0,0 +1,26 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_ccs_work_exempt(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ label = "Texas CCS work requirement exempt"
8
+ definition_period = YEAR
9
+ reference = "https://www.law.cornell.edu/regulations/texas/40-Tex-Admin-Code-SS-809-50"
10
+ defined_for = StateCode.TX
11
+
12
+ def formula(person, period):
13
+ # Exemption 1: Full-time student
14
+ is_full_time_student = person("is_full_time_student", period)
15
+
16
+ # Exemption 2: Parent with documented medical disability
17
+ is_disabled = person("is_disabled", period)
18
+
19
+ # Exemption 3: Parent caring for a physically or mentally disabled family member
20
+ # This exemption is NOT implemented due to complexity in determining:
21
+ # - Which parent is the designated caregiver
22
+ # - Whether caring for disabled spouse vs disabled child has different implications
23
+ # - Whether both parents can claim exemption or just one
24
+ # Future enhancement could add this with better data on caregiving roles
25
+
26
+ return is_full_time_student | is_disabled
@@ -0,0 +1,44 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_ccs_work_requirement_eligible(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Texas CCS work requirement eligible"
8
+ definition_period = MONTH
9
+ reference = "https://www.law.cornell.edu/regulations/texas/40-Tex-Admin-Code-SS-809-56"
10
+ defined_for = StateCode.TX
11
+
12
+ def formula(spm_unit, period, parameters):
13
+ p = parameters(period).gov.states.tx.twc.ccs.work_requirements
14
+
15
+ person = spm_unit.members
16
+ is_head_or_spouse = person("is_tax_unit_head_or_spouse", period)
17
+ is_exempt = person("tx_ccs_work_exempt", period)
18
+ work_hours = person("weekly_hours_worked", period.this_year)
19
+
20
+ # Count non-exempt parents and calculate their total work hours
21
+ is_non_exempt_parent = is_head_or_spouse & ~is_exempt
22
+ num_non_exempt_parents = spm_unit.sum(is_non_exempt_parent)
23
+ total_work_hours = spm_unit.sum(
24
+ where(is_non_exempt_parent, work_hours, 0)
25
+ )
26
+
27
+ # Determine work hours requirement based on non-exempt parents
28
+ # If 0-1 non-exempt parents: 25 hours
29
+ # If 2+ non-exempt parents: 50 hours
30
+ requirement = where(
31
+ num_non_exempt_parents > 1, p.two_parent, p.single_parent
32
+ )
33
+
34
+ # Check each parent individually
35
+ # A parent meets requirements if they are:
36
+ # - Exempt from work, OR
37
+ # - Part of a household that meets the work hour requirement
38
+ household_meets_work_requirement = total_work_hours >= requirement
39
+ parent_meets_requirement = is_exempt | household_meets_work_requirement
40
+
41
+ # SPM unit is eligible if ALL parents meet requirements
42
+ # (Non-parents automatically pass)
43
+ person_eligible = parent_meets_requirement | ~is_head_or_spouse
44
+ return spm_unit.all(person_eligible)
@@ -0,0 +1,18 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class TXCCSCareSchedule(Enum):
5
+ FULL_TIME = "Full Time"
6
+ PART_TIME = "Part Time"
7
+ BLENDED = "Blended"
8
+
9
+
10
+ class tx_ccs_care_schedule(Variable):
11
+ value_type = Enum
12
+ possible_values = TXCCSCareSchedule
13
+ default_value = TXCCSCareSchedule.FULL_TIME
14
+ entity = Person
15
+ definition_period = MONTH
16
+ label = "Texas Child Care Services (CCS) care schedule"
17
+ defined_for = StateCode.TX
18
+ reference = "https://www.twc.texas.gov/sites/default/files/ccel/docs/bcy25-board-max-provider-payment-rates-4-age-groups-twc.pdf"
@@ -0,0 +1,36 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class tx_ccs_payment_rate(Variable):
5
+ value_type = float
6
+ entity = Person
7
+ label = "Texas Child Care Services (CCS) payment amount"
8
+ unit = USD
9
+ definition_period = MONTH
10
+ defined_for = "tx_ccs_eligible_child"
11
+ reference = "https://www.twc.texas.gov/sites/default/files/ccel/docs/bcy25-board-max-provider-payment-rates-4-age-groups-twc.pdf#page=9"
12
+
13
+ def formula(person, period, parameters):
14
+ # Get the household's workforce board region
15
+ household = person.household
16
+ region = household("tx_ccs_workforce_board_region", period)
17
+
18
+ # Get the payment parameters
19
+ p = parameters(period).gov.states.tx.twc.ccs.payment
20
+
21
+ # Get the provider characteristics
22
+ provider_type = person("tx_ccs_provider_type", period)
23
+ provider_rating = person("tx_ccs_provider_rating", period)
24
+ age_category = person("tx_ccs_child_age_category", period)
25
+ care_schedule = person("tx_ccs_care_schedule", period)
26
+
27
+ # Calculate monthly payment based on region-specific rates
28
+ attending_days_per_month = person(
29
+ "childcare_attending_days_per_month", period.this_year
30
+ )
31
+ return (
32
+ p.rates[region][provider_type][provider_rating][age_category][
33
+ care_schedule
34
+ ]
35
+ * attending_days_per_month
36
+ )
@@ -0,0 +1,21 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class TXCCSProviderRating(Enum):
5
+ REG = "Regular"
6
+ TRS2 = "Texas Rising Star 2"
7
+ TRS3 = "Texas Rising Star 3"
8
+ TRS4 = "Texas Rising Star 4"
9
+ TSR = "Texas School Ready"
10
+ NONE = "None"
11
+
12
+
13
+ class tx_ccs_provider_rating(Variable):
14
+ value_type = Enum
15
+ possible_values = TXCCSProviderRating
16
+ default_value = TXCCSProviderRating.REG
17
+ entity = Person
18
+ definition_period = MONTH
19
+ label = "Texas Child Care Services (CCS) provider rating"
20
+ defined_for = StateCode.TX
21
+ reference = "https://www.twc.texas.gov/sites/default/files/ccel/docs/bcy25-board-max-provider-payment-rates-4-age-groups-twc.pdf"