knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(dplyr)
library(ECCTools)

Introduction

The R package ECCTools provides tools to modify an Energy Conversion Chain (ECC) that has been previously loaded using the R package IEATools. The IEATools package helps to load IEA data as well as to sort and prepare IEA data to formulate a Physical Supply Use Table framework (PSUT, see @Heun:2018). However, the IEATools package treats imports as a supplying industry, and to this extent, adopts what we refer here to as the Free Imports Assumption: imports come for free, with no upstream associated conversion chain (and hence, neither associated environmental burden nor embodied energy consumption).

The ECCTools package enables analysts to overcome this limitation through two different options:

  1. The formulation of a Multi-Regional Physical Supply Use Table (MR-PSUT) framework (see @mr_psut_paper) representing the Energy Conversion Chain. In this case, imports are treated as supply coming from an industry located in a different region. This option is the most realistic one.
  2. The formulation of a PSUT framework following the Domestic Technology Assumption (DTA). The DTA assumes that imports are produced within the region that imports them. Although the DTA is not a realistic assumption, it enables analysts to conduct useful simulations.

Design philosophy

The package has been designed to be used as follows.

  1. First, the IEA data needs to be loaded as usually done with the IEATools package. See the IEATools package documentation.
  2. Second, specific flows may be modified, for instance, to aggregate regions, to locate flows in a different PSUT matrix (in particular, to the newly introduced balancing matrix), or to perform any other modification.
  3. Third, the overarching assumption of the PSUT may be modified, using one of the transform_to_dta(), transform_to_gma(), or transform_to_bta() functions.
  4. Fourth, the actual PSUT matrices may be formulated using the prep_psut() function of the IEATools package.

Subsequent Energy Conversion Chain analysis can be conducted using the Recca package. See the Recca package documentation.

Available vignettes

The vignettes available for this package detail how to conduct the following tasks:

  1. Using the balancing matrix: Shows how to relocate flows into the newly defined balancing matrix B and what the downstream consequences are.
  2. Domestic Technology Assumption: Shows how to formulate the Domestic Technology Assumption and which conditions need to be fulfilled to formulate such an assumption.
  3. Global Market Assumption: Shows how to formulate the Global Market Assumption.
  4. Bilateral Trade Assumption: Shows how to provide bilateral trade data to formulate the Bilateral Trade Assumption.

Demonstration example: the AB world

To illustrate how to use the package, we introduce a fictitious world consisting of two countries (A and B): welcome to the AB world!

Country A

The Energy Conversion Chain of country A is shown in the figure below:

As can be seen, the country A:

Country B

Next figure shows the Energy Conversion Chain of country B.

As can be seen, country B:

Tidy AB data

Let's now have a look to the AB data organised in a .tidy_iea_df as provided by the IEATools package.

# Fix product-level balances within each country
tidy_AB_data %>% 
  dplyr::glimpse()

Global unbalances

So far so good. However, we note that although each domestic Energy Conversion Chain is balanced (supply = consumption), the global Energy Conversion Chain resulting from the addition of both domestic Energy Conversion Chains is not. Indeed:

The fact that these Energy Conversion Chains, when taken together, are unbalanced, is an attempt to represent faithfully the features of IEA data. Indeed, this type of unbalances appear when trying to build a global Energy Conversion Chain from IEA data. Our AB world example will therefore show how such inconsistencies are dealt with when working with real IEA data.

Now, some guesses about why such inconsistencies may appear in IEA data:

References



earamendia/ECCTools documentation built on May 12, 2023, 2:12 a.m.