Skip to contents

ATTENTION: this tutorial is compatible with gcamreport v6.0*, i.e, with gcamreport v6.0.0, gcamreport v6.0.1, and gcamreport v6.0.0-gas releases. For other releases, please check in the Tutorials drop-down menu in the main bar.

newline

In this tutorial we will 1) generate a dataset from a provided GCAM6.0 database and run the associated user interface and 2) generate a dataset from a provided project and run the corresponding user interface. To know more about the gcamreport package possibilities, look at these tutorials: dataset generation tutorial and user interface tutorial.

newline

Example 1: step-by-step standardized dataset generation from a provided database

  1. Follow the installation guide either with R Studio or Docker

  2. Download the example GCAM6.0 database, store it inside gcamreport/examples, and unpack it.

  3. Generate the standardized dataset:

## -- load gcamreport library.
library(gcamreport)

## -- store the database path, name, and scenarios in a variable.
dbpath <- "examples"
dbname <- "database_basexdb_ref"
scen <- "Reference"

## -- choose a project name
prjname <- "example1.dat"

## -- generate the dataset until 2025, save the output in .csv and .xlsx format, and lunch the user interface
run(db_path = dbpath, db_name = dbname, scenarios = scen, prj_name = prjname, final_year = 2025, save_output = TRUE, launch_ui = TRUE)

Note: project generation requires approximately 30 minutes.

  1. Once the project has been generated and the standardized dataset created, the user interface will prompt. If you are using R Studio, it will automatically open. For a better experience, click the open in browser button. If you are using Docker, either type http://localhost:4000 in the browser or go to Docker Desktop and click the last started port.

UI error

  1. Check the generated dataset: look at examples folder and you should see a file called example1_iamc_report.csv and a file called example1_iamc_report.xlsx containing the standardized dataset.

  2. Notice that in the examples folder a file called database_basexdb_ref_example1.dat has appeared. It is the generated project file from the provided database. In case you want to generate the standardized dataset again or to open the user interface, you can use directly this file and avoid creating the project again. If you whish to proceed as mentioned, you can follow Example 2.

newline

Example 2: step-by-step standardized dataset generation from a provided project

  1. Follow the installation guide either with R Studio or Docker

  2. In this example we will use an example dataset stored in examples called example2.dat

  3. Generate the standardized dataset:

## -- load gcamreport library.
library(gcamreport)

## -- store the database path, name, and scenarios in a variable.
projectpath <- "examples/example2.dat"

## -- generate the dataset until 2025, save the output in .csv and .xlsx format, and lunch the user interface
run(project_path = projectpath, final_year = 2025, save_output = TRUE, launch_ui = TRUE)
  1. Once the project has been generated and the standardized dataset created, the user interface will prompt. If you are using R Studio, it will automatically open. For a better experience, click the open in browser button. If you are using Docker, either type http://localhost:4000 in the browser or go to Docker Desktop and click the last started port.

UI error

  1. Check the generated dataset: look at examples folder and you should see a file called example2_iamc_report.csv and a file called example2_iamc_report.xlsx containing the standardized dataset.