Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- An internet connection
Weekly outpatient influenza-like illness activity for building seasonal respiratory-illness monitors.
From source to product signal
FluView publishes ILINet outpatient respiratory-illness activity on data.cdc.gov. Start with a few recent weeks. ILI is syndromic — fever plus cough or sore throat — not laboratory-confirmed influenza incidence.
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/6svj-q4zv.json",
params={"$limit": 20, "$order": "week_ending DESC"},
timeout=30,
)
response.raise_for_status()
ili = pd.DataFrame(response.json())
ili["retrieved_at_utc"] = pd.Timestamp.now(tz="UTC")
print(ili.head(20))Test a useful signal
Test whether weekly activity categories can power a bounded flu-season dashboard.
Centers for Disease Control and Prevention is a government source. Last verified 2026-08-17. Temporal coverage: weekly surveillance seasons from the late 1990s.