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(),
snapshot_date = NULL,
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. Whensourceis a tibble and 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(). Only used whensourceis a string.- time_values
- snapshot_date
Date,
POSIXt, UTC timestamp string (e.g."2025-10-16T13:45:00Z"),"latest", orNULL. Return auxiliary data as it appeared at this date or instant (one row per key, the most recent version active then)."latest"uses today's date. UseNULL(default) to return the full version history filtered byreport_time. Mutually exclusive withreport_time. Only used whensourceis a string.- report_time
String or
epirange()specifying the version of the auxiliary data to retrieve. Accepts comparison operators (e.g.,"<2025-10-16",">=2025-10-16", or"<=2025-10-16T13:45:00Z"for a UTC timestamp bound) or anepirange()for an inclusive date range. Bare dates and the"="operator are not accepted: usesnapshot_datefor point-in-time data. Mutually exclusive withsnapshot_date. Only used 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.