View source: R/hydroweight_attributes.R
hydroweight_attributes | R Documentation |
hydroweight::hydroweight_attributes()
calculates distance-weighted
attributes using distance-weighted rasters generated in hydroweight::hydroweight()
,
an attribute layer (loi
, e.g., land use polygon/raster), and a region of interest
(roi
, e.g., a catchment polygon). The function outputs an attribute
summary table or a list that includes the summary table and layers used for calculation.
Summary statistics are calculated as in Peterson et al. 2011 https://doi:10.1111/j.1365-2427.2010.02507.x).
IMPORTANTLY, this function only produces one instance of the loi
x distance_weights
summary statistics (i.e., one loi
, one roi
, and one set of distance_weights
).
See https://github.com/bkielstr/hydroweight for workflows.
hydroweight_attributes(
loi = NULL,
loi_attr_col = NULL,
loi_columns = NULL,
loi_numeric = NULL,
loi_numeric_stats = NULL,
roi = NULL,
roi_uid = NULL,
roi_uid_col = NULL,
distance_weights = NULL,
remove_region = NULL,
return_products = TRUE
)
loi |
|
loi_attr_col |
character. A name that will precede the calculated attributes (e.g., loi_mean, loi_median etc.) |
loi_columns |
character. The column names over which to summarize the attributes. |
loi_numeric |
logical. If |
loi_numeric_stats |
character. One or more of c("distwtd_mean", "distwtd_sd", "mean", "sd", "median", "min", "max", "sum", "cell_count"). Those without distwtd_ are simple "lumped" statistics. |
roi |
|
roi_uid |
character. Unique identifier value for the roi. |
roi_uid_col |
character. Column name that will be assigned to the roi_uid. |
distance_weights |
|
remove_region |
|
return_products |
logical. If |
Spatial layers are aligned to distance_weights
(i.e., identical coordinate reference systems - CRS).
If return_products = TRUE
, a list containing 1) attribute summary table, and 2) a list of return_products of length(distance_weights)
where each list element contains a list of 2 sub-elements: 1) roi-
and remove_region
-masked loi
(i.e., all cells contributing to attribute calculation), and 2) the roi-
and remove_region
-masked distance_weights
raster. If return_products = FALSE
, attribute summary table only.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.