Skip to contents

fire_exp_summary() creates a summary table of area and proportions of exposure in predetermined or custom exposure classes.

Usage

fire_exp_summary(
  exposure,
  aoi,
  classify = c("landscape", "local", "custom"),
  class_breaks
)

Arguments

exposure

SpatRaster from fire_exp()

aoi

(optional) SpatVector of an area of interest to mask exposure for summary

classify

character, either "local", "landscape", or "custom", to specify classification scheme to use. The default is "local". If set to "custom": the parameter class_breaks must be used.

class_breaks

vector of numeric values between 0-1 of the upper limits of each custom class. Ignored unless classify = "custom". See details.

Value

a summary table as a data frame object

Details

This function summarizes the outputs from fire_exp() with classes. Classes can be chosen from the pre-set "local" and "landscape" options, or customized. To use a custom classification scheme, it should be defined with a list of numeric vectors defining the upper limits of the breaks. A Nil class is added automatically for exposure values of exactly zero.

Local classification breaks are predefined as c(0.15, 0.3, 0.45, 1):

  • Nil (0)

  • 0 - 0.15

  • 0.15 - 0.3

  • 0.3 - 0.45

  • 0.45 - 1

Landscape classification breaks are predefined as c(0.2, 0.4, 0.6, 0.8, 1):

  • Nil (0)

  • 0 - 0.2

  • 0.2 - 0.4

  • 0.4 - 0.6

  • 0.6 - 0.8

  • 0.8 - 1

The table reports the number of pixels, the proportion, and area in hectares and meters squared in each class.

Examples

# read example hazard data
hazard_file_path <- "extdata/hazard.tif"
hazard <- terra::rast(system.file(hazard_file_path, package = "fireexposuR"))

# read example area of interest polygon geometry
geom_file_path <- "extdata/polygon_geometry.csv"
geom <- read.csv(system.file(geom_file_path, package = "fireexposuR"))
aoi <- terra::vect(as.matrix(geom), "polygons", crs = hazard)

# Compute exposure
exposure <- fire_exp(hazard)

# Summary for full extent of data
fire_exp_summary(exposure, classify = "landscape")
#>   class_range     n npixels       prop    aream2 areaha
#> 1         Nil  2464    2464 0.02547534  24640000   2464
#> 2     0 - 0.2 12582   12582 0.13008550 125820000  12582
#> 3   0.2 - 0.4 13015   13015 0.13456230 130150000  13015
#> 4   0.4 - 0.6 14304   14304 0.14788929 143040000  14304
#> 5   0.6 - 0.8 18911   18911 0.19552114 189110000  18911
#> 6     0.8 - 1 35445   35445 0.36646643 354450000  35445

# Summary masked to an area of interest
fire_exp_summary(exposure, aoi, classify = "landscape")
#>   class_range   n npixels        prop  aream2 areaha
#> 1         Nil   2       2 0.002372479   20000      2
#> 2     0 - 0.2  60      60 0.071174377  600000     60
#> 3   0.2 - 0.4 178     178 0.211150652 1780000    178
#> 4   0.4 - 0.6 196     196 0.232502966 1960000    196
#> 5   0.6 - 0.8 330     330 0.391459075 3300000    330
#> 6     0.8 - 1  77      77 0.091340451  770000     77