classify_units {flexurba}R Documentation

Create the DEGURBA spatial units classification

Description

[Deprecated]

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'.

Usage

classify_units(
  data,
  id = "UID",
  level1 = TRUE,
  values = NULL,
  official_workflow = TRUE,
  filename = NULL
)

Arguments

data

named list with the required data, as returned by the function DoU_preprocess_units()

id

character. Unique column in the units data as id for spatial units

level1

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.

values

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.

official_workflow

logical. Whether to employ the official workflow of the GHSL (TRUE) or the alternative workflow (FALSE). For more details, see section "Workflow" below.

filename

character. Output filename (csv). The resulting classification together with a metadata file (in JSON format) will be saved if filename is not NULL.

Value

dataframe with for each spatial unit the classification and the share of population per grid class


[Package flexurba version 0.2.2 Index]