Skip to contents

Download friction surface from Malaria Atlas Project

Usage

get_friction_surface(
  shp = NULL,
  extent = NULL,
  transport_type = "walking",
  export = FALSE,
  output_dir = "."
)

Arguments

shp

Area of interest, can be sf of SpatialPolygonDataFrame object, or character string for specific country (will use malariaAtlas shapefile).

extent

2x2 matrix specifying the spatial extent within which raster data is desired, as returned by sp::bbox() - the first column has the minimum, the second the maximum values; rows 1 & 2 represent the x & y dimensions respectively (matrix(c("xmin", "ymin","xmax", "ymax"), nrow = 2, ncol = 2, dimnames = list(c("x", "y"), c("min", "max")))) (use either shp OR extent; if neither is specified global raster is returned).

transport_type

Either "walking" (default) or "motorized".

export

TRUE/FALSE Should output be saved?

output_dir

String to output folder location.