View source: R/compute_accessibility.R
compute_accessibility | R Documentation |
Returns the result in long-table format
compute_accessibility(aoi = NULL, acc_rast = NULL, idcol = NULL, opn = "mean")
aoi |
area of interest - polygon (sf) |
acc_rast |
accessibility raster (terra) |
idcol |
A character vector identifying a column name which uniquely
identifies the polygons in the |
opn |
A type of zonal operation (sum/mean/min/max) - mean being default value |
zonal statistics
# load raster r <- terra::rast(system.file("extdata", "test_acc_rast.tif", package = "openRspat")) # load polygon fname <- system.file("shape/nc.shp", package="sf") sf <- sf::st_read(fname) # provide unique id column idcol <- sf[1, ]$CNTY_ID # zonal operation type opn <- "min" # call function compute_accessibility(aoi=sf[1,], acc_rast=r, idcol=idcol, opn=opn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.