| aemet_daily_clim | R Documentation |
Get climatology values for a station or for all the available stations.
Note that aemet_daily_period() and aemet_daily_period_all() are shortcuts
of aemet_daily_clim().
aemet_daily_clim(
station = "all",
start = Sys.Date() - 7,
end = Sys.Date(),
verbose = FALSE,
return_sf = FALSE,
extract_metadata = FALSE,
progress = TRUE
)
aemet_daily_period(
station,
start = as.integer(format(Sys.Date(), "%Y")),
end = start,
verbose = FALSE,
return_sf = FALSE,
extract_metadata = FALSE,
progress = TRUE
)
aemet_daily_period_all(
start = as.integer(format(Sys.Date(), "%Y")),
end = start,
verbose = FALSE,
return_sf = FALSE,
extract_metadata = FALSE,
progress = TRUE
)
station |
Character string with station identifier code(s) (see
|
start, end |
Character strings with start and end dates. See Details. |
verbose |
Logical. If |
return_sf |
Logical. If |
extract_metadata |
Logical. If |
progress |
Logical. Displays a |
start and end arguments must be:
For aemet_daily_clim(): A Date object or a string with format
YYYY-MM-DD ("2020-12-31") coercible with as.Date().
For aemet_daily_period() and aemet_daily_period_all(): A string
representing the year(s) to be extracted: "2020", "2018".
A tibble or a sf object.
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.
aemet_api_key(), as.Date()
AEMET data functions:
aemet_alert_zones(),
aemet_alerts(),
aemet_beaches(),
aemet_extremes_clim(),
aemet_forecast_beaches(),
aemet_forecast_daily(),
aemet_forecast_fires(),
aemet_last_obs(),
aemet_monthly,
aemet_normal,
aemet_stations()
library(tibble)
obs <- aemet_daily_clim(c("9434", "3195"))
glimpse(obs)
# Metadata
meta <- aemet_daily_clim(c("9434", "3195"), extract_metadata = TRUE)
glimpse(meta$campos)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.