Skip to contents

validate_flow_prepare_output() joins an adjusted-flow table to the raw MPD flow column used by validation comparisons. validate_flow_prepare_outputs() applies the same preparation to a named list of adjusted-flow tables.

Usage

validate_flow_prepare_output(
  adj_df,
  mpd_df,
  flow_col_mpd = "flow",
  flow_col_adj = "flow_adj"
)

validate_flow_prepare_outputs(
  adjusted_outputs,
  mpd_df,
  flow_col_mpd = "flow",
  flow_col_adj = "flow_adj"
)

Arguments

adj_df

Data frame with adjusted flows.

mpd_df

Raw MPD flow data with origin, destination, and the raw flow column.

flow_col_mpd

Name of the raw MPD flow column in mpd_df. Default "flow".

flow_col_adj

Name of the adjusted-flow column in adj_df. Default "flow_adj".

adjusted_outputs

Named list of adjusted-flow data frames.

Value

validate_flow_prepare_output() returns a tibble. If adj_df already contains a flow column, that column is retained as adjusted_input_flow and the raw MPD flow from mpd_df becomes flow. validate_flow_prepare_outputs() returns a named list of prepared tibbles.

Details

These helpers are useful when outputs come from different adjustment routes or cached files but need the common debiasR validation columns: origin, destination, flow, and flow_adj.