es_ts: Request TimeSeries Data from ESSENCE

Description Usage Arguments Value

View source: R/es_ts.R

Description

es_ts() retrieves the results of a timeseries API query. The provided parameters are required for all queries; additional parameters may be required for specific data sources. These will be listed on failure if not provided.

Usage

1
2
3
4
5
6
7
8
9
es_ts(
  datasource,
  start,
  end = Sys.Date(),
  resolution = c("daily", "weekly", "monthly", "quarterly", "yearly"),
  ...,
  creds = es_creds_get(),
  check = TRUE
)

Arguments

datasource

[character(1)] An ESSENCE data source; see es_datasource() for available options

start

[Date(1)] or an object that can be coerced to one. The start date for the query.

end

[Date(1)] or an object that can be coerced to one. The end date for the query.

resolution

[character(1)]. The resolution of the returned timeseries

...

Additional query parameters; see the ESSENCE User Guide (in particular the API section) for details. All arguments must be named.

creds

secret. User login credentials for ESSENCE.

check

[logical(1)] Should the query parameters be checked before requesting? Note that some timeseries-specific parameters (e.g. detector) will currently cause an error.

Value

A tibble with columns date, count, expected, levels, colorID, color, altText, & details


jesse-smith/essence documentation built on Dec. 20, 2021, 11:05 p.m.