Prepare origin or destination margins for flow validation
Source:R/validate_flow_methods.R
validate_flow_margins.RdAggregates adjusted outputs and the benchmark table to origin or destination
totals. The returned tables keep the same flow / flow_adj convention used
by the main validate_flow_*() functions, so the result can be passed to
validate_flow_overall_methods() or validate_flow_residual_methods().
Usage
validate_flow_margins(
adjusted_outputs,
benchmark_od_df,
role = c("origin", "destination"),
flow_col_mpd = "flow",
flow_col_adj = "flow_adj",
flow_col_bench = "flow"
)Arguments
- adjusted_outputs
Named list of adjusted-flow data frames.
- benchmark_od_df
Benchmark OD data frame.
- role
Margin to construct:
"origin"for total outflows or"destination"for total inflows.- flow_col_mpd
Name of the raw MPD flow column in adjusted outputs. Default
"flow".- flow_col_adj
Name of the adjusted-flow column in adjusted outputs. Default
"flow_adj".- flow_col_bench
Name of the benchmark flow column. Default
"flow".