Create target update mapping table for control file
create_target_update_table.RdCreates a mapping table of target updates for the control file, supporting aggregation and crosswalks for combined or topcoded targets. Use to generate new target names and level mappings for weighting and reporting pipelines.
Value
data.table. Mapping table of target updates. Columns:
Component target columns (if cross target)
old_targets: original target names new_targets: new target names after update Row order: by mapping and target group
Details
Identifies target group from settings using
update_idx.Uses regex pattern matching to select old target names from
target_names.Splits old target names into component levels using
_by_separator.Handles cross targets (multi-level) and single targets.
Loops through update levels in settings, mapping old levels to new levels for each target group.
Aggregates old levels to new levels in mapping table.
Constructs new target names by concatenating component levels with
_by_and prefixing with target group.Drops old target columns after mapping.
Returns a data.table with columns:
Component target columns (if cross target)
old_targets: original target names new_targets: new target names after update
Error handling: none explicit; assumes valid settings and target names.
See also
check_group_sum, update_targets, aggregate_targets
Other weighting pipeline:
aggregate_targets(),
calc_day_weights(),
calc_linked_trip_weights(),
calc_person_weights(),
calc_sample_plan_counts(),
calc_tour_weights(),
calc_trip_weights(),
create_ie_adjustment_data(),
format_income_bins(),
get_day_groups(),
get_income_broad(),
get_income_broad_xwalk(),
prepare_zone_groups(),
update_daypat_seed(),
update_daypat_targets(),
update_income_broad_labels(),
update_rate_report(),
update_targets()