Get values from an API request object as a tibble

ca_getvals_tbl(
  x,
  quiet = FALSE,
  debug = FALSE,
  stop_on_err = TRUE,
  shiny_progress = NULL,
  omit_col = NULL,
  timeout = NULL
)

Arguments

x

A Cal-Adapt API request

quiet

Suppress messages

debug

Print additional output at the console

stop_on_err

Stop if the server returns an error

shiny_progress

A Shiny progress bar object, see Details.

omit_col

Columns to exclude from the tibble

timeout

Timeout limit in seconds

Value

A tibble

Details

ca_getvals_tbl fetches data via the Cal-Adapt API, returning a tibble. Everything is done in memory. To download Cal-Adapt into a local SQLite database, see ca_getvals_db. To download Cal-Adapt data as raster files, see ca_getrst_stars.

A default set of columns will be returned based on how the dataset is specified (i.e., by slug, cvar+scen+gcm+per, livneh, etc). Some columns can be omitted by passing column names to col_omit. Three columns that can never be omitted are feat_id (location id value), dt (date), and val (the actual climate values).

timeout set the longest amount of time before curl reports an error. The default is 10 seconds. Increase this if you experience timeout errors (which have been know to occur on ShinyApps.io perhaps due to server congestion).