Skip to contents

Creates an urbanicity classification lookup table from Modified Monash Model (MMM) geographic classifications.

Usage

make_urbanicity_lookup(
  data_xx,
  area_populations_ls = list(AreaERP2023Share = "ERP 2023"),
  area_sizes_ls = list(AreaKM2SA2 = "SA2 2021 Area (km2)", AreaKM2SA2Urbanicity =
    "MMM 2023 Area in SA2 2021 (km2)"),
  area_types_ls = list(SA2 = "SA2 2021 Code"),
  code_var_1L_chr = "MMM 2023 Code",
  coding_ls = list(urban = 1:2, rural = 3:7),
  filters_ls = list(),
  transformation_fn = as.character,
  output_1L_chr = c("tbl_df", "data.frame", "data.table")
)

Arguments

data_xx

Spatial dataset.

area_populations_ls

Named list specifying population variables.

area_sizes_ls

Named list specifying area-related variables.

area_types_ls

Named list specifying geographic identifiers.

code_var_1L_chr

Name of the MMM classification code variable.

coding_ls

Named list mapping MMM codes to urbanicity labels.

filters_ls

Named list of filtering rules.

transformation_fn

Function applied to area identifiers.

output_1L_chr

Output type. One of "tbl_df", "data.frame" or "data.table".

Value

A lookup table containing urbanicity classifications and optional population or area summaries.

Details

Geographic areas are mapped into user-defined urbanicity categories such as "urban" and "rural" and optionally summarised with population and area statistics.

Examples

if (FALSE) { # \dontrun{
make_urbanicity_lookup(
  data_xx,
  coding_ls = list(
    urban = 1:2,
    rural = 3:7
  ),
  output_1L_chr = "data.table"
)
} # }