Skip to content

Commit

Permalink
adding energy efficiency Kaya factor FE/GDP_PPP, and denoting old FE/…
Browse files Browse the repository at this point in the history
…GDP by FE/GDP_MER
  • Loading branch information
Chen Gong committed Dec 11, 2023
1 parent 363e033 commit f60e10b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '221686904'
ValidationKey: '221844520'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'remind2: The REMIND R package (2nd generation)'
version: 1.125.2
version: 1.126.0
date-released: '2023-12-11'
abstract: Contains the REMIND-specific routines for data and model output manipulation.
authors:
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: remind2
Title: The REMIND R package (2nd generation)
Version: 1.125.2
Version: 1.126.0
Date: 2023-12-11
Authors@R: c(
person("Renato", "Rodrigues", , "[email protected]", role = c("aut", "cre")),
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The REMIND R package (2nd generation)

R package **remind2**, version **1.125.2**
R package **remind2**, version **1.126.0**

[![CRAN status](https://www.r-pkg.org/badges/version/remind2)](https://cran.r-project.org/package=remind2) [![R build status](https://github.com/pik-piam/remind2/workflows/check/badge.svg)](https://github.com/pik-piam/remind2/actions) [![codecov](https://codecov.io/gh/pik-piam/remind2/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/remind2) [![r-universe](https://pik-piam.r-universe.dev/badges/remind2)](https://pik-piam.r-universe.dev/builds)

Expand Down Expand Up @@ -49,7 +49,7 @@ In case of questions / problems please contact Renato Rodrigues <renato.rodrigue

To cite package **remind2** in publications use:

Rodrigues R, Baumstark L, Benke F, Dietrich J, Dirnaichner A, Führlich P, Giannousakis A, Hasse R, Hilaire J, Klein D, Koch J, Kowalczyk K, Levesque A, Malik A, Merfort A, Merfort L, Morena-Leiva S, Pehl M, Pietzcker R, Rauner S, Richters O, Rottoli M, Schötz C, Schreyer F, Siala K, Sörgel B, Spahr M, Strefler J, Verpoort P, Weigmann P (2023). _remind2: The REMIND R package (2nd generation)_. R package version 1.125.2, <https://github.com/pik-piam/remind2>.
Rodrigues R, Baumstark L, Benke F, Dietrich J, Dirnaichner A, Führlich P, Giannousakis A, Hasse R, Hilaire J, Klein D, Koch J, Kowalczyk K, Levesque A, Malik A, Merfort A, Merfort L, Morena-Leiva S, Pehl M, Pietzcker R, Rauner S, Richters O, Rottoli M, Schötz C, Schreyer F, Siala K, Sörgel B, Spahr M, Strefler J, Verpoort P, Weigmann P (2023). _remind2: The REMIND R package (2nd generation)_. R package version 1.126.0, <https://github.com/pik-piam/remind2>.

A BibTeX entry for LaTeX users is

Expand All @@ -58,7 +58,7 @@ A BibTeX entry for LaTeX users is
title = {remind2: The REMIND R package (2nd generation)},
author = {Renato Rodrigues and Lavinia Baumstark and Falk Benke and Jan Philipp Dietrich and Alois Dirnaichner and Pascal Führlich and Anastasis Giannousakis and Robin Hasse and Jérome Hilaire and David Klein and Johannes Koch and Katarzyna Kowalczyk and Antoine Levesque and Aman Malik and Anne Merfort and Leon Merfort and Simón Morena-Leiva and Michaja Pehl and Robert Pietzcker and Sebastian Rauner and Oliver Richters and Marianna Rottoli and Christof Schötz and Felix Schreyer and Kais Siala and Björn Sörgel and Mike Spahr and Jessica Strefler and Philipp Verpoort and Pascal Weigmann},
year = {2023},
note = {R package version 1.125.2},
note = {R package version 1.126.0},
url = {https://github.com/pik-piam/remind2},
}
```
10 changes: 6 additions & 4 deletions inst/markdown/compareScenarios2/cs2_02_macro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ showMultiLinePlotsByVariable(dIea, items, "GDP|PPP pCap", scales = "fixed")
```{r Kaya Decomposition}
d <-
data %>%
filter(variable %in% c("Emi|CO2|Energy", "FE", "GDP|MER", "Population")) %>%
filter(variable %in% c("Emi|CO2|Energy", "FE", "GDP|MER", "GDP|PPP","Population")) %>%
filter(scenario != "historical") %>%
select(model, scenario, region, variable, unit, period, value)
oldUnits <-
Expand All @@ -246,18 +246,20 @@ kaya <-
pivot_wider(names_from = variable, values_from = value) %>%
mutate(
emiCO2_by_FE = `Emi|CO2|Energy` / FE,
FE_by_GDP = FE / `GDP|MER`,
FE_by_GDP_MER = FE / `GDP|MER`,
FE_by_GDP_PPP = FE / `GDP|PPP`,
GDP_by_Pop = `GDP|MER` / Population,
`Emi|CO2|Energy` = NULL, FE = NULL, `GDP|MER` = NULL) %>%
pivot_longer(
c(emiCO2_by_FE, FE_by_GDP, GDP_by_Pop, Population),
c(emiCO2_by_FE, FE_by_GDP_MER, FE_by_GDP_PPP, GDP_by_Pop, Population),
names_to = "variable",
values_to = "value")
kayaUnits <- tribble(
~variable, ~unit,
"Population", "million",
"GDP_by_Pop", "billion US$2005/yr/million",
"FE_by_GDP", "EJ/billion US$2005",
"FE_by_GDP_MER", "EJ/billion US$2005",
"FE_by_GDP_PPP", "EJ/billion US$2005",
"emiCO2_by_FE", "EJ/Mt CO2")
kayaVars <- kayaUnits$variable
kaya <-
Expand Down

0 comments on commit f60e10b

Please sign in to comment.