Skip to contents

Get climate normals.

Usage

get_climate_normals(
  sources,
  elements = NULL,
  period = NULL,
  format = "jsonld",
  version = "v0",
  client = get_frost_client(),
  auth_type = c("basic", "oauth"),
  flatten = TRUE,
  return_response = FALSE
)

Arguments

sources

character: Source (station) ID, e.g. 'SN18700'.

elements

character: Elements. See `get_elements()` for available values.

period

character: The validity period, e.g. '1931/1960'.

format

character: Response format.

version

character: API version.

client

list: List with client id and secret. Defaults to the `MET_FROST_ID` and `MET_FROST_SECRET` environment variables.

auth_type

character: Authentication method, either 'basic' or 'oauth'.

flatten

logical: If TRUE the response is transformed to a table.

return_response

logical: If TRUE a list of class `frost_api` is returned, including the raw `httr2_response`.

Examples

df <- get_climate_normals("SN100")
#> Error in get_frost_client(): No client id found, please supply with `client` argument or with MET_FROST_ID env var