Download data and metadata from the Centers for Disease Control and Prevention (CDC).
Arguments
- id
ID of the resource (e.g.,
ijqb-a7ye
).- out_dir
Directory in which to save the metadata and data files.
- state
The state ID of a previous download; if provided, will only download if the new state does not match.
- parquet
Logical; if
TRUE
, will convert the downloaded CSV file to Parquet.- verbose
Logical; if
FALSE
, will not display status messages.
data.cdc.gov
URLs
For each resource ID, there are 3 relevant CDC URLs:
resource/<id>
: This redirects to the resource's main page, with displayed metadata and a data preview (e.g., data.cdc.gov/resource/ijqb-a7ye).api/views/<id>
: This is a direct link to the underlying JSON metadata (e.g., data.cdc.gov/api/views/ijqb-a7ye).api/views/<id>/rows.csv
: This is a direct link to the full CSV dataset (e.g., data.cdc.gov/api/views/ijqb-a7ye/rows.csv).