Skip to contents

Creates lookup tables linking Australian Statistical Geography Standard (ASGS) regions across multiple levels such as SA2, SA3, SA4 and State/Territory.

Usage

make_areas_lookup(
  data_tb,
  coding_ls = list(STE = 1, SA4 = 1:3, SA3 = 1:5, SA2 = 1:9),
  filters_ls = list(),
  output_1L_chr = c("tbl_df", "data.frame", "data.table")
)

Arguments

data_tb

Spatial input data.

coding_ls

Named list defining the character positions used to derive higher geographical levels.

filters_ls

Named list of filtering rules.

output_1L_chr

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

Value

A geographic lookup table.

Details

The function derives geographic hierarchies from spatial datasets and optionally creates higher-level region codes by substring extraction.

Examples

if (FALSE) { # \dontrun{
make_areas_lookup(
  data_tb,
  coding_ls = list(
    STE = 1,
    SA4 = 1:3,
    SA3 = 1:5,
    SA2 = 1:9
  )
)
} # }