Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Federal TANF baseline infrastructure for simplified state implementations.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: The Department of Health and Human Services counts these income sources as earned income under the Temporary Assistance for Needy Families program.
values:
2020-01-01:
- employment_income_before_lrs
- self_employment_income_before_lrs
metadata:
unit: list
period: year
label: TANF earned income sources
reference:
- title: 42 U.S.C. § 602 - Eligible States; State plan
href: https://www.law.cornell.edu/uscode/text/42/602
# TANF gives states flexibility to define earned income in their state plans. This list serves as a general baseline that states may override with their own definitions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
description: The Department of Health and Human Services counts these income sources as unearned income under the Temporary Assistance for Needy Families program.
values:
2020-01-01:
- veterans_benefits
- rental_income
- child_support_received
- alimony_income
- dividend_income
- interest_income
- miscellaneous_income
- pension_income
- unemployment_compensation
- gi_cash_assistance
- social_security

metadata:
unit: list
period: year
label: TANF unearned income sources
reference:
- title: 42 U.S.C. § 602 - Eligible States; State plan
href: https://www.law.cornell.edu/uscode/text/42/602
# TANF gives states flexibility to define unearned income in their state plans. This list serves as a general baseline that states may override with their own definitions.
53 changes: 53 additions & 0 deletions policyengine_us/tests/policy/baseline/gov/hhs/tanf/tanf_fpg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
- name: TANF FPG for household of 1 in 2025
period: 2025-01
absolute_error_margin: 0.01
input:
spm_unit_size: 1
state_group_str: CONTIGUOUS_US
output:
tanf_fpg: 15_060 / 12

- name: TANF FPG for household of 2 in 2025
period: 2025-01
absolute_error_margin: 0.01
input:
spm_unit_size: 2
state_group_str: CONTIGUOUS_US
output:
tanf_fpg: (15_060 + 5_380) / 12

- name: TANF FPG for household of 3 in 2025
period: 2025-01
absolute_error_margin: 0.01
input:
spm_unit_size: 3
state_group_str: CONTIGUOUS_US
output:
tanf_fpg: (15_060 + 5_380 * 2) / 12

- name: TANF FPG for household of 4 in 2025
period: 2025-01
absolute_error_margin: 0.01
input:
spm_unit_size: 4
state_group_str: CONTIGUOUS_US
output:
tanf_fpg: (15_060 + 5_380 * 3) / 12

- name: TANF FPG in 2024
period: 2024-01
absolute_error_margin: 0.01
input:
spm_unit_size: 3
state_group_str: CONTIGUOUS_US
output:
tanf_fpg: (14_580 + 5_140 * 2) / 12

- name: TANF FPG in 2023
period: 2023-01
absolute_error_margin: 0.01
input:
spm_unit_size: 3
state_group_str: CONTIGUOUS_US
output:
tanf_fpg: (13_590 + 4_720 * 2) / 12
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from policyengine_us.model_api import *


class tanf_gross_earned_income(Variable):
value_type = float
entity = Person
label = (
"Temporary Assistance for Needy Families (TANF) gross earned income"
)
unit = USD
definition_period = MONTH

adds = "gov.hhs.tanf.cash.income.sources.earned"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from policyengine_us.model_api import *


class tanf_gross_unearned_income(Variable):
value_type = float
entity = Person
label = (
"Temporary Assistance for Needy Families (TANF) gross unearned income"
)
unit = USD
definition_period = MONTH

adds = "gov.hhs.tanf.cash.income.sources.unearned"
28 changes: 28 additions & 0 deletions policyengine_us/variables/gov/hhs/tanf/tanf_fpg.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from policyengine_us.model_api import *


class tanf_fpg(Variable):
value_type = float
entity = SPMUnit
label = "TANF federal poverty guideline"
unit = USD
documentation = (
"The federal poverty guideline used to determine TANF eligibility."
)
definition_period = MONTH
reference = "https://www.law.cornell.edu/uscode/text/42/9902"

def formula(spm_unit, period, parameters):
# We can use tanf_unit_size for more accurate model in the future
n = spm_unit("spm_unit_size", period.this_year)
state_group = spm_unit.household("state_group_str", period.this_year)
year = period.start.year
month = period.start.month
if month >= 10:
instant_str = f"{year}-10-01"
else:
instant_str = f"{year - 1}-10-01"
p_fpg = parameters(instant_str).gov.hhs.fpg
p1 = p_fpg.first_person[state_group] / MONTHS_IN_YEAR
pn = p_fpg.additional_person[state_group] / MONTHS_IN_YEAR
return p1 + pn * (n - 1)