Estimate fire probability for multiple point locations.

point_probs(r, xy, id, buffer = 20000, weight = "linear",
  lonlat_to_akalbers = TRUE, veg_labels, covariates = TRUE,
  veg = NULL, age = NULL, max.cores = 32)

Arguments

r

raster layer or path to file, an ALFRESCO fire scar output geotiff.

xy

a 2-column data frame or matrix of longitude and latitude.

id

a vector of IDs or names associated with the locations in the rows of xy.

buffer

radius of buffer around xy.

weight

inverse distance weighting, "linear" or "quadratic".

lonlat_to_akalbers

if xy is unprojected (lon/lat), reproject to NAD83 Alaska Albers equal area conic projection.

veg_labels

character, vector of vegetation labels. If missing, they are assumed from get_veg_labels("ak1km").

covariates

logical, if TRUE (default), then a wide data frame is returned that includes additional spatially aggregated covariates. See details.

veg

same asr but for accompanying vegetation class ALFRESCO output.

age

same asr but for accompanying vegetation age ALFRESCO output. See details.

max.cores

integer, maximum number of processors, defaults to 32 for Atlas compute node.

Value

a data frame containing a logical column indicating burn or no burn, a column of distances from point location, and a column of weights.

Details

This function is a wrapper around fire_weights and fire_probs. It uses parallel processing via parallel::mclapply to apply these functions to multiple point locations. See these functions for further details.

It is recommended to not use age because ALFRESCO has a longstanding bug involving geographic areas of uninitialized ages, resulting in extreme negative age values that ruin analyses unless the user first implements their own fix to any age geotiffs before using them.

Examples

# NOT RUN {
scar <- "FireScar_0_2004.tif"
veg <- "Veg_0_2004.tif"
age <- "Age_0_2004.tif"
coords <- data.frame(lon = c(-146, -150), lat = c(64, 67))
point_probs(r = scar, xy = coords, id = c("point1", "point2"), veg = veg, age = age)
# }