Skip to contents

fire_exp_map_class() produces a standardized map of exposure with exposure classes. This function dynamically pulls map tiles for a base map, so it is recommended the area of interest is localized. The zoom level may need to be adjusted based on the extent of your data; see OpenStreetMap Wiki for more information on zoom levels. For mapping large extents it is recommended (and will be faster) to use fire_exp_map_cont() which does not use base maps.

Scales and colors are determined by the parameter classify which can be set to "local" or "landscape".

Landscape classification breaks are:

  • Low (0-20%)

  • Moderate (20-40%)

  • High (40-60%),

  • Very High (60-80%)

  • Extreme (80-100%)

Local classification breaks are:

  • Nil (0%)

  • Low (>0-15%)

  • Moderate (15-30%)

  • High (30-45%)

  • Extreme (45%+)

Usage

fire_exp_map_class(exposure, classify = c("local", "landscape"), aoi, zoom)

Arguments

exposure

SpatRaster (e.g. from fire_exp())

classify

character, either "local" or "landscape" to specify classification scheme to use.

aoi

SpatVector of an area of interest to mask exposure

zoom

(Optional). numeric, set the zoom level for the basemap based on the extent of your data if defaults are not appropriate. Defaults if:

  • classify = "local" the zoom level default is 13

  • classify = "landscape" the zoom level default is 6

Value

a standardized map is returned as a ggplot object

Examples

# read example hazard data ----------------------------------
filepath <- "extdata/hazard.tif"
haz <- terra::rast(system.file(filepath, package = "fireexposuR"))
# generate example AOI polygon -----------------------------
filepath <- "extdata/builtsimpleexamplegeom.csv"
g <- read.csv(system.file(filepath, package = "fireexposuR"))
v <- terra::vect(as.matrix(g), "polygons", crs = haz)
# ----------------------------------------------------------

exp <- fire_exp(haz)
fire_exp_map_class(exp, classify = "local", v)