Skip to contents

Internal function to load birth data, select columns, create rural indicator, and format county identifiers.

Usage

load_and_process_birth_data(
  birth_data_txt,
  columns_to_select,
  rucc_col,
  record_id_col,
  format_ids = TRUE
)

Arguments

birth_data_txt

Path to birth data file

columns_to_select

Column names to select (NULL for all)

rucc_col

Column name for Rural-Urban Continuum Code

record_id_col

Column name for birth county identifier

format_ids

Logical. Whether to apply smart identifier formatting. If TRUE (default), numeric FIPS-like codes (1-5 digits) are zero-padded, while alphanumeric identifiers are preserved unchanged.

Value

Processed birth data frame