Skip to contents

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.html. For

Obtains information on outpatient inluenza-like-illness (ILI) from U.S. Outpatient Influenza-like Illness Surveillance Network (ILINet).

more information on ILINet, see https://gis.cdc.gov/grasp/fluview/fluportaldashboard.html.

Usage

pub_fluview(
  regions,
  epiweeks = "*",
  ...,
  issues = NULL,
  lag = NULL,
  auth = 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. Supports epirange() and defaults to all ("*") dates. Format as epirange(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.

auth

string. Your restricted access key (not the same as API key).

fetch_args

fetch_args_list(). Additional arguments to pass to fetch(). See fetch_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: timeset Retrieve 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(regions = "nat", epiweeks = epirange(201201, 202005))
#> Warning: `pub_fluview()` 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: 422 × 16
#>    release_date region issue      epiweek      lag num_ili num_patients
#>    <date>       <chr>  <date>     <date>     <dbl>   <dbl>        <dbl>
#>  1 2017-10-24   nat    2017-10-01 2012-01-01   300   11992       678631
#>  2 2017-10-24   nat    2017-10-01 2012-01-08   299   11543       747894
#>  3 2017-10-24   nat    2017-10-01 2012-01-15   298   11939       724623
#>  4 2017-10-24   nat    2017-10-01 2012-01-22   297   13209       784244
#>  5 2017-10-24   nat    2017-10-01 2012-01-29   296   14448       775298
#>  6 2017-10-24   nat    2017-10-01 2012-02-05   295   14624       784516
#>  7 2017-10-24   nat    2017-10-01 2012-02-12   294   15929       789193
#>  8 2017-10-24   nat    2017-10-01 2012-02-19   293   16137       767022
#>  9 2017-10-24   nat    2017-10-01 2012-02-26   292   16518       788242
#> 10 2017-10-24   nat    2017-10-01 2012-03-04   291   15763       749198
#> # ℹ 412 more rows
#> # ℹ 9 more variables: num_providers <dbl>, num_age_0 <dbl>, num_age_1 <dbl>,
#> #   num_age_2 <dbl>, num_age_3 <dbl>, num_age_4 <dbl>, num_age_5 <dbl>,
#> #   wili <dbl>, ili <dbl>