Plot alignment scatterplot
Source:R/plot_scatter_alignment_exposure.R
, R/prep_scatter_alignment_exposure.R
plot_scatter_alignment_exposure.Rd
Plot alignment scatterplot
Usage
plot_scatter_alignment_exposure(
data,
floor_outliers,
cap_outliers,
group_var,
currency
)
prep_scatter_alignment_exposure(
data,
year,
region,
scenario,
group_var,
exclude_groups = "benchmark"
)
Arguments
- data
data.frame. Holds net aggregated alignment metrics on the loan book level. Must contain columns:
"scenario"
,"region"
,"sector"
,"year"
,"exposure_weighted_net_alignment"
,"sum_loan_size_outstanding"
and any column implied bygroup_var
.- floor_outliers
Numeric. Floor which should be applied to the alignment values in the data. Values smaller than floor are plotted on the border of the plot.
- cap_outliers
Numeric. Cap which should be applied to the alignment values in the data. Values bigger than cap are plotted on the border of the plot.
- group_var
Character. Vector of length 1. A column to group by. Must be available variables in
data
.- currency
Character. Currency to display in the plot labels.
- year
Integer. Year on which
data
should be filtered.- region
Character. Region to filter
data
data frame on.- scenario
Character. Scenario to filter
data
data frame on.- exclude_groups
Character. Character specifying any values from
group_var
that should not be included in the analysis. This is useful to remove benchmarks that are not meant to be compared at the same level. Defaults to"benchmark"
.