Skip to contents

This function allows to efficiently calculate the number of fire events occurred in the region of interest from the NASA FIRMS active fire polygon datasets. For each polygon, the fire event counts for the desired year is returned.

Usage

calc_active_fire_counts()

Value

A function that returns a tibble with a column for number of fire events per year and instrument.

Details

The required resources for this indicator are:

Examples

# \dontshow{
mapme.biodiversity:::.copy_resource_dir(file.path(tempdir(), "mapme-data"))
# }
# \dontrun{
library(sf)
#> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE
library(mapme.biodiversity)

outdir <- file.path(tempdir(), "mapme-data")
dir.create(outdir, showWarnings = FALSE)

mapme_options(
  outdir = outdir,
  verbose = FALSE
)

aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg",
  package = "mapme.biodiversity"
) %>%
  read_sf() %>%
  get_resources(get_nasa_firms(years = 2021, instrument = "VIIRS")) %>%
  calc_indicators(calc_active_fire_counts()) %>%
  tidyr::unnest(active_fire_counts)

aoi
#> Simple feature collection with 1 feature and 8 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -71.80933 ymin: 18.57668 xmax: -71.33201 ymax: 18.69931
#> Geodetic CRS:  WGS 84
#> # A tibble: 1 × 9
#>   WDPAID NAME        DESIG_ENG ISO3  assetid instrument year  active_fire_counts
#>    <dbl> <chr>       <chr>     <chr>   <int> <chr>      <chr>              <int>
#> 1 478140 Sierra de … National… DOM         1 VIIRS      2021                  21
#> # ℹ 1 more variable: geom <POLYGON [°]>
# }