Plot alignment scatterplot
Usage
plot_scatter(
data,
sector = NULL,
scenario_source = NULL,
scenario = NULL,
year = NULL,
region = NULL,
title = NULL,
subtitle = NULL,
alignment_limit = NULL,
data_level = c("company", "group_var"),
cap_outliers = NULL,
floor_outliers = NULL
)
prep_scatter(
data_bopo,
data_net,
data_level = c("group_var", "company"),
year,
sector,
region,
group_var,
groups_to_plot = NULL
)
Arguments
- data
data.frame. Should have the same format as output of
prep_scatter()
and contain columns: 'name', 'buildout', phaseout', 'net'.- sector
Character. Sector to filter data on.
- scenario_source
Character. Scenario source to be used in the plot caption.
- scenario
Character. Scenario name to be used in the plot caption.
- year
Integer. Year on which the data should be filtered.
- region
Character. Region to filter data on.
- title
Character. Custom title if different than default.
- subtitle
Character. Custom subtitle if different than default.
- alignment_limit
Numeric. Limit to be applied to the x- and y-axis scales and to alignment values for colouring. By default the maximum absolute alignment value of is used.
- data_level
Character. Level of the plotted data. Can be
'group_var'
or'company'
.- 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.
- 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.
- data_bopo
data.frame. Data containing buildout and phaseout alignment values. Must contain columns:
'year'
,'sector'
,'region'
,'direction'
and either'name_abcd'
and'alignment_metric'
or'exposure_weighted_net_alignment'
plus any column implied bygroup_var
.- data_net
data.frame. Data containing net alignment values. Must contain columns:
group_var
,'year'
,'sector'
,'region'
,'direction'
and either'name_abcd'
and'alignment_metric'
or'exposure_weighted_net_alignment'
.- group_var
Character. Vector of length 1. Variable to group by.
- groups_to_plot
Character vector. Groups to filter on.