Health Development Skill
fartbagxp/healthScrape and build queries to an official public health endpoints under a .gov domain.\
SKILL.md
Health Development Skill
Project Context
Scrape and build queries to an official public health endpoints under a .gov domain.\
CDC WONDER queries documented in docs/wonder.md.
Key Commands
uv sync- Install dependenciesuv run pytest- Run testsuv run pre-commit run --all-files- Run lintersuv add <package>- Add dependencyuv add --dev <package>- Add dev dependency
Project Structure
uv run python main.py # Main code
Development Workflow
- Make changes
- Run pre-commit hooks automatically on commit
- Tests run via uv run python script
- Modify github actions
- Update README.md to remove non-relevance.
Important Notes
- Always support a CLI interface
- Use CDC WONDER resources from wonder.cdc.gov
- Use uv best practices
Configuration Files
Refer to pyproject.toml and .pre-commit-config.yaml in this directory for exact setup.
README
Overview
This is a repository to collect and run fun experiments on various publicly available health APIs.
Sources
CDC WONDER
CDC WONDER - Wide-ranging ONline Data for Epidemiologic Research includes an unauthenticated Application Programmatic Interface (API) for birth (natality), death, and cancer statistics. The Wonder API is a non-standard custom XML on HTTPS API with non-standard headers like sending accept_datause_restrictions with a value of "true" as a XML parameter via a HTTP POST to accept an agreement.
The XML parameters it supports is similar to querying a database, with these examples.
-
U.S. national cancer deaths (ICD-10 codes C00-D48) by year and by race, for the 5 year time period 2009-2013. Number of deaths, population estimates, crude death rates and age-adjusted death rates per 100,000 persons, 95% confidence intervals and standard errors for age-adjusted death rates.
-
U.S. national injury deaths for persons age 18 and under, by Injury Intent and Injury Mechanism, for years 1999-2013. Number of deaths, population estimates, crude death rates.
We can find better explanation of the parameters via an open source repository by alipphardt.
The soft rate limit is a query every two minutes to let the WONDER database recover.