fire_exp_summary {fireexposuR}R Documentation

Summarize exposure by class

Description

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.

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):

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

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

Value

a summary table as a data frame object

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")

# Summary masked to an area of interest
fire_exp_summary(exposure, aoi, classify = "landscape")


[Package fireexposuR version 1.1.0 Index]