Skip to contents

Projects the three CORE sub-tables from the fplida spine. CORE is the PLIDA spine-level infrastructure combining demographic, location, and relationship information from multiple administrative sources.

Usage

generate_core(
  spine = NULL,
  seed = 42L,
  output_dir = NULL,
  years = 2006L:2025L,
  format = c("parquet", "csv"),
  return_data = TRUE
)

Arguments

spine

Data.frame (from generate_spine()) or NULL. If NULL, the most recent spine is loaded from the run directory.

seed

Integer. Random seed for CORE-specific generation.

output_dir

Character or NULL. Base output directory. If NULL, uses get_data_path(). One of the two must be set.

years

Integer vector. Calendar years for the monthly core_residence person-month product.

format

Character. Output format: "parquet" (default) or "csv".

return_data

Logical. If TRUE (default), return data.frames in memory; if FALSE, write to disk and return metadata only.

Value

A named list with three data.frames:

demographics

Person-level demographics (SPINE_ID, birth, gender, death)

locations

Person-level current address (SPINE_ID, state, SA4/SA2/SA1)

relationships

Pair-level relationships (partner + parent-child)

Details

We generate the Combined (cb) 2021 Census version of each sub-table:

  • Demographics: one row per person –birth, gender, death

  • Locations: one row per person –current address with real ASGS 2021 SA1/SA2/SA4 codes

  • Relationships: one row per relationship pair –partner and parent-child links

Dataset and variable information

The ABS PLIDA Modular Product website gives information about this dataset. Use dataset_info("CORE") for dataset information. Use variable_info("CORE") for variables, sources, value support, and topic tags.

Examples

if (FALSE) { # \dontrun{
spine <- generate_spine(n = 1000L, seed = 1L)
core <- generate_core(spine = spine, seed = 1L)
str(core$demographics)
} # }