knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  tidy = "styler",
  warning = FALSE,
  message = FALSE
)

The following table shows the metadata provided by AEMET for each of the functions included on climaemet (Last update: r format(Sys.Date(),"%d-%B-%Y")).

# Get all the metadata
library(dplyr)
library(climaemet)

daily <- aemet_daily_clim(extract_metadata = TRUE)$campos
daily$fun <- "aemet_daily"


exend <- lapply(c("T", "P", "V"), function(x) {
  ex <- aemet_extremes_clim("9434",
    parameter = x,
    extract_metadata = TRUE
  )$campos

  ex$fun <- "aemet_extremes"
  ex
}) %>%
  bind_rows() %>%
  distinct()


fday <- aemet_forecast_daily("08001", extract_metadata = TRUE)$campos
fday$fun <- "aemet_forecast_daily"

fhour <- aemet_forecast_hourly("08001", extract_metadata = TRUE)$campos
fhour$fun <- "aemet_forecast_hourly"

fbeach <- aemet_forecast_beaches("08001", extract_metadata = TRUE)$campos
fbeach$fun <- "aemet_forecast_beaches"


lobs <- aemet_last_obs(extract_metadata = TRUE)$campos
lobs$fun <- "aemet_last_obs"


mon <- aemet_monthly_period(
  station = "9434", start = 2022,
  extract_metadata = TRUE
)$campos
mon$fun <- "aemet_monthly"

norm <- aemet_normal_clim_all(extract_metadata = TRUE)$campos
norm$fun <- "aemet_normal"

alert_meta <- aemet_alerts(extract_metadata = TRUE)
alerts <- tibble::tibble(
  fun = "aemet_alerts",
  descripcion = as.character(alert_meta$campos)
)


end <- daily %>%
  bind_rows(exend, fday, fhour, fbeach, lobs, mon, norm, alerts) %>%
  relocate(fun, .before = 1) %>%
  as_tibble() %>%
  distinct() %>%
  arrange(fun)

library(reactable)
reactable::reactable(end,
  filterable = TRUE,
  searchable = TRUE,
  showPageSizeOptions = TRUE,
  striped = TRUE,
  paginationType = "jump",
  defaultPageSize = 20,
  compact = TRUE,
  elementId = "aemet-metadata",
  columns = list(
    fun = colDef(name = "function / family", style = "font-weight:bold;")
  )
)

Session info

Details

if (!require("sessioninfo")) {
  install.packages("sessioninfo")
}
sessioninfo::session_info()



rOpenSpain/climaemet documentation built on Feb. 13, 2025, 6:18 p.m.