Skip to content

CDC_Mortality_Count - #2210

Open
goutamabrol wants to merge 7 commits into
datacommonsorg:masterfrom
goutamabrol:cdc_mortality
Open

CDC_Mortality_Count#2210
goutamabrol wants to merge 7 commits into
datacommonsorg:masterfrom
goutamabrol:cdc_mortality

Conversation

@goutamabrol

@goutamabrol goutamabrol commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the CDC_Mortality_Count import under statvar_imports/us_cdc/county_mortality/ for CDC WONDER county-level mortality data.

  • Data Source: CDC WONDER Underlying Cause of Death (Database D158), covering all ~3,143 US counties from 2018 to 2024.
  • Coverage: Maps 116 StatVars (Count_MortalityEvent_<Cause>) across all ICD-10 113 causes, generating ~567k observations.
  • Downloader (download.py): Automates session agreements, query partitioning (75k-row cap), and 31-min silent backoff on HTTP 429.
  • Mappings: Dynamic 5-digit FIPS zero-padding (geoId/{CountyCode1}) in PV map with no hardcoded county lookup tables.
  • Automation (manifest.json): Configured for Cloud Batch execution with download.py, stat_var_processor.py, and weekly cron.
  • Validation (validation_config.json): Enforces deletion thresholds.
  • Testing: 10/10 unit tests pass locally (download_test.py).
  • Cloud Batch Verified: End-to-end job completed with status SUCCEEDED .

PR Checklist - link
Validation - link

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new automated importer for CDC WONDER County-Level Mortality Data, including a download script, metadata, mapping files, unit tests, and validation configurations. The reviewer feedback highlights two important improvements for the download script: first, making the is_state_downloaded check more robust to ensure all intermediate years are covered rather than just the first and last; second, modifying the downloader to log errors and continue processing other states instead of immediately terminating the script with logging.fatal when a single state fails.

Comment thread statvar_imports/us_cdc/county_mortality/download.py Outdated
Comment thread statvar_imports/us_cdc/county_mortality/download.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant