From 5cae064d428b2a5f9285082cb9e4e22ad10f54e8 Mon Sep 17 00:00:00 2001 From: Chen Gong <> Date: Tue, 12 Dec 2023 17:53:34 +0100 Subject: [PATCH 1/3] add GDP PPP / population --- inst/markdown/compareScenarios2/cs2_02_macro.Rmd | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/inst/markdown/compareScenarios2/cs2_02_macro.Rmd b/inst/markdown/compareScenarios2/cs2_02_macro.Rmd index 1813c9e0..5d283079 100644 --- a/inst/markdown/compareScenarios2/cs2_02_macro.Rmd +++ b/inst/markdown/compareScenarios2/cs2_02_macro.Rmd @@ -248,16 +248,18 @@ kaya <- emiCO2_by_FE = `Emi|CO2|Energy` / FE, 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) %>% + GDP_MER_by_Pop = `GDP|MER` / Population, + GDP_PPP_by_Pop = `GDP|PPP` / Population, + `Emi|CO2|Energy` = NULL, FE = NULL, `GDP|MER` = NULL, `GDP|PPP` = NULL) %>% pivot_longer( - c(emiCO2_by_FE, FE_by_GDP_MER, FE_by_GDP_PPP, GDP_by_Pop, Population), + c(emiCO2_by_FE, FE_by_GDP_MER, FE_by_GDP_PPP, GDP_MER_by_Pop, GDP_PPP_by_Pop, Population), names_to = "variable", values_to = "value") kayaUnits <- tribble( ~variable, ~unit, "Population", "million", - "GDP_by_Pop", "billion US$2005/yr/million", + "GDP_MER_by_Pop", "billion US$2005/yr/million", + "GDP_PPP_by_Pop", "billion US$2005/yr/million", "FE_by_GDP_MER", "EJ/billion US$2005", "FE_by_GDP_PPP", "EJ/billion US$2005", "emiCO2_by_FE", "EJ/Mt CO2") From dd0eba8e8e901441d0efa8686cfe6eebd27fd77c Mon Sep 17 00:00:00 2001 From: Chen Gong <> Date: Wed, 13 Dec 2023 11:42:15 +0100 Subject: [PATCH 2/3] for sectoral FE pGDP plots, only change documentation and variable names so it is more obvious that it is divided by GDP_PPP not GDP_MER --- .../compareScenarios2/cs2_02_macro.Rmd | 18 +++++++++--------- inst/markdown/compareScenarios2/cs2_main.Rmd | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/inst/markdown/compareScenarios2/cs2_02_macro.Rmd b/inst/markdown/compareScenarios2/cs2_02_macro.Rmd index 5d283079..edcf4c99 100644 --- a/inst/markdown/compareScenarios2/cs2_02_macro.Rmd +++ b/inst/markdown/compareScenarios2/cs2_02_macro.Rmd @@ -206,25 +206,25 @@ walk(vars, showLinePlots, data = data) ## FE intensity of GDP -```{r FE intensity of GDP} +```{r FE intensity of GDP_PPP} items <- c( - "FE|Transport pGDP", - "FE|Buildings pGDP", - "FE|Industry pGDP") + "FE|Transport pGDP_PPP", + "FE|Buildings pGDP_PPP", + "FE|Industry pGDP_PPP") showAreaAndBarPlots(data, items, scales = "fixed") ``` -## FE intensity of GDP, linegraph (by GDP) +## FE intensity of GDP_PPP, linegraph (by pGDP_PPP) -```{r FE intensity of GDP, linegraph} +```{r FE intensity of GDP_PPP, linegraph} dIea <- data %>% # To make the plots less crowded, show only IEA historical data. filter(scenario != "historical" | model == "IEA") items <- c( - "FE|Transport pGDP", - "FE|Buildings pGDP", - "FE|Industry pGDP") + "FE|Transport pGDP_PPP", + "FE|Buildings pGDP_PPP", + "FE|Industry pGDP_PPP") showMultiLinePlots(dIea, items, scales = "fixed") showMultiLinePlotsByVariable(dIea, items, "GDP|PPP pCap", scales = "fixed") ``` diff --git a/inst/markdown/compareScenarios2/cs2_main.Rmd b/inst/markdown/compareScenarios2/cs2_main.Rmd index df386f14..9f044d7e 100644 --- a/inst/markdown/compareScenarios2/cs2_main.Rmd +++ b/inst/markdown/compareScenarios2/cs2_main.Rmd @@ -334,7 +334,7 @@ data <- ``` -```{r calculate pGDP variables} +```{r calculate pGDP_PPP variables} dataGDP <- data %>% filter(variable == "GDP|PPP pCap") %>% @@ -345,10 +345,10 @@ dataGDP <- rename(gdp = value) # For all variables in following table, add a new variable to data with the name -# "OldName pGDP". Calculate its value by +# "OldName pGDP_PPP". Calculate its value by # OldValue / (GDP|PPP pCap) * conversionFactor # and set its unit to newUnit. -# The new variable "OldName pGDP" will be available in the plot sections. +# The new variable "OldName pGDP_PPP" will be available in the plot sections. pGdpVariables <- tribble( ~variable, ~newUnit, ~conversionFactor, "FE", "MJ/US$2005", 1e3, @@ -363,8 +363,8 @@ dataPGdp <- left_join(dataGDP, c("scenario", "region", "period")) %>% mutate( value = value / gdp * conversionFactor, - variable = paste0(variable, " pGDP"), - varplus = paste0(varplus, " pGDP"), + variable = paste0(variable, " pGDP_PPP"), + varplus = paste0(varplus, " pGDP_PPP"), unit = newUnit, newUnit = NULL, conversionFactor = NULL, gdp = NULL) From 007370bc62319c5786ad6b8dfc86587bb59a9b3d Mon Sep 17 00:00:00 2001 From: Chen Gong <> Date: Wed, 13 Dec 2023 14:09:28 +0100 Subject: [PATCH 3/3] version number --- .buildlibrary | 2 +- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- README.md | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index 83a358c1..c9d079ba 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '221844520' +ValidationKey: '222064080' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/CITATION.cff b/CITATION.cff index 83ffa28b..df1b9334 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,8 +2,8 @@ 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.126.0 -date-released: '2023-12-11' +version: 1.127.0 +date-released: '2023-12-13' abstract: Contains the REMIND-specific routines for data and model output manipulation. authors: - family-names: Rodrigues diff --git a/DESCRIPTION b/DESCRIPTION index d29233f4..afdd4522 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: remind2 Title: The REMIND R package (2nd generation) -Version: 1.126.0 -Date: 2023-12-11 +Version: 1.127.0 +Date: 2023-12-13 Authors@R: c( person("Renato", "Rodrigues", , "renato.rodrigues@pik-potsdam.de", role = c("aut", "cre")), person("Lavinia", "Baumstark", role = "aut"), diff --git a/README.md b/README.md index 97651eba..ca6c86cc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # The REMIND R package (2nd generation) -R package **remind2**, version **1.126.0** +R package **remind2**, version **1.127.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) @@ -49,7 +49,7 @@ In case of questions / problems please contact Renato Rodrigues . +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.127.0, . A BibTeX entry for LaTeX users is @@ -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.126.0}, + note = {R package version 1.127.0}, url = {https://github.com/pik-piam/remind2}, } ```