This is a V4 endpoint. Starting in October 2026, it is tentatively
deprecated in favor of the V5 API. The new API can be accessed via the
epidata_snapshot(), epidata_archive(), and epidata_meta() functions.
For more details on the changes, refer to vignette("migration-guide"),
and visit the V5 signals documentation
to see which sources are currently available.
API docs: https://cmu-delphi.github.io/delphi-epidata/api/fluview_clinical.html
Usage
pub_fluview_clinical(
regions,
epiweeks = "*",
...,
issues = NULL,
lag = NULL,
fetch_args = fetch_args_list()
)Arguments
- regions
character. Vector of location IDs to fetch. Can be "nat" for national, "hhs1"–"hhs10" for HHS Regions, "cen1"–"cen9" for census divisions, lowercase two-letter state or territory abbreviations for most states and territories,"jfk" for New York City, or "ny_minus_jfk" for upstate New York. Full list of locations is available here and here.
- epiweeks
timeset. Epiweeks to fetch. Supportsepirange()and defaults to all ("*") dates. Format asepirange(startweek, endweek), where startweek and endweek are of the form YYYYWW (string or numeric).- ...
not used for values, forces later arguments to bind by name
- issues
timeset. Optionally, the issue(s) of the data to fetch. See the "Data Versioning" section for details.- lag
integer. Optionally, the lag of the issues to fetch. See the "Data Versioning" section for details.
- fetch_args
fetch_args_list(). Additional arguments to pass tofetch(). Seefetch_args_list()for details.
Data Versioning
Several endpoints support retrieving historical versions of the data. The following parameters control this and are mutually exclusive (only one can be provided at a time).
as_of: (Date) Retrieve the data as it was on this date.issues:timesetRetrieve data from a specific issue date or range of dates.lag: (integer) Retrieve data with a specific lag from its issue date.
If none of these is specified, the most recent version of the data is returned.
See vignette("versioned-data") for details and more ways to specify
versioned data.
See also
For example queries showing how to discover signals and build calls,
see vignette("signal-discovery", package = "epidatr").
Examples
pub_fluview_clinical(regions = "nat", epiweeks = epirange(201601, 201701))
#> Warning: `pub_fluview_clinical()` uses the V4 Epidata API.
#> ℹ Starting in October 2026, V4 is tentatively deprecated in favor of the V5
#> API.
#> ℹ See `vignette("migration-guide")` (or
#> <https://cmu-delphi.github.io/epidatr/articles/migration-guide.html>) for the
#> V5 endpoints and how to move to them. Old data will remain available for at
#> least a year, but new ingestion will end.
#> This warning is displayed once every 8 hours.
#> # A tibble: 14 × 11
#> release_date region issue epiweek lag total_specimens total_a
#> <date> <chr> <date> <date> <dbl> <dbl> <dbl>
#> 1 2018-10-08 nat 2018-09-23 2016-10-02 103 13380 120
#> 2 2018-10-08 nat 2018-09-23 2016-10-09 102 14053 108
#> 3 2018-10-08 nat 2018-09-23 2016-10-16 101 15110 115
#> 4 2018-10-08 nat 2018-09-23 2016-10-23 100 15312 143
#> 5 2018-10-08 nat 2018-09-23 2016-10-30 99 16652 201
#> 6 2018-10-08 nat 2018-09-23 2016-11-06 98 17811 271
#> 7 2018-10-08 nat 2018-09-23 2016-11-13 97 18948 347
#> 8 2018-10-08 nat 2018-09-23 2016-11-20 96 18520 451
#> 9 2018-10-08 nat 2018-09-23 2016-11-27 95 21542 532
#> 10 2018-10-08 nat 2018-09-23 2016-12-04 94 20564 696
#> 11 2018-10-08 nat 2018-09-23 2016-12-11 93 23476 1359
#> 12 2018-10-08 nat 2018-09-23 2016-12-18 92 26775 2556
#> 13 2018-10-08 nat 2018-09-23 2016-12-25 91 33273 4270
#> 14 2018-10-08 nat 2018-09-23 2017-01-01 90 35028 4288
#> # ℹ 4 more variables: total_b <dbl>, percent_positive <dbl>, percent_a <dbl>,
#> # percent_b <dbl>