Get last observation values for a station.
Arguments
- station
Character string with station identifier code(s) (see
aemet_stations()
) or "all" for all the stations.- 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 a tibble. Note that you need to have thesf
package installed.
API Key
You need to set your API Key globally using aemet_api_key()
.
See also
Other aemet_api_data:
aemet_daily_clim()
,
aemet_extremes_clim()
,
aemet_forecast_daily()
,
aemet_monthly
,
aemet_normal
,
aemet_stations()
Examples
library(tibble)
obs <- aemet_last_obs(c("9434", "3195"))
glimpse(obs)
#> Rows: 48
#> Columns: 26
#> $ idema <chr> "9434", "9434", "9434", "9434", "9434", "9434", "9434", "943…
#> $ lon <dbl> -1.004167, -1.004167, -1.004167, -1.004167, -1.004167, -1.00…
#> $ fint <dttm> 2023-03-28 13:00:00, 2023-03-28 14:00:00, 2023-03-28 15:00:…
#> $ prec <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ alt <dbl> 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, …
#> $ vmax <dbl> 5.8, 6.2, 5.5, 5.3, 4.9, 4.4, 4.1, 4.2, 5.0, 4.5, 5.4, 4.8, …
#> $ vv <dbl> 3.5, 2.8, 3.1, 3.5, 3.3, 2.1, 2.9, 3.0, 3.0, 3.3, 3.4, 1.8, …
#> $ dv <dbl> 109, 80, 110, 130, 117, 115, 138, 100, 100, 109, 100, 78, 10…
#> $ lat <dbl> 41.66056, 41.66056, 41.66056, 41.66056, 41.66056, 41.66056, …
#> $ dmax <dbl> 103, 88, 108, 115, 105, 115, 148, 133, 115, 103, 115, 110, 8…
#> $ ubi <chr> "ZARAGOZA AEROPUERTO", "ZARAGOZA AEROPUERTO", "ZARAGOZA A…
#> $ pres <dbl> 993.7, 993.3, 992.4, 992.2, 992.0, 992.2, 992.6, 993.3, 994.…
#> $ hr <dbl> 34, 27, 26, 24, 23, 28, 26, 31, 40, 49, 57, 62, 69, 66, 74, …
#> $ stdvv <dbl> 0.8, 0.6, 0.7, 0.7, 0.5, 0.3, 0.5, 0.4, 0.4, 0.4, 0.4, 0.4, …
#> $ ts <dbl> 23.4, 25.4, 24.9, 25.0, 23.8, 20.3, 17.9, 16.1, 14.8, 14.1, …
#> $ pres_nmar <dbl> 1023.3, 1022.7, 1021.7, 1021.4, 1021.2, 1021.6, 1022.2, 1023…
#> $ tamin <dbl> 17.9, 19.7, 21.5, 22.2, 22.6, 21.0, 19.0, 17.5, 15.8, 14.7, …
#> $ ta <dbl> 19.7, 21.5, 22.2, 22.7, 22.6, 21.0, 19.1, 17.5, 15.8, 14.7, …
#> $ tamax <dbl> 19.7, 21.6, 22.2, 22.9, 23.0, 22.6, 21.0, 19.2, 17.5, 15.8, …
#> $ tpr <dbl> 3.4, 1.7, 1.7, 1.1, 0.4, 1.7, -1.0, 0.2, 2.3, 4.1, 5.8, 5.6,…
#> $ stddv <dbl> 17, 20, 17, 11, 11, 7, 9, 7, 8, 7, 8, 12, 6, 9, 6, 8, 7, 10,…
#> $ inso <dbl> 60.0, 60.0, 60.0, 60.0, 60.0, 39.5, 0.0, 0.0, 0.0, 0.0, 0.0,…
#> $ tss5cm <dbl> 21.4, 22.6, 23.4, 23.5, 23.1, 22.2, 21.0, 19.9, 19.1, 18.4, …
#> $ pacutp <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ tss20cm <dbl> 16.2, 16.7, 17.2, 17.8, 18.3, 18.7, 19.0, 19.1, 19.1, 19.0, …
#> $ rviento <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, …