policyengine-us 1.359.1__py3-none-any.whl → 1.360.1__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 (69) hide show
  1. policyengine_us/parameters/gov/states/ar/tax/income/rates/main/rate.yaml +0 -6
  2. policyengine_us/parameters/gov/states/dc/dhs/gac/README.md +1 -0
  3. policyengine_us/parameters/gov/states/dc/dhs/gac/income_disregard/amount.yaml +12 -0
  4. policyengine_us/parameters/gov/states/dc/dhs/power/README.md +1 -0
  5. policyengine_us/parameters/gov/states/dc/dhs/power/age_threshold/older.yaml +11 -0
  6. policyengine_us/parameters/gov/states/dc/dhs/power/age_threshold/younger.yaml +11 -0
  7. policyengine_us/parameters/gov/states/dc/dhs/power/disqualifying_benefits.yaml +14 -0
  8. policyengine_us/parameters/gov/states/dc/dhs/qualified_noncitizen_statuses.yaml +21 -0
  9. policyengine_us/parameters/gov/states/dc/dhs/tanf/standard_payment/amount.yaml +1 -1
  10. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/required_hours/single_parent/amount.yaml +20 -0
  11. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/required_hours/single_parent/higher/amount.yaml +12 -0
  12. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/required_hours/single_parent/lower/amount.yaml +12 -0
  13. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/required_hours/single_parent/lower/young_child_age_threshold.yaml +11 -0
  14. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/required_hours/two_parents/amount.yaml +12 -0
  15. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/work_exempted/elderly_age_threshold.yaml +11 -0
  16. policyengine_us/parameters/gov/states/dc/dhs/tanf/work_requirement/work_exempted/infant_age_threshold.yaml +11 -0
  17. policyengine_us/tests/policy/baseline/gov/hhs/tanf/cash/integration.yaml +1 -0
  18. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/dc_pap_eligible_child.yaml +47 -0
  19. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/gac/dc_gac.yaml +86 -0
  20. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/gac/dc_gac_standard_payment.yaml +39 -0
  21. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/gac/eligibility/dc_gac_eligible.yaml +39 -0
  22. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/gac/eligibility/dc_gac_eligible_child.yaml +58 -0
  23. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/gac/eligibility/dc_gac_income_eligible.yaml +26 -0
  24. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/gac/income/dc_gac_earned_income_after_disregard_person.yaml +32 -0
  25. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/integration_tests.yaml +171 -0
  26. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/power/dc_power.yaml +26 -0
  27. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/power/dc_power_eligible.yaml +94 -0
  28. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/power/dc_power_head_or_spouse_eligible.yaml +84 -0
  29. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/dc_tanf_assistance_unit_size.yaml +17 -0
  30. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/dc_tanf_standard_payment.yaml +5 -5
  31. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/eligibility/dc_tanf_basic_eligibility_requirements.yaml +39 -0
  32. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/eligibility/dc_tanf_demographic_eligible_person.yaml +11 -0
  33. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/eligibility/dc_tanf_eligible.yaml +6 -6
  34. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/eligibility/dc_tanf_immigration_status_eligible_person.yaml +0 -12
  35. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/eligibility/dc_tanf_income_eligible.yaml +0 -2
  36. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/integration.yaml +6 -2
  37. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/work_requirement/dc_tanf_is_working.yaml +128 -0
  38. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/work_requirement/dc_tanf_meets_work_requirements.yaml +53 -0
  39. policyengine_us/tests/policy/baseline/gov/states/dc/dhs/tanf/work_requirement/dc_tanf_work_requirement_exempt.yaml +81 -0
  40. policyengine_us/variables/gov/states/dc/dhs/dc_pap_eligible_child.py +23 -0
  41. policyengine_us/variables/gov/states/dc/dhs/gac/dc_gac.py +18 -0
  42. policyengine_us/variables/gov/states/dc/dhs/gac/dc_gac_assistance_unit_size.py +15 -0
  43. policyengine_us/variables/gov/states/dc/dhs/gac/dc_gac_standard_payment.py +19 -0
  44. policyengine_us/variables/gov/states/dc/dhs/gac/eligibility/dc_gac_eligible.py +20 -0
  45. policyengine_us/variables/gov/states/dc/dhs/gac/eligibility/dc_gac_eligible_child.py +15 -0
  46. policyengine_us/variables/gov/states/dc/dhs/gac/eligibility/dc_gac_income_eligible.py +19 -0
  47. policyengine_us/variables/gov/states/dc/dhs/gac/income/dc_gac_countable_income.py +18 -0
  48. policyengine_us/variables/gov/states/dc/dhs/gac/income/dc_gac_countable_unearned_income_person.py +17 -0
  49. policyengine_us/variables/gov/states/dc/dhs/gac/income/dc_gac_earned_income_after_disregard_person.py +28 -0
  50. policyengine_us/variables/gov/states/dc/dhs/power/dc_power.py +18 -0
  51. policyengine_us/variables/gov/states/dc/dhs/power/dc_power_eligible.py +30 -0
  52. policyengine_us/variables/gov/states/dc/dhs/power/dc_power_has_disqualifying_beneifts.py +14 -0
  53. policyengine_us/variables/gov/states/dc/dhs/power/dc_power_head_or_spouse_eligible.py +38 -0
  54. policyengine_us/variables/gov/states/dc/dhs/tanf/dc_tanf_assistance_unit_size.py +15 -0
  55. policyengine_us/variables/gov/states/dc/dhs/tanf/dc_tanf_standard_payment.py +1 -1
  56. policyengine_us/variables/gov/states/dc/dhs/tanf/eligibility/dc_tanf_basic_eligibility_requirements.py +18 -0
  57. policyengine_us/variables/gov/states/dc/dhs/tanf/eligibility/dc_tanf_demographic_eligible_person.py +10 -12
  58. policyengine_us/variables/gov/states/dc/dhs/tanf/eligibility/dc_tanf_eligible.py +5 -17
  59. policyengine_us/variables/gov/states/dc/dhs/tanf/eligibility/dc_tanf_immigration_status_eligible_person.py +6 -1
  60. policyengine_us/variables/gov/states/dc/dhs/tanf/income/dc_tanf_countable_income.py +6 -1
  61. policyengine_us/variables/gov/states/dc/dhs/tanf/work_requirement/dc_tanf_is_working.py +40 -0
  62. policyengine_us/variables/gov/states/dc/dhs/tanf/work_requirement/dc_tanf_meets_work_requirements.py +22 -0
  63. policyengine_us/variables/gov/states/dc/dhs/tanf/work_requirement/dc_tanf_work_requirement_exempt.py +39 -0
  64. policyengine_us/variables/household/demographic/person/is_related_to_head_or_spouse.py +9 -0
  65. {policyengine_us-1.359.1.dist-info → policyengine_us-1.360.1.dist-info}/METADATA +1 -1
  66. {policyengine_us-1.359.1.dist-info → policyengine_us-1.360.1.dist-info}/RECORD +69 -19
  67. {policyengine_us-1.359.1.dist-info → policyengine_us-1.360.1.dist-info}/WHEEL +0 -0
  68. {policyengine_us-1.359.1.dist-info → policyengine_us-1.360.1.dist-info}/entry_points.txt +0 -0
  69. {policyengine_us-1.359.1.dist-info → policyengine_us-1.360.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,128 @@
1
+ - name: Case 1, two-parent household, combined hours higher than 35.
2
+ period: 2023-01
3
+ absolute_error_margin: 0.5
4
+ input:
5
+ people:
6
+ person1:
7
+ is_tax_unit_head_or_spouse: true
8
+ weekly_hours_worked: 30
9
+ person2:
10
+ is_tax_unit_head_or_spouse: true
11
+ weekly_hours_worked: 5
12
+ person3:
13
+ is_tax_unit_head_or_spouse: false
14
+ weekly_hours_worked: 0
15
+ spm_units:
16
+ spm_unit:
17
+ members: [person1, person2, person3]
18
+ tax_units:
19
+ tax_unit:
20
+ members: [person1, person2, person3]
21
+ households:
22
+ household:
23
+ members: [person1, person2, person3]
24
+ state_code: DC
25
+ output:
26
+ dc_tanf_is_working: [true, true, true]
27
+
28
+ - name: Case 2, two-parent household, combined hours lower than 35.
29
+ period: 2023-01
30
+ absolute_error_margin: 0.5
31
+ input:
32
+ people:
33
+ person1:
34
+ is_tax_unit_head_or_spouse: true
35
+ weekly_hours_worked: 30
36
+ person2:
37
+ is_tax_unit_head_or_spouse: true
38
+ weekly_hours_worked: 4
39
+ person3:
40
+ is_tax_unit_head_or_spouse: false
41
+ weekly_hours_worked: 0
42
+ spm_units:
43
+ spm_unit:
44
+ members: [person1, person2, person3]
45
+ tax_units:
46
+ tax_unit:
47
+ members: [person1, person2, person3]
48
+ households:
49
+ household:
50
+ members: [person1, person2, person3]
51
+ state_code: DC
52
+ output:
53
+ dc_tanf_is_working: [false, false, false]
54
+
55
+ - name: Case 3, single parent household, has child under 6.
56
+ period: 2023-01
57
+ absolute_error_margin: 0.5
58
+ input:
59
+ people:
60
+ person1:
61
+ is_tax_unit_head_or_spouse: true
62
+ weekly_hours_worked: 20
63
+ person2:
64
+ age: 5
65
+ is_tax_unit_head_or_spouse: false
66
+ weekly_hours_worked: 0
67
+ spm_units:
68
+ spm_unit:
69
+ members: [person1, person2]
70
+ tax_units:
71
+ tax_unit:
72
+ members: [person1, person2]
73
+ households:
74
+ household:
75
+ members: [person1, person2]
76
+ state_code: DC
77
+ output:
78
+ dc_tanf_is_working: [true, false]
79
+
80
+ - name: Case 4, single parent household, no child under 6.
81
+ period: 2023-01
82
+ absolute_error_margin: 0.5
83
+ input:
84
+ people:
85
+ person1:
86
+ is_tax_unit_head_or_spouse: true
87
+ weekly_hours_worked: 20
88
+ person2:
89
+ age: 8
90
+ is_tax_unit_head_or_spouse: false
91
+ weekly_hours_worked: 0
92
+ spm_units:
93
+ spm_unit:
94
+ members: [person1, person2]
95
+ tax_units:
96
+ tax_unit:
97
+ members: [person1, person2]
98
+ households:
99
+ household:
100
+ members: [person1, person2]
101
+ state_code: DC
102
+ output:
103
+ dc_tanf_is_working: [false, false]
104
+
105
+ - name: Case 5, single parent household, no child under 6, eligible because work 30 hours a week.
106
+ period: 2023-01
107
+ absolute_error_margin: 0.5
108
+ input:
109
+ people:
110
+ person1:
111
+ is_tax_unit_head_or_spouse: true
112
+ weekly_hours_worked: 30
113
+ person2:
114
+ age: 8
115
+ is_tax_unit_head_or_spouse: false
116
+ weekly_hours_worked: 0
117
+ spm_units:
118
+ spm_unit:
119
+ members: [person1, person2]
120
+ tax_units:
121
+ tax_unit:
122
+ members: [person1, person2]
123
+ households:
124
+ household:
125
+ members: [person1, person2]
126
+ state_code: DC
127
+ output:
128
+ dc_tanf_is_working: [true, false]
@@ -0,0 +1,53 @@
1
+ - name: Case 1, two-parent household, combined hours higher than 35.
2
+ period: 2023-01
3
+ absolute_error_margin: 0.5
4
+ input:
5
+ people:
6
+ person1:
7
+ is_tax_unit_head_or_spouse: true
8
+ weekly_hours_worked: 30
9
+ person2:
10
+ is_tax_unit_head_or_spouse: true
11
+ weekly_hours_worked: 5
12
+ person3:
13
+ is_tax_unit_head_or_spouse: false
14
+ weekly_hours_worked: 0
15
+ spm_units:
16
+ spm_unit:
17
+ members: [person1, person2, person3]
18
+ tax_units:
19
+ tax_unit:
20
+ members: [person1, person2, person3]
21
+ households:
22
+ household:
23
+ members: [person1, person2, person3]
24
+ state_code: DC
25
+ output:
26
+ dc_tanf_meets_work_requirements: true
27
+
28
+ - name: Case 2, single parent household with an infant.
29
+ period: 2023-01
30
+ absolute_error_margin: 0.5
31
+ input:
32
+ people:
33
+ person1:
34
+ age: 30
35
+ is_tax_unit_head: true
36
+ person2:
37
+ age: 61
38
+ person3:
39
+ age: 0.5
40
+ is_tax_unit_dependent: true
41
+ spm_units:
42
+ spm_unit:
43
+ members: [person1, person2, person3]
44
+ tax_units:
45
+ tax_unit:
46
+ members: [person1, person2, person3]
47
+ filing_status: SINGLE
48
+ households:
49
+ household:
50
+ members: [person1, person2, person3]
51
+ state_code: DC
52
+ output:
53
+ dc_tanf_meets_work_requirements: true
@@ -0,0 +1,81 @@
1
+ - name: Case 1, family of 4.
2
+ period: 2023-01
3
+ absolute_error_margin: 0.5
4
+ input:
5
+ people:
6
+ person1:
7
+ age: 61
8
+ person2:
9
+ age: 60
10
+ person3:
11
+ age: 3
12
+ is_tax_unit_dependent: true
13
+ person4:
14
+ age: 30
15
+ is_pregnant: true
16
+ spm_units:
17
+ spm_unit:
18
+ members: [person1, person2, person3, person4]
19
+ tax_units:
20
+ tax_unit:
21
+ members: [person1, person2, person3, person4]
22
+ households:
23
+ household:
24
+ members: [person1, person2, person3, person4]
25
+ state_code: DC
26
+ output:
27
+ dc_tanf_work_requirement_exempt: [true, false, true, false]
28
+
29
+ - name: Case 2, single parent household with an infant.
30
+ period: 2023-01
31
+ absolute_error_margin: 0.5
32
+ input:
33
+ people:
34
+ person1:
35
+ age: 30
36
+ is_tax_unit_head: true
37
+ person2:
38
+ age: 35
39
+ person3:
40
+ age: 0.5
41
+ is_tax_unit_dependent: true
42
+ spm_units:
43
+ spm_unit:
44
+ members: [person1, person2, person3]
45
+ tax_units:
46
+ tax_unit:
47
+ members: [person1, person2, person3]
48
+ filing_status: SINGLE
49
+ households:
50
+ household:
51
+ members: [person1, person2, person3]
52
+ state_code: DC
53
+ output:
54
+ dc_tanf_work_requirement_exempt: [true, false, true]
55
+
56
+ - name: Case 3, has college student.
57
+ period: 2023-01
58
+ absolute_error_margin: 0.5
59
+ input:
60
+ people:
61
+ person1:
62
+ age: 30
63
+ is_tax_unit_head: true
64
+ person2:
65
+ age: 23
66
+ is_full_time_college_student: true
67
+ person3:
68
+ age: 5
69
+ is_tax_unit_dependent: true
70
+ spm_units:
71
+ spm_unit:
72
+ members: [person1, person2, person3]
73
+ tax_units:
74
+ tax_unit:
75
+ members: [person1, person2, person3]
76
+ households:
77
+ household:
78
+ members: [person1, person2, person3]
79
+ state_code: DC
80
+ output:
81
+ dc_tanf_work_requirement_exempt: [false, true, true]
@@ -0,0 +1,23 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_pap_eligible_child(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ definition_period = MONTH
8
+ label = "Eligible child for DC Public Assistance Programs based on demographics"
9
+ reference = (
10
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.18"
11
+ )
12
+ defined_for = "dc_tanf_immigration_status_eligible_person"
13
+
14
+ def formula(person, period, parameters):
15
+ p = parameters(period).gov.states.dc.dhs.tanf.age_threshold
16
+ age = person("monthly_age", period)
17
+ dependent = person("is_tax_unit_dependent", period)
18
+ secondary_school_student = person("is_in_secondary_school", period)
19
+ age_limit = where(
20
+ secondary_school_student, p.student_dependent, p.minor_child
21
+ )
22
+
23
+ return dependent & (age < age_limit)
@@ -0,0 +1,18 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_gac(Variable):
5
+ value_type = float
6
+ entity = SPMUnit
7
+ label = "DC General Assistance for Children (GAC)"
8
+ unit = USD
9
+ definition_period = MONTH
10
+ reference = (
11
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.05a"
12
+ )
13
+ defined_for = "dc_gac_eligible"
14
+
15
+ def formula(spm_unit, period, parameters):
16
+ countable_income = spm_unit("dc_gac_countable_income", period)
17
+ standard_payment = spm_unit("dc_gac_standard_payment", period)
18
+ return max_(standard_payment - countable_income, 0)
@@ -0,0 +1,15 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_gac_assistance_unit_size(Variable):
5
+ value_type = int
6
+ entity = SPMUnit
7
+ label = "DC General Assistance for Children (GAC) assistance unit size"
8
+ definition_period = MONTH
9
+ reference = (
10
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.05a"
11
+ )
12
+ defined_for = StateCode.DC
13
+
14
+ # Only eligible child can be counted as a member of the GAC assistance unit.
15
+ adds = ["dc_gac_eligible_child"]
@@ -0,0 +1,19 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_gac_standard_payment(Variable):
5
+ value_type = float
6
+ entity = SPMUnit
7
+ label = "DC General Assistance for Children (GAC) standard payment"
8
+ unit = USD
9
+ definition_period = MONTH
10
+ reference = (
11
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.52"
12
+ )
13
+ defined_for = StateCode.DC
14
+
15
+ def formula(spm_unit, period, parameters):
16
+ unit_size = spm_unit("dc_gac_assistance_unit_size", period)
17
+ p = parameters(period).gov.states.dc.dhs.tanf.standard_payment
18
+ capped_unit_size = min_(unit_size, p.max_unit_size)
19
+ return p.amount[capped_unit_size]
@@ -0,0 +1,20 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_gac_eligible(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Eligible for DC General Assistance for Children (GAC)"
8
+ definition_period = MONTH
9
+ reference = (
10
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.05a#(c)"
11
+ )
12
+ defined_for = "dc_gac_income_eligible"
13
+
14
+ def formula(spm_unit, period, parameters):
15
+ has_eligible_child = (
16
+ add(spm_unit, period, ["dc_gac_eligible_child"]) > 0
17
+ )
18
+ resources_eligible = spm_unit("dc_tanf_resources_eligible", period)
19
+
20
+ return has_eligible_child & resources_eligible
@@ -0,0 +1,15 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_gac_eligible_child(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ definition_period = MONTH
8
+ label = "Eligible child for DC General Assistance for Children (GAC) based on demographics"
9
+ reference = (
10
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.05a"
11
+ )
12
+ defined_for = "dc_pap_eligible_child"
13
+
14
+ def formula(person, period, parameters):
15
+ return ~person("is_related_to_head_or_spouse", period)
@@ -0,0 +1,19 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_gac_income_eligible(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = (
8
+ "Eligible for DC General Assistance for Children (GAC) due to income"
9
+ )
10
+ definition_period = MONTH
11
+ reference = (
12
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.10"
13
+ )
14
+ defined_for = StateCode.DC
15
+
16
+ def formula(spm_unit, period, parameters):
17
+ countable_income = spm_unit("dc_gac_countable_income", period)
18
+ standard_payment = spm_unit("dc_gac_standard_payment", period)
19
+ return countable_income <= standard_payment
@@ -0,0 +1,18 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_gac_countable_income(Variable):
5
+ value_type = float
6
+ entity = SPMUnit
7
+ label = "DC General Assistance for Children (GAC) countable income"
8
+ unit = USD
9
+ definition_period = MONTH
10
+ reference = (
11
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.05a#(e)"
12
+ )
13
+ defined_for = StateCode.DC
14
+
15
+ adds = [
16
+ "dc_gac_earned_income_after_disregard_person",
17
+ "dc_gac_countable_unearned_income_person",
18
+ ]
@@ -0,0 +1,17 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_gac_countable_unearned_income_person(Variable):
5
+ value_type = float
6
+ entity = Person
7
+ label = (
8
+ "DC General Assistance for Children (GAC) unearned income per person"
9
+ )
10
+ unit = USD
11
+ definition_period = MONTH
12
+ reference = (
13
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.05a#(e)"
14
+ )
15
+ defined_for = "dc_gac_eligible_child"
16
+
17
+ adds = ["dc_tanf_gross_unearned_income"]
@@ -0,0 +1,28 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_gac_earned_income_after_disregard_person(Variable):
5
+ value_type = float
6
+ entity = Person
7
+ label = "DC General Assistance for Children (GAC) earned income after disregard per person"
8
+ unit = USD
9
+ definition_period = MONTH
10
+ reference = (
11
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.05a#(e)"
12
+ )
13
+ defined_for = "dc_gac_eligible_child"
14
+
15
+ def formula(person, period, parameters):
16
+ p = parameters(period).gov.states.dc.dhs
17
+ gross_earnings = person("dc_tanf_gross_earned_income", period)
18
+ adjusted_income = max_(
19
+ gross_earnings - p.gac.income_disregard.amount, 0
20
+ )
21
+ full_time_student = person("is_full_time_student", period)
22
+ weekly_hours_worked = person("monthly_hours_worked", period)
23
+ work_full_time = (
24
+ weekly_hours_worked
25
+ >= p.tanf.work_requirement.required_hours.single_parent.higher.amount
26
+ )
27
+
28
+ return where(work_full_time & ~full_time_student, adjusted_income, 0)
@@ -0,0 +1,18 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_power(Variable):
5
+ value_type = float
6
+ entity = SPMUnit
7
+ label = "DC Program on Work, Employment, and Responsibility (POWER)"
8
+ unit = USD
9
+ definition_period = MONTH
10
+ reference = (
11
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.52"
12
+ )
13
+ defined_for = "dc_power_eligible"
14
+
15
+ def formula(spm_unit, period, parameters):
16
+ standard_payment = spm_unit("dc_tanf_standard_payment", period)
17
+ countable_income = spm_unit("dc_tanf_countable_income", period)
18
+ return max_(standard_payment - countable_income, 0)
@@ -0,0 +1,30 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_power_eligible(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ definition_period = MONTH
8
+ label = "Eligible for DC Program on Work, Employment, and Responsibility (POWER)"
9
+ reference = (
10
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.72",
11
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.72a",
12
+ )
13
+ defined_for = StateCode.DC
14
+
15
+ def formula(spm_unit, period, parameters):
16
+ has_eligible_head_or_spouse = (
17
+ add(spm_unit, period, ["dc_power_head_or_spouse_eligible"]) > 0
18
+ )
19
+ meets_basic_eligibility_requirements = spm_unit(
20
+ "dc_tanf_basic_eligibility_requirements", period
21
+ )
22
+ has_disqualifying_benefits = spm_unit(
23
+ "dc_power_has_disqualifying_benefits", period
24
+ )
25
+
26
+ return (
27
+ has_eligible_head_or_spouse
28
+ & meets_basic_eligibility_requirements
29
+ & ~has_disqualifying_benefits
30
+ )
@@ -0,0 +1,14 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_power_has_disqualifying_benefits(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Is receiving disqualifying benefits under DC Program on Work, Employment, and Responsibility (POWER)"
8
+ definition_period = YEAR
9
+ defined_for = StateCode.DC
10
+ reference = (
11
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.72#(d)"
12
+ )
13
+
14
+ adds = "gov.states.dc.dhs.power.disqualifying_benefits"
@@ -0,0 +1,38 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_power_head_or_spouse_eligible(Variable):
5
+ value_type = bool
6
+ entity = Person
7
+ definition_period = MONTH
8
+ label = "Eligible for DC Program on Work, Employment, and Responsibility (POWER)"
9
+ reference = (
10
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.72",
11
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.72a",
12
+ )
13
+ defined_for = "is_tax_unit_head_or_spouse"
14
+
15
+ def formula(person, period, parameters):
16
+ p = parameters(period).gov.states.dc.dhs.power.age_threshold
17
+ spm_unit = person.spm_unit
18
+ is_parent = person("is_parent", period)
19
+ is_pregnant = person("is_pregnant", period)
20
+ age = person("monthly_age", period)
21
+
22
+ # Parent of a minor child with incapacitated household member (includes self)
23
+ # Covers both 4-205.72(b)(2) and 4-205.72a(a)(1)(A)
24
+ has_incapable_of_self_care = spm_unit.any(
25
+ person("is_incapable_of_self_care", period)
26
+ )
27
+ has_minor_child = spm_unit.any(person("dc_pap_eligible_child", period))
28
+ parent_with_incapacitated = (
29
+ is_parent & has_minor_child & has_incapable_of_self_care
30
+ )
31
+
32
+ # Parent of a minor child and experienced domestic violence (4-205.72a (a)(2)(A))(not modeled)
33
+ # Pregnant or parenting teen under 19 (4-205.72a(a)(3))
34
+ teen_parent = (is_pregnant | is_parent) & (age < p.younger)
35
+
36
+ # Parent or caretaker who is 60 years of age or older (4-205.72a (a)(5))
37
+
38
+ return parent_with_incapacitated | teen_parent | (age >= p.older)
@@ -0,0 +1,15 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_tanf_assistance_unit_size(Variable):
5
+ value_type = int
6
+ entity = SPMUnit
7
+ label = "DC Temporary Assistance for Needy Families (TANF) assistance unit size"
8
+ definition_period = MONTH
9
+ reference = (
10
+ "https://code.dccouncil.gov/us/dc/council/code/sections/4-205.15"
11
+ )
12
+ defined_for = StateCode.DC
13
+
14
+ adds = ["spm_unit_size"]
15
+ subtracts = ["dc_gac_assistance_unit_size"]
@@ -15,7 +15,7 @@ class dc_tanf_standard_payment(Variable):
15
15
  defined_for = StateCode.DC
16
16
 
17
17
  def formula(spm_unit, period, parameters):
18
- unit_size = spm_unit("spm_unit_size", period)
18
+ unit_size = spm_unit("dc_tanf_assistance_unit_size", period)
19
19
  p = parameters(period).gov.states.dc.dhs.tanf.standard_payment
20
20
  capped_unit_size = min_(unit_size, p.max_unit_size)
21
21
  return p.amount[capped_unit_size]
@@ -0,0 +1,18 @@
1
+ from policyengine_us.model_api import *
2
+
3
+
4
+ class dc_tanf_basic_eligibility_requirements(Variable):
5
+ value_type = bool
6
+ entity = SPMUnit
7
+ label = "Basic eligibility requirements for DC Temporary Assistance for Needy Families (TANF)"
8
+ definition_period = MONTH
9
+ reference = "https://dhs.dc.gov/service/tanf-district-families"
10
+ defined_for = StateCode.DC
11
+
12
+ def formula(spm_unit, period, parameters):
13
+ demographic_eligible = (
14
+ add(spm_unit, period, ["dc_tanf_demographic_eligible_person"]) > 0
15
+ )
16
+ income_eligible = spm_unit("dc_tanf_income_eligible", period)
17
+ resources_eligible = spm_unit("dc_tanf_resources_eligible", period)
18
+ return demographic_eligible & income_eligible & resources_eligible
@@ -13,17 +13,15 @@ class dc_tanf_demographic_eligible_person(Variable):
13
13
  defined_for = StateCode.DC
14
14
 
15
15
  def formula(person, period, parameters):
16
- p = parameters(period).gov.states.dc.dhs.tanf.age_threshold
17
- age = person("monthly_age", period)
18
- dependent = person("is_tax_unit_dependent", period)
19
- minor_child = age < p.minor_child
20
- eligible_minor_child = minor_child & dependent
21
-
22
- student_dependent = age < p.student_dependent
23
- secondary_school_student = person("is_in_secondary_school", period)
24
- eligible_student_dependent = (
25
- secondary_school_student & student_dependent & dependent
16
+ pap_eligible_child = person("dc_pap_eligible_child", period)
17
+ related_to_head_or_spouse = person(
18
+ "is_related_to_head_or_spouse", period
26
19
  )
27
-
28
20
  pregnant = person("is_pregnant", period)
29
- return eligible_minor_child | eligible_student_dependent | pregnant
21
+ immigration_status_eligible = person(
22
+ "dc_tanf_immigration_status_eligible_person", period
23
+ )
24
+
25
+ return (pap_eligible_child & related_to_head_or_spouse) | (
26
+ pregnant & immigration_status_eligible
27
+ )
@@ -10,22 +10,10 @@ class dc_tanf_eligible(Variable):
10
10
  defined_for = StateCode.DC
11
11
 
12
12
  def formula(spm_unit, period, parameters):
13
- demographic_eligible = (
14
- add(spm_unit, period, ["dc_tanf_demographic_eligible_person"]) > 0
13
+ meets_basic_eligibility_requirements = spm_unit(
14
+ "dc_tanf_basic_eligibility_requirements", period
15
15
  )
16
- income_eligible = spm_unit("dc_tanf_income_eligible", period)
17
- resources_eligible = spm_unit("dc_tanf_resources_eligible", period)
18
- immigration_status_eligible = (
19
- add(
20
- spm_unit,
21
- period,
22
- ["dc_tanf_immigration_status_eligible_person"],
23
- )
24
- > 0
25
- )
26
- return (
27
- demographic_eligible
28
- & income_eligible
29
- & resources_eligible
30
- & immigration_status_eligible
16
+ meets_work_requirements = spm_unit(
17
+ "dc_tanf_meets_work_requirements", period
31
18
  )
19
+ return meets_basic_eligibility_requirements & meets_work_requirements