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 11723   11723 0.12120429 117230000  11723
#> 3   0.2 - 0.4 13073   13073 0.13516196 130730000  13073
#> 4   0.4 - 0.6 15105   15105 0.15617084 151050000  15105
#> 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  55      55 0.065243179  550000     55
#> 3   0.2 - 0.4 172     172 0.204033215 1720000    172
#> 4   0.4 - 0.6 207     207 0.245551601 2070000    207
#> 5   0.6 - 0.8 330     330 0.391459075 3300000    330
#> 6     0.8 - 1  77      77 0.091340451  770000     77