mipplot_area {mipplot}R Documentation

Area plot from IAMC data

Description

Area plots using right-hand-side values of target additivity rule. The function arguments include the input dataframe, labels for the plot/axes/legend, and faceting dimensions (two in this version).

Usage

mipplot_area(
  D,
  R,
  region = levels(D$region),
  scenario = levels(D$scenario),
  facet_x = NULL,
  facet_y = NULL,
  PRINT_OUT = FALSE,
  DEBUG = TRUE,
  fontsize = 20,
  color_code_specify = TRUE,
  one_hundred_percent_stacked = FALSE,
  axis_year_text_angle = 0,
  language = "en"
)

Arguments

D

A dataframe of IAMC data in tibble format to produce area plots.

R

A dataframe of data aggregation rules (meta data).

region

A list of regions.

scenario

A list of scenario.

facet_x

facet_x

facet_y

facet_y

PRINT_OUT

set TRUE to generate PDF file.

DEBUG

set TRUE to show debug messages.

fontsize

font size of text.

color_code_specify

set FALSE if you apply default color palette.

one_hundred_percent_stacked

set TRUE if you want a graph of 100% stacked, set this to TRUE.

axis_year_text_angle

text angle of x axis

language

A string of language. Possible values are "en", "jp", "es", "zh-cn", "zh-tw". The default value is "en".

Value

A list of area plots.

Examples


library(dplyr)
data_subset <- ar5_db_sample_data %>%
filter(variable == "Emissions|CO2|Land Use") %>%
filter(model %in% c("AIM-Enduse 12.1", "GCAM 3.0", "IMAGE 2.4")) %>%
filter(2005 <= period) %>%
filter(period <= 2100)
mipplot_area(data_subset, ar5_db_sample_rule_table,
region = c("ASIA"),
scenario = c("EMF27-450-Conv"),
one_hundred_percent_stacked = FALSE,
axis_year_text_angle = 0,
language = 'en')


[Package mipplot version 0.3.1 Index]