Skip to contents

In this vignette, we show how EROIs can be aggregated by fossil fuel group at the useful stage by respecting a given breakdown, which would usually be a breakdown by final demand sector or end-use category.

Domestic perspective

We start by constructing the dummy final-to-useful efficiencies for each energy product in a similar way than in the vignette demonstrating the aggregation process:

# Constructing final-to-useful efficiencies data frame
length_to_use <- tidy_AB_erois_dta %>%
  dplyr::select(Country, Method, Energy.type, Year, Product) %>%
  dplyr::distinct() %>%
  nrow()

tidy_FU_efficiencies_dta <- tidy_AB_erois_dta %>%
  dplyr::select(Country, Method, Energy.type, Year, Product) %>%
  dplyr::distinct() %>%
  dplyr::mutate(
    Average_Efficiency_Col = seq(0.15, 1, 0.85/(length_to_use-1))
  ) %>% 
  dplyr::glimpse()
#> Rows: 18
#> Columns: 6
#> $ Country                <chr> "A", "A", "A", "A", "A", "A", "A", "A", "A", "B…
#> $ Method                 <chr> "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", "PCM"…
#> $ Energy.type            <chr> "E", "E", "E", "E", "E", "E", "E", "E", "E", "E…
#> $ Year                   <dbl> 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,…
#> $ Product                <chr> "Blast furnace gas", "Coke oven coke", "Coking …
#> $ Average_Efficiency_Col <dbl> 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50,…

Now, supposing that the analyst has access to different final-to-useful efficiencies for three different end-uses; “heating”, “mechanical work”, and “other end-uses”; let’s suppose that the final-to-useful efficiencies for mechanical work are half of those of heating, and those of other end-uses a third of those of heating. We can then construct the data frame of end-use specific final-to-useful efficiencies as follows:

# Making the data frame end-use specific
tidy_FU_efficiencies_dta_end_uses <- tidy_FU_efficiencies_dta %>% 
  tidyr::expand_grid(End_Use = c("Heating", "Mechanical Work", "Other end-uses")) %>% 
  dplyr::mutate(
    Average_Efficiency_Col = dplyr::case_when(
      Average_Efficiency_Col == "Mechanical Work" ~ Average_Efficiency_Col / 2,
      Average_Efficiency_Col == "Other end-uses" ~ Average_Efficiency_Col / 3,
      TRUE ~ Average_Efficiency_Col
    )
  ) %>% 
  dplyr::glimpse()
#> Rows: 54
#> Columns: 7
#> $ Country                <chr> "A", "A", "A", "A", "A", "A", "A", "A", "A", "A…
#> $ Method                 <chr> "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", "PCM"…
#> $ Energy.type            <chr> "E", "E", "E", "E", "E", "E", "E", "E", "E", "E…
#> $ Year                   <dbl> 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,…
#> $ Product                <chr> "Blast furnace gas", "Blast furnace gas", "Blas…
#> $ Average_Efficiency_Col <dbl> 0.15, 0.15, 0.15, 0.20, 0.20, 0.20, 0.25, 0.25,…
#> $ End_Use                <chr> "Heating", "Mechanical Work", "Other end-uses",…

Then, we can calculate the useful stage EROIs at the product level using the push_to_useful_erois, which will respect the different end-uses.

# Constructing useful stage EROIs data frame
  tidy_useful_erois_dta_end_uses <- push_to_useful_erois(
    .tidy_io_erois = tidy_AB_erois_dta,
    tidy_FU_efficiencies = tidy_FU_efficiencies_dta_end_uses,
    eroi_calc_method = "dta"
  ) %>% 
  dplyr::glimpse()
#> Rows: 216
#> Columns: 13
#> $ Country                <chr> "A", "A", "A", "A", "A", "A", "A", "A", "A", "A…
#> $ Method                 <chr> "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", "PCM"…
#> $ Energy.type            <chr> "E", "E", "E", "E", "E", "E", "E", "E", "E", "E…
#> $ Last.stage             <chr> "Final", "Final", "Final", "Final", "Final", "F…
#> $ Year                   <dbl> 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,…
#> $ Eroi.method            <chr> "DTA", "DTA", "DTA", "DTA", "DTA", "DTA", "DTA"…
#> $ Type                   <chr> "Gross", "Gross", "Gross", "Gross", "Gross", "G…
#> $ Boundary               <chr> "All", "All", "All", "All", "All", "All", "All"…
#> $ Product                <chr> "Blast furnace gas", "Blast furnace gas", "Blas…
#> $ EROI                   <dbl> 5.185227, 5.185227, 5.185227, 7.239824, 7.23982…
#> $ Average_Efficiency_Col <dbl> 0.15, 0.15, 0.15, 0.20, 0.20, 0.20, 0.25, 0.25,…
#> $ End_Use                <chr> "Heating", "Mechanical Work", "Other end-uses",…
#> $ Useful_Stage_EROI      <dbl> 0.7777841, 0.7777841, 0.7777841, 1.4479647, 1.4…

Note that likewise, a data frame containing the final demand sector specific final-to-useful efficiencies could have been conducted, and a final demand sector specific of useful stage EROIs could have been conducted.

Last, note that the aggregate_useful_stage_erois function does not yet allow to aggregate EROIs respecting the breakdown. Such a feature will be developed in the near future.

Multi-regional perspective

Similarly, we construct the data frame containing the final-to-useful efficiencies.

# Constructing final-to-useful efficiencies data frame
length_to_use <- tidy_AB_erois_gma %>%
  dplyr::select(Country, Method, Energy.type, Year, Product) %>%
  dplyr::distinct() %>%
  nrow()

tidy_FU_efficiencies_gma <- tidy_AB_erois_gma %>%
  dplyr::mutate(
    Country = stringr::str_extract(Product, "\\{.*\\}") %>%
      stringr::str_remove("\\{") %>% stringr::str_remove("\\}"),
    Product = stringr::str_remove(Product, "\\{.*\\}_")
  ) %>%
  dplyr::select(Country, Method, Energy.type, Year, Product) %>%
  dplyr::distinct() %>%
  dplyr::mutate(
    Average_Efficiency_Col = seq(0.15, 1, 0.85/(length_to_use-1))
  ) %>%
  dplyr::glimpse()
#> Rows: 15
#> Columns: 6
#> $ Country                <chr> "A", "A", "A", "A", "A", "A", "A", "A", "A", "B…
#> $ Method                 <chr> "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", "PCM"…
#> $ Energy.type            <chr> "E", "E", "E", "E", "E", "E", "E", "E", "E", "E…
#> $ Year                   <dbl> 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,…
#> $ Product                <chr> "Blast furnace gas", "Coke oven coke", "Coking …
#> $ Average_Efficiency_Col <dbl> 0.1500000, 0.2107143, 0.2714286, 0.3321429, 0.3…

Next, we make this data frame end-use specific assuming some specific final-to-useful efficiencies by end-use: the average efficiency of mechanical work being half of the one of heating, and the one of other end-uses being a third of the one of heating, and this for all energy products.

# Making the data frame end-use specific
tidy_FU_efficiencies_gma_end_uses <- tidy_FU_efficiencies_gma %>%
  tidyr::expand_grid(End_Use = c("Heating", "Mechanical Work", "Other end-uses")) %>%
  dplyr::mutate(
    Average_Efficiency_Col = dplyr::case_when(
      Average_Efficiency_Col == "Mechanical Work" ~ Average_Efficiency_Col / 2,
      Average_Efficiency_Col == "Other end-uses" ~ Average_Efficiency_Col / 3,
      TRUE ~ Average_Efficiency_Col
    )
  ) %>%
  dplyr::glimpse()
#> Rows: 45
#> Columns: 7
#> $ Country                <chr> "A", "A", "A", "A", "A", "A", "A", "A", "A", "A…
#> $ Method                 <chr> "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", "PCM"…
#> $ Energy.type            <chr> "E", "E", "E", "E", "E", "E", "E", "E", "E", "E…
#> $ Year                   <dbl> 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,…
#> $ Product                <chr> "Blast furnace gas", "Blast furnace gas", "Blas…
#> $ Average_Efficiency_Col <dbl> 0.1500000, 0.1500000, 0.1500000, 0.2107143, 0.2…
#> $ End_Use                <chr> "Heating", "Mechanical Work", "Other end-uses",…

Finally, we construct the useful stage EROIs data frame using the push_to_useful_erois function.

# Constructing useful stage EROIs data frame
tidy_useful_erois_gma_end_uses <- push_to_useful_erois(
  .tidy_io_erois = tidy_AB_erois_gma,
  tidy_FU_efficiencies = tidy_FU_efficiencies_gma_end_uses,
  eroi_calc_method = "gma"
  ) %>%
  dplyr::glimpse()
#> Rows: 324
#> Columns: 13
#> $ Country                <chr> "A", "A", "A", "A", "A", "A", "A", "A", "A", "A…
#> $ Method                 <chr> "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", "PCM"…
#> $ Energy.type            <chr> "E", "E", "E", "E", "E", "E", "E", "E", "E", "E…
#> $ Year                   <dbl> 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,…
#> $ Average_Efficiency_Col <dbl> 0.1500000, 0.1500000, 0.1500000, 0.1500000, 0.1…
#> $ End_Use                <chr> "Heating", "Heating", "Heating", "Heating", "He…
#> $ Last.stage             <chr> "Final", "Final", "Final", "Final", "Final", "F…
#> $ Eroi.method            <chr> "DTA", "DTA", "DTA", "DTA", "DTA", "DTA", "DTA"…
#> $ Type                   <chr> "Gross", "Gross", "Gross", "Gross", "Net", "Net…
#> $ Boundary               <chr> "All", "All", "Feedstock", "Feedstock", "All", …
#> $ Product                <chr> "{A}_Blast furnace gas", "{B}_Blast furnace gas…
#> $ EROI                   <dbl> 2.9003030, 1.4240609, 3.4010475, 1.6927454, 1.9…
#> $ Useful_Stage_EROI      <dbl> 0.43504546, 0.21360914, 0.51015712, 0.25391181,…