Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- Three county FIPS codes for a bounded comparison
Modeled local health estimates for U.S. counties and smaller areas for building community-health comparisons and resource-planning tools.
From source to product signal
CDC PLACES provides consistently modeled health estimates for counties, places, census tracts, and ZIP Code Tabulation Areas. Start with one measure and a few counties from the current release. PLACES values are modeled small-area estimates with uncertainty, not diagnoses or direct local case counts.
Install the packages, then run the notebook cell.
python -m pip install pandas requests
import pandas as pd
import requests
response = requests.get(
"https://data.cdc.gov/resource/swc5-untb.json",
params={
"$select": "locationid,locationname,stateabbr,measureid,data_value,data_value_unit,low_confidence_limit,high_confidence_limit",
"$where": "measureid='DIABETES' AND data_value_type='Age-adjusted prevalence' AND locationid in('06037','06073','06075')",
"$limit": 10,
},
timeout=30,
)
response.raise_for_status()
counties = pd.DataFrame(response.json())
for column in ["data_value", "low_confidence_limit", "high_confidence_limit"]:
counties[column] = pd.to_numeric(counties[column], errors="coerce")
counties["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(counties.sort_values("data_value", ascending=False))Test a useful signal
Compare age-adjusted diagnosed-diabetes estimates and uncertainty for three California counties.
Centers for Disease Control and Prevention is a government source. Last verified 2026-08-11. Temporal coverage: annual releases using recent survey and population inputs.