Skip to contents

Download data and metadata from the Centers for Disease Control and Prevention (CDC).

Usage

pophive_download_cdc(id, out_dir = "raw", state = NULL, verbose = TRUE)

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.

verbose

Logical; if FALSE, will not display status messages.

Value

The state ID of the downloaded files; downloads files (<id>.json and <id>.csv.xz) to out_dir

data.cdc.gov URLs

For each resource ID, there are 3 relevant CDC URLs:

Examples

if (FALSE) { # \dontrun{
  pophive_download_cdc("ijqb-a7ye")
} # }