classify_units() has been renamed to DoU_classify_units() to create a more consistent API and to better indicate that this function is specifically designed to classify units in the context of the DEGURBA classification`.
classify_units(
data,
id = "UID",
level1 = TRUE,
values = NULL,
official_workflow = TRUE,
filename = NULL
)dataframe with for each spatial unit the classification and the share of population per grid class
named list with the required data, as returned by the function DoU_preprocess_units()
character. Unique column in the units data as id for spatial units
logical. Whether to classify the spatial units according to first hierarchical level (TRUE) or the second hierarchical level (FALSE). For more details, see section "Classification rules" below.
vector with the values assigned to the different classes in the resulting units classification:
If level1=TRUE: the vector should contain the values for (1) cities, (2) town and semi-dense areas and (3) rural areas.
If level1=FALSE: the vector should contain the values for (1) cities, (2) dense towns, (3) semi-dense towns, (4) suburb or peri-urban areas, (5) villages, (6) dispersed rural areas and (7) mostly uninhabited areas.
logical. Whether to employ the official workflow of the GHSL (TRUE) or the alternative workflow (FALSE). For more details, see section "Workflow" below.
character. Output filename (csv). The resulting classification together with a metadata file (in JSON format) will be saved if filename is not NULL.