Get recorded extreme values for a station.
Usage
aemet_extremes_clim(
station = NULL,
parameter = "T",
verbose = FALSE,
return_sf = FALSE,
extract_metadata = FALSE,
progress = TRUE
)
Arguments
- station
Character string with station identifier code(s) (see
aemet_stations()
).- parameter
Character string as temperature (
"T"
), precipitation ("P"
) or wind ("V"
) parameter.- verbose
Logical
TRUE/FALSE
. Provides information about the flow of information between the client and server.- return_sf
Logical
TRUE
orFALSE
. Should the function return ansf
spatial object? IfFALSE
(the default value) it returns atibble
. Note that you need to have the sf package installed.- extract_metadata
Logical
TRUE/FALSE
. OnTRUE
the output is atibble
with the description of the fields. See alsoget_metadata_aemet()
.- progress
Logical, display a
cli::cli_progress_bar()
object. Ifverbose = TRUE
won't be displayed.
Value
A tibble
or a sf object. If the function
finds an error when parsing it would return the result as a list()
object.
API Key
You need to set your API Key globally using aemet_api_key()
.
See also
Other aemet_api_data:
aemet_alert_zones()
,
aemet_alerts()
,
aemet_beaches()
,
aemet_daily_clim()
,
aemet_forecast_beaches()
,
aemet_forecast_daily()
,
aemet_forecast_fires()
,
aemet_last_obs()
,
aemet_monthly
,
aemet_normal
,
aemet_stations()
Examples
library(tibble)
obs <- aemet_extremes_clim(c("9434", "3195"))
#> Error in httr2::req_perform(req1): Failed to perform HTTP request.
#> Caused by error in `curl::curl_fetch_memory()`:
#> ! Failure when receiving data from the peer [opendata.aemet.es]: Recv failure: Connection was reset
glimpse(obs)
#> Error: object 'obs' not found