Fetch auxiliary data associated with a cast signal.
You can pass a source string to fetch the auxiliary data directly. Alternatively,
you can pass the output of epidata_snapshot() or epidata_archive(). In this
case, epidata_aux automatically retrieves the source from the object, fetches
the matching auxiliary data, and performs a version-aware left join onto the base data.
For the auxiliary key columns and their allowed values, see the source's API docs, e.g. NWSS: https://cmu-delphi.github.io/delphi-epidata/api/v5-signals/nwss.html.
Usage
epidata_aux(source, ...)
# Default S3 method
epidata_aux(
source,
...,
reference_time = "*",
time_values = lifecycle::deprecated(),
report_time = "*",
issues = lifecycle::deprecated(),
columns = NULL,
fetch_args = fetch_args_list()
)
# S3 method for class 'data.frame'
epidata_aux(source, ..., columns = NULL, fetch_args = fetch_args_list())Arguments
- source
A source string to retrieve auxiliary data directly, or a tibble returned by
epidata_snapshot()orepidata_archive()to merge the data onto (its source is recovered automatically).- ...
Named filters on the auxiliary key columns, such as
pcr_target = "sars-cov-2"orgeo_value = c("ca", "ny"). Each key accepts one or more values (matched as OR); they are serialized as repeatedkey:valueterms server-side to keep the aux pull small. Passing more than 10 values for a key warns, since the request URL may get too long. In merge mode, when no filters are given, they are inferred from the base: each key it narrows to at most 10 distinct values is filtered to those.- reference_time
timeset. Reference time to return (filters on thereference_timecolumn). Supports individual dates orepirange(). Base-pull mode only (whensourceis a string).- time_values
- report_time
A date, string, or
epirange()specifying the version of the auxiliary data to retrieve. Base-pull mode only (whensourceis a string).- issues
- columns
A character vector of columns to return. By default, all columns are returned.
- fetch_args
fetch_args_list(). Additional arguments to pass tofetch(). Seefetch_args_list()for details.