Learn R Programming

pacta.loanbook (version 0.1.0)

prep_emission_intensity: Prepare data for a emission intensity plot

Description

Prepare data for a emission intensity plot

Usage

prep_emission_intensity(data, convert_label = identity, span_5yr = FALSE)

Value

A data-frame ready to be plotted using plot_emission_intensity().

Arguments

data

A data frame. Requirements:

  • The structure must be like sda.

  • The column sector must have a single value (e.g. "cement").

  • (Optional) If present, the column label is used for data labels.

convert_label

A symbol. The unquoted name of a function to apply to y-axis labels. For example:

  • To convert labels to uppercase use convert_label = toupper.

  • To get the default behavior of qplot_emission_intensity() use convert_label = to_title.

span_5yr

Logical. Use TRUE to restrict the time span to 5 years from the start year (the default behavior of qplot_emission_intensity()), or use FALSE to impose no restriction.

See Also

Other plotting functions: plot_emission_intensity(), plot_techmix(), plot_trajectory(), prep_techmix(), prep_trajectory(), qplot_emission_intensity(), qplot_techmix(), qplot_trajectory(), recode_metric_techmix(), recode_metric_trajectory(), scale_colour_r2dii(), scale_colour_r2dii_sector(), scale_colour_r2dii_tech(), scale_fill_r2dii(), scale_fill_r2dii_sector(), scale_fill_r2dii_tech(), spell_out_technology(), theme_2dii(), to_title()

Examples

Run this code
# `data` must meet documented "Requirements"
data <- subset(sda, sector == "cement" & region == "global")
prep_emission_intensity(data)

Run the code above in your browser using DataLab