Developers: Diego SILVA HERRAN 1 , Jiayang WANG 2, Masahiro SUGIYAMA 2, Hiroto SHIRAKI 3.
1 Institute for Global Environmental Strategies (IGES), Japan.
2 Policy Alternatives Research Insititute (PARI), The University of Tokyo, Japan.
3 The University of Shiga Prefecture, Japan.
The mipplot tool produces plots for straightforward visualization of data from climate mitigation scenarios (also known as emission scenarios) generated by means of integrated assessment models (IAM) and energy-economic models. The tool can be applied to any dataset following the format adopted by data submissions contributing to IPCC’s assessment reports.
This document describes the features of the mipplot tool, a tool for visualizing data from climate mitigation scenarios (also known as emission scenarios) generated by means of integrated assessment models (IAM) and energy-economic models. The tool is a package of scripts developed in “R” programming language (R version 3.4.0) in the “RStudio” software (version 1.0.143). It was developed to serve a two-fold purpose: gathering of IAM scenario data into a consistent dataset, and straightforward visualization of key data from multiple models. The approach adopted in the development of the tool can be potentially applied to any dataset that follows the Integrated Assessment Modeling Consortium (IAMC) data submission format. This format has been adopted by data submissions contributing to IPCC’s assessment reports. Moreover, the tool can be delivered as a hands-on tool for non-experts to visualize with minimum effort the information from mitigation scenarios.
The initial purpose of the mipplot tool is to generate plots from emission scenario data with minimum effort from users. It has been developed assuming that users have little knowledge on the background of the models and methodologies used to generate such data. This tool uses the data from different models and scenarios generated for model intercomparison comparison (MIP) exercises. As such exercises are conducted on the assumption that data by different models is comparable, guaranteeing that the data submitted by all modeling teams are consistent on their own, and comply with a standard format is essential for the analyses. The tool can be used to check the list of variables submitted and missing, check the additivity of disaggregated variables to their corresponding totals, and generating plots of the variables.
The following softwares are needed for installation and operation of the tool.
R programming language
:
This is a software for scripting language. It can be downloaded for free from the R website.
RStudio
:
This is a visual interface for developing and executing scripts developed in R language.
It can be downloaded for free from the RStudio website.
Some R libraries containing built-in functions are required to install and operate the mipplot tool. They can be installed for free via R or RStudio with the following instructions.
Visit the release page on GitHub.
Download the latest zip file (binary package).
Start R.
Set working directory to where the downloaded file is in.
Run following commands.
install.packages("tidyverse")
install.packages("mipplot_0.1.0.zip", repos = NULL)
Visit the release page on GitHub.
Download the latest tar.gz file (source package).
Start R.
Set working directory to where the downloaded file is in.
Run following commands.
install.packages("tidyverse")
install.packages("mipplot_0.1.0.tar.gz", repos = NULL)
sudo apt install build-essential gfortran g++ libcurl4-openssl-dev libxml2-dev libssl-dev
This commands install the library which tidyverse
library depends.
Visit the release page on GitHub.
Download the latest tar.gz file (source package).
Start R.
Set working directory to where the downloaded file is in.
Run following commands.
install.packages("tidyverse")
install.packages("mipplot_0.1.0.tar.gz", repos = NULL)
The tool is operated by first reading the input data file, and then by applying any of the plotting and diagnostic functions supported by the tool. All functions will be applied to the object defined when reading the input data. As long as all functions are applied to the same input data, and the session in RStudio is not terminated, there is no need to read the input data a second time.
Read the input data with the readquitte function. If no file is specified, a sample dataset from the IPCC AR5 scenario database is loaded by default.
Several types of plots based on the input data can be generated. The plot types supported by the current version of the tool includes line, stacked area, stacked bar, and boxplot. Invoke plotting function Specify scope of data to plot: scenarios, models, regions, variables, periods (if needed). Specify plotting options: color, line, facet, etc. Enable output as pdf file.
read.quitte
function of the quitte
package.
```r
mipplot_read_iamc (filename=NULL, sep=",", interactive=FALSE, DEBUG=T) - Input Arguments
- **filename**: Path to a file containing scenario data in IAMC format.
- **sep**: A character indicating the separator used in the input file.
- **interactive**: open a dialog for selecting file if interactive=TRUE.
- **DEBUG**: experimental.
- Output variable
- A dataframe in tibble format ("model, scenario, variable, unit, period, value")
Example:
```r
mipplot_read_iamc(filename)
```r mipplot_read_ruletab(R_without_id)
- Input Arguments
- **R_without_id**: Path to a file containing data of additivity rule.
- Output Variable
- A dataframe of additivity rule ("ID, Left_side, Right_side")
Example:
```r
mipplot_read_ruletab (R_without_id)
r
mipplot_area ( D, R, region=levels(D$region), scenario=levels(D$scenario),
facet_x=NULL, facet_y=NULL, PRINT_OUT=F, DEBUG=T, fontsize=20, color_code_specify=T)
- Input 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.
- Output Variable
- A list of area plots.
Example:
mipplot_area(ar5_db_sample_data, ar5_db_sample_rule_table)
mipplot_bar (
D, R,region = levels(D$region), xby = "scenario",
target_year = levels(as.factor(D$period)),
facet_x = NULL, facet_y = NULL, PRINT_OUT = F, DEBUG = T, fontsize = 20,
color_code_specify = T)
Example:
mipplot_bar(ar5_db_sample_data, ar5_db_sample_rule_table)
mipplot_line ( D, region = levels(D$region), variable = levels(D$variable),
colorby = "scenario", linetypeby = "model", shapeby = "model",
scenario = levels(D$scenario), facet_x = NULL, facet_y = NULL, PRINT_OUT = F, DEBUG = T)
Example:
mipplot_line(ar5_db_sample_data)
mipplot_box ( D, region = levels(D$region), variable = levels(D$variable),
target_year = levels(as.factor(D$period)), PRINT_OUT = F, DEBUG = T)
Example:
mipplot_box(ar5_db_sample_data)
See the Annex ii of the IPCC AR5, and the homepage of the IPCC AR5 database.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.