Adjust reference counts to match targets
adjust_reference_to_target.RdAdjusts reference counts so they match target data counts for each zone or PUMA. Use when reference and target data must be aligned for weighting.
Arguments
- ref_counts
data.table with required columns:
client_zone_id <character/integer> — zone or PUMA identifier
ref_count_hh
— household reference count ref_count_per
— person reference count bg_geoid
— block group GEOID area_prop
— proportion of block group area in zone Rows: one per zone. Keys: (client_zone_id). Modified by reference: no (returns copy).
- targets
data.table with required columns:
client_zone_id <character/integer> — zone or PUMA identifier
p_total
— target total persons h_total
— target total households Rows: one per zone. Keys: (client_zone_id). Modified by reference: no (returns copy).
- settings
list. Must include:
weight_dow_groups