Prepare data to plot using plot_sankey()
prep_sankey.RdPrepare data to plot using plot_sankey()
Usage
prep_sankey(
data_alignment,
matched_loanbook,
region,
year,
middle_node,
middle_node2 = NULL
)Arguments
- data_alignment
data.frame. Holds aggregated alignment metrics per company for tms sectors. Must contain columns:
group_id,name_abcd,sector.- matched_loanbook
data.frame. Holds the matched loan books of a set of groups. Must include a column
group_idandloan_size_outstanding.- region
Character. Region to filter
data_alignmentdata frame on.- year
Integer. Year on which
data_alignmentshould be filtered.- middle_node
Character. Column specifying the middle nodes to be plotted in sankey plot. Must be present in
data_alignment.- middle_node2
Character. Column specifying the middle nodes to be plotted in sankey plot. Must be present in
data_alignment.