Create a Representation Gap Raster for Ecosystems
make_underrepresented_ecosystems.RdThis function calculates the representation gap of ecosystems provided, identifying those that fall short of a 30% protection target. The resulting raster layer indicates the average degree of underrepresentation across each planning unit. #'
Usage
make_underrepresented_ecosystems(
ecosystems_sf,
group_attribute,
target_percent = 30,
protected_areas_sf,
pus,
iso3 = NULL,
output_path = NULL
)Arguments
- ecosystems_sf
sfobject. Polygon features representing ecosystems, clipped to the analysis area.- group_attribute
character. Column name inecosystems_sfused to group features (e.g., "econame" or "get_id").- target_percent
numeric. Target percentage of protection for each ecosystem group (default = 30).- protected_areas_sf
sforSpatVector. Protected areas dataset to be used in the gap calculation.- pus
SpatRaster. Raster of planning units (e.g., frommake_planning_units()), used as the target grid for rasterization.- iso3
character, optional. ISO3 country code used for naming output files (e.g., "BRA").- output_path
character, optional. Directory path to save the output raster as a GeoTIFF.