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: patch
changes:
fixed:
- Fix etl_state_income_tax.py API mismatches with db_metadata utility functions
8 changes: 4 additions & 4 deletions policyengine_us_data/db/etl_state_income_tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def load_state_income_tax_data(df: pd.DataFrame, year: int) -> dict:
source = get_or_create_source(
session,
name="Census Bureau Annual Survey of State Tax Collections",
type=SourceType.administrative,
source_type=SourceType.ADMINISTRATIVE,
url="https://www.census.gov/programs-surveys/stc.html",
notes="Individual income tax collections by state",
)
Expand All @@ -270,18 +270,18 @@ def load_state_income_tax_data(df: pd.DataFrame, year: int) -> dict:
var_group = get_or_create_variable_group(
session,
name="state_income_tax",
display_name="State Income Tax",
category="taxes",
description="State-level individual income tax collections",
)

# Get or create variable metadata
get_or_create_variable_metadata(
session,
variable="state_income_tax",
group=var_group,
display_name="State Income Tax",
variable_group_id=var_group.variable_group_id,
units="USD",
description="Total state individual income tax collections",
notes="Total state individual income tax collections",
)

# Get geographic strata to use as parents
Expand Down