diff --git a/.buildlibrary b/.buildlibrary index bbf52269..99a3ec4a 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '1002450' +ValidationKey: '1202940' AutocreateReadme: yes AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' diff --git a/CITATION.cff b/CITATION.cff index 34799ebf..9bffcd3a 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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: 'mrindustry: input data generation for the REMIND industry module' -version: 0.5.0 +version: 0.6.0 date-released: '2024-11-22' abstract: The mrindustry packages contains data preprocessing for the REMIND model. authors: diff --git a/DESCRIPTION b/DESCRIPTION index 8faf0ac7..75506813 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: mrindustry Title: input data generation for the REMIND industry module -Version: 0.5.0 +Version: 0.6.0 Date: 2024-11-22 Authors@R: c( person(given = "Falk", family = "Benke", email = "benke@pik-potsdam.de", diff --git a/R/calcFeDemandIndustry.R b/R/calcFeDemandIndustry.R index c90572d1..773ab70b 100644 --- a/R/calcFeDemandIndustry.R +++ b/R/calcFeDemandIndustry.R @@ -527,7 +527,7 @@ calcFeDemandIndustry <- function(use_ODYM_RECC = FALSE, industry_subsectors_material_relative <- calcOutput( type = "industry_subsectors_specific", subtype = "material_relative", scenarios = c(getNames(x = industry_subsectors_ue, dim = 1), - "gdp_SSP2_lowEn"), + "gdp_SSP2_lowEn", "gdp_SSP2_highDemDEU"), regions = unique(region_mapping_21$region), aggregate = FALSE ) %>% @@ -678,6 +678,7 @@ calcFeDemandIndustry <- function(use_ODYM_RECC = FALSE, foo %>% filter("gdp_SSP2EU" == .data$scenario) %>% mutate(scenario = "gdp_SSP2_lowEn") + ), c("scenario", "subsector", "iso3c", "year") @@ -703,7 +704,14 @@ calcFeDemandIndustry <- function(use_ODYM_RECC = FALSE, relationship = "many-to-many" ) %>% left_join( - foo %>% + bind_rows( + foo, + + foo %>% + filter("gdp_SSP2" == .data$scenario) %>% + mutate(scenario = "gdp_SSP2_highDemDEU") + + ) %>% select("scenario", "subsector", "iso3c", "year", "GDP", "value"), c("scenario", "subsector", "iso3c", "year") diff --git a/R/industry_subsectors_specific.R b/R/industry_subsectors_specific.R index 3642048f..e75a862f 100644 --- a/R/industry_subsectors_specific.R +++ b/R/industry_subsectors_specific.R @@ -37,7 +37,7 @@ #' - `scen1,regi1,cement,4` will lastly overwrite the value for the `scen1`, #' `regi1` combination #' -#' Replacements occure in this fixed order (`NA`/`NA`, `scenario`/`NA`, +#' Replacements occur in this fixed order (`NA`/`NA`, `scenario`/`NA`, #' `NA`/`region`, `scenario`/`region`). #' #' Lastly, output is filtered for `scenarios` and `regions`. diff --git a/README.md b/README.md index d4819beb..8eee8220 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # input data generation for the REMIND industry module -R package **mrindustry**, version **0.5.0** +R package **mrindustry**, version **0.6.0** [![CRAN status](https://www.r-pkg.org/badges/version/mrindustry)](https://cran.r-project.org/package=mrindustry) [![R build status](https://github.com/pik-piam/mrindustry/workflows/check/badge.svg)](https://github.com/pik-piam/mrindustry/actions) [![codecov](https://codecov.io/gh/pik-piam/mrindustry/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrindustry) [![r-universe](https://pik-piam.r-universe.dev/badges/mrindustry)](https://pik-piam.r-universe.dev/builds) @@ -39,7 +39,7 @@ In case of questions / problems please contact Falk Benke To cite package **mrindustry** in publications use: -Benke F, Dürrwächter J, Rodrigues R, Moreno-Leiva S, Baumstark L, Pehl M (2024). _mrindustry: input data generation for the REMIND industry module_. R package version 0.5.0, . +Benke F, Dürrwächter J, Rodrigues R, Moreno-Leiva S, Baumstark L, Pehl M (2024). _mrindustry: input data generation for the REMIND industry module_. R package version 0.6.0, . A BibTeX entry for LaTeX users is @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is title = {mrindustry: input data generation for the REMIND industry module}, author = {Falk Benke and Jakob Dürrwächter and Renato Rodrigues and Simón Moreno-Leiva and Lavinia Baumstark and Michaja Pehl}, year = {2024}, - note = {R package version 0.5.0}, + note = {R package version 0.6.0}, url = {https://github.com/pik-piam/mrindustry}, } ``` diff --git a/man/industry_subsector_specific.Rd b/man/industry_subsector_specific.Rd index d9b499d9..8271f985 100644 --- a/man/industry_subsector_specific.Rd +++ b/man/industry_subsector_specific.Rd @@ -59,7 +59,7 @@ So \code{regi1} combination } -Replacements occure in this fixed order (\code{NA}/\code{NA}, \code{scenario}/\code{NA}, +Replacements occur in this fixed order (\code{NA}/\code{NA}, \code{scenario}/\code{NA}, \code{NA}/\code{region}, \code{scenario}/\code{region}). Lastly, output is filtered for \code{scenarios} and \code{regions}.