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 with the parameter to retrieve: temperature (
"T"), precipitation ("P") or wind ("V").- verbose
Logical. If
TRUE, provides information about the flow of information between the client and server.- return_sf
Logical. If
TRUE, the function returns ansfspatial object. IfFALSE(the default value), it returns a tibble. The sf package must be installed.- extract_metadata
Logical. If
TRUE, the output is a tibble with the description of the fields. See alsoget_metadata_aemet().- progress
Logical. Displays a
cli::cli_progress_bar()object. Ifverbose = TRUE, it will not be displayed.
Value
A tibble or a sf object. If the function
encounters a parsing error, it returns the results as a list() object.
API key
You need to set your API key globally using aemet_api_key().
Query timeout can be controlled with
options(climaemet_timeout = 60) (default value). See
httr2::req_timeout() for details.
Examples
library(tibble)
obs <- aemet_extremes_clim(c("9434", "3195"))
#> ! HTTP 500:
#> API rate limit reached.
#> ℹ Retrying.
#> Waiting 4s for retry backoff ■■■■■■■■■
#> Waiting 4s for retry backoff ■■■■■■■■■■■■■■■■■■■■■
#> Waiting 4s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
#> Waiting 6s for retry backoff ■■■■■■■■
#> Waiting 6s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■
#> Waiting 6s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
#> Waiting 4s for retry backoff ■■■■■■■■■■■■■■
#> Waiting 4s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
#> Waiting 31s for retry backoff ■■
#> Waiting 31s for retry backoff ■■■
#> Waiting 31s for retry backoff ■■■■■■
#> Waiting 31s for retry backoff ■■■■■■■■■
#> Waiting 31s for retry backoff ■■■■■■■■■■■■
#> Waiting 31s for retry backoff ■■■■■■■■■■■■■■■
#> Waiting 31s for retry backoff ■■■■■■■■■■■■■■■■■
#> Waiting 31s for retry backoff ■■■■■■■■■■■■■■■■■■■■
#> Waiting 31s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■
#> Waiting 31s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■
#> Waiting 31s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
#> Waiting 31s for retry backoff ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
#>
glimpse(obs)
#> Rows: 26
#> Columns: 24
#> $ indicativo <chr> "9434", "9434", "9434", "9434", "9434", "9434", "9434", "9…
#> $ nombre <chr> "ZARAGOZA, AEROPUERTO", "ZARAGOZA, AEROPUERTO", "ZARAGOZA,…
#> $ ubicacion <chr> "ZARAGOZA", "ZARAGOZA", "ZARAGOZA", "ZARAGOZA", "ZARAGOZA"…
#> $ codigo <chr> "023000", "023000", "023000", "023000", "023000", "023000"…
#> $ temMin <dbl> -104, -114, -63, -24, 5, 52, 80, 84, 48, 6, -56, -95, -114…
#> $ diaMin <dbl> 4, 5, 9, 3, 4, 11, 18, 17, 30, 25, 22, 25, 5, 16, 12, 1, 1…
#> $ anioMin <dbl> 1971, 1963, 1964, 1967, 1967, 1971, 1965, 1968, 1974, 1974…
#> $ mesMin <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1…
#> $ temMax <dbl> 206, 255, 287, 324, 375, 432, 445, 428, 392, 339, 284, 220…
#> $ diaMax <dbl> 8, 27, 13, 9, 30, 29, 7, 26, 16, 1, 9, 8, 7, 27, 28, 30, 2…
#> $ anioMax <dbl> 2016, 2019, 2023, 2011, 2025, 2019, 2015, 2010, 1964, 2023…
#> $ mesMax <dbl> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8…
#> $ temMedBaja <dbl> 29, 15, 71, 104, 132, 182, 213, 216, 169, 117, 73, 32, 15,…
#> $ anioMedBaja <dbl> 1953, 1956, 1971, 1986, 1984, 1953, 1977, 1977, 1972, 1974…
#> $ mesMedBaja <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2…
#> $ temMedAlta <dbl> 97, 121, 147, 184, 216, 276, 282, 282, 241, 203, 138, 101,…
#> $ anioMedAlta <dbl> 2016, 1990, 2023, 2026, 2022, 2025, 2015, 2022, 1987, 2022…
#> $ mesMedAlta <dbl> 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7…
#> $ temMedMin <dbl> -12, -30, 19, 54, 85, 126, 150, 151, 110, 72, 27, -21, -30…
#> $ anioMedMin <dbl> 1957, 1956, 1973, 1970, 1984, 1969, 1954, 1954, 1965, 1974…
#> $ mesMedMin <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2…
#> $ temMedMax <dbl> 135, 180, 211, 251, 282, 350, 358, 355, 307, 256, 187, 137…
#> $ anioMedMax <dbl> 2016, 1990, 2023, 2026, 2022, 2025, 2015, 2003, 1987, 2023…
#> $ mesMedMax <dbl> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7…
