aemet_forecast_fires {climaemet} | R Documentation |
AEMET fires forecast
Description
Get a SpatRaster
as provided by terra with the
daily meteorological risk level for wildfires.
Usage
aemet_forecast_fires(
area = c("p", "c"),
verbose = FALSE,
extract_metadata = FALSE
)
Arguments
area |
The area, being:
|
verbose |
Logical |
extract_metadata |
Logical |
Details
The SpatRaster
provides 5 (factor()
)levels with the following meaning:
-
"1"
: Low risk. -
"2"
: Moderate risk. -
"3"
: High risk. -
"4"
: Very high risk. -
"5"
: Extreme risk.
The resulting object has several layers, each one representing the forecast
for the upcoming 7 days. It also has additional attributes provided by the
terra package, such as terra::time()
and terra::coltab()
.
Value
A tibble
or a SpatRaster
object.
Source
https://www.aemet.es/en/eltiempo/prediccion/incendios.
See Also
Other aemet_api_data:
aemet_alert_zones()
,
aemet_alerts()
,
aemet_beaches()
,
aemet_daily_clim()
,
aemet_extremes_clim()
,
aemet_forecast_beaches()
,
aemet_forecast_daily()
,
aemet_last_obs()
,
aemet_monthly
,
aemet_normal
,
aemet_stations()
Other forecasts:
aemet_forecast_beaches()
,
aemet_forecast_daily()
,
aemet_forecast_tidy()
Examples
aemet_forecast_fires(extract_metadata = TRUE)
# Extract alerts
alerts <- aemet_forecast_fires()
alerts
# Nice plotting with terra
library(terra)
plot(alerts, all_levels = TRUE)
# Zoom in an area
cyl <- mapSpain::esp_get_ccaa("Castilla y Leon", epsg = 4326)
# SpatVector
cyl <- vect(cyl)
fires_cyl <- crop(alerts, cyl)
fires_cyl <- crop(alerts, cyl)
title <- names(fires_cyl)[1]
plot(fires_cyl[[1]], main = title, all_levels = TRUE)
plot(cyl, add = TRUE)