aemet_stations: AEMET stations

View source: R/aemet-stations.R

aemet_stationsR Documentation

AEMET stations

Description

Get AEMET stations.

Usage

aemet_stations(verbose = FALSE, return_sf = FALSE)

Arguments

verbose

Logical. If TRUE, provides information about the flow of information between the client and server.

return_sf

Logical. If TRUE, the function returns an sf spatial object. If FALSE (the default value), it returns a tibble. The sf package must be installed.

Details

The first result of the API call in each session is temporarily cached in tempdir() to avoid unnecessary API calls.

Value

A tibble or a sf 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.

Note

Code modified from project https://github.com/SevillaR/aemet.

See Also

AEMET data functions: aemet_alert_zones(), aemet_alerts(), aemet_beaches(), aemet_daily_clim(), aemet_extremes_clim(), aemet_forecast_beaches(), aemet_forecast_daily(), aemet_forecast_fires(), aemet_last_obs(), aemet_monthly, aemet_normal

Examples


library(tibble)
stations <- aemet_stations()
stations

# Cached during this R session
stations2 <- aemet_stations(verbose = TRUE)

identical(stations, stations2)


climaemet documentation built on June 3, 2026, 5:07 p.m.