Update targets by combining levels
update_targets.RdUpdate targets in seed or control tables by combining levels for specified geography groups. Use to topcode or aggregate targets for weighting and reporting pipelines.
Arguments
- data
data.table with required columns:
Target columns prefixed by
h_,p_, ort_(numeric)Geometry column (e.g.,
zone_group) Rows: one per geography unit. Keys: geometry column. Modified by reference: no (returns copy).
- settings
list. Must include:
target_updates- — named list of updates, each with
levelsandgroups. Modified by reference: no.
- geo_cross_walk
data.table with required columns:
geom— geometry ID geom_label— geometry label Rows: one per geography unit. Keys: ( geom). Modified by reference: no.
- geom
character(1). Name of geometry column in
geo_cross_walk. Default "zone_group".
Details
Iterates over
target_updatesin settings, updating specified targets.Combines levels for selected geography groups using crosswalk.
Supports topcoding and aggregation via level lists or mapping tables.
Returns a copy; does not modify by reference.
Assumes valid target names, levels, and crosswalk schema; errors if missing.
See also
check_group_sum, update_targets, aggregate_targets,
create_target_update_table, popsim_make_geoxwalk,
popsim_make_input_data, popsim_make_control_config,
popsim_calculate_importance, create_importance_list,
popsim_settings_defaults, popsim_settings_updates,
popsim_make_settings
aggregate_targets,create_target_update_tablescripts/weighting/update_targets.R
update_targets, aggregate_targets, create_target_update_table
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(),
create_target_update_table(),
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()