diff --git a/.buildlibrary b/.buildlibrary index a9b5449a..656c5437 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '841386' +ValidationKey: '8599325045' AutocreateReadme: yes AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' diff --git a/CITATION.cff b/CITATION.cff index 1062e6e8..d1fffded 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: 'mrindustry: input data generation for the REMIND industry module' -version: 0.4.2 -date-released: '2024-11-06' +version: 0.4.2.9001 +date-released: '2024-11-18' abstract: The mrindustry packages contains data preprocessing for the REMIND model. authors: - family-names: Benke diff --git a/DESCRIPTION b/DESCRIPTION index be922672..fa4162e4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: mrindustry Title: input data generation for the REMIND industry module -Version: 0.4.2 -Date: 2024-11-06 +Version: 0.4.2.9001 +Date: 2024-11-18 Authors@R: c( person(given = "Falk", family = "Benke", email = "benke@pik-potsdam.de", role = c("aut", "cre")), diff --git a/R/calcFeDemandIndustry.R b/R/calcFeDemandIndustry.R index bbfd8666..66598f83 100644 --- a/R/calcFeDemandIndustry.R +++ b/R/calcFeDemandIndustry.R @@ -1465,10 +1465,12 @@ calcFeDemandIndustry <- function(use_ODYM_RECC = FALSE, # default scenario values are calculated from the last year of empirical # data on filter('gdp_SSP2' == .data$scenario) %>% # TODO: define default scenario + select(-'scenario') %>% inner_join( industry_subsectors_specific_FE, - c("scenario", "region", "subsector") + by = c("region", "subsector"), + relationship = 'many-to-many' # rhs: many years, lhs: many scenarios ) %>% inner_join(specific_FE_limits, "subsector") %>% # allow for year-specific decreases @@ -1483,15 +1485,7 @@ calcFeDemandIndustry <- function(use_ODYM_RECC = FALSE, assert(not_na, 'fixing_year', description = 'missing fixing_year for scenario in specific_FE') %>% decrease_specific_energy_by_alpha(year = last_empirical_year) %>% - # extend to non-default scenarios - # TODO: this overrides scenario differences present in upstream - # industry_subsectors_specific_energy data. But those are faulty in any - # case, as they relate to historical data, and limited to the SDP scenarios. - # So the upstream differentiation by scenario should be removed. - expand(nesting(!!!syms(setdiff(colnames(.), 'scenario'))), - scenario = unique(industry_subsectors_specific_energy$scenario)) %>% - decrease_specific_energy_by_alpha(exclude_scenario = 'gdp_SSP2') %>% - select("scenario", "region", "year", "subsector", "specific.energy") + select("scenario", "region", "year", "subsector", "specific.energy") ### converge subsector en shares to global value ---- # calculate global shares, weighted by subsector activity diff --git a/README.md b/README.md index 98b8531b..eb980311 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # input data generation for the REMIND industry module -R package **mrindustry**, version **0.4.2** +R package **mrindustry**, version **0.4.2.9001** -[![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) +[![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) ## Purpose and Functionality @@ -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.4.2, . +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.4.2.9001, . 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.4.2}, + note = {R package version 0.4.2.9001}, url = {https://github.com/pik-piam/mrindustry}, } ```