Skip to contents

Helper to calculate summary checksums for PUMS data at a given step. Use to log totals and row counts for validation and reporting.

Usage

pums_checksum(step_name, dt, unit = "person")

Arguments

step_name

character(1). Name of pipeline step.

dt

data.table. PUMS data to summarize.

unit

character(1). Unit of data ("person" or "household"). Default "person".

Value

data.table. Summary checksums for PUMS data.

Details

  • Computes household and person weights, row counts, and totals.

  • Returns a summary data.table for logging or reporting.

  • Assumes valid PUMS schema; errors if missing columns.

Settings

None.

Examples

## Not run:
pums_checksum("initial", dt)
#> Error in pums_checksum("initial", dt): object 'SPORDER' not found
## End(Not run)