Skip to content

Commit

Permalink
Merge pull request #9 from fbenke-pik/main
Browse files Browse the repository at this point in the history
add gdp_SSP2_highDemEU to calcFEdemand
  • Loading branch information
fbenke-pik authored Nov 22, 2024
2 parents 2169899 + f8fe70c commit 2bf253b
Show file tree
Hide file tree
Showing 7 changed files with 18 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: '1002450'
ValidationKey: '1202940'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
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: '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:
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: 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",
Expand Down
12 changes: 10 additions & 2 deletions R/calcFeDemandIndustry.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
) %>%
Expand Down Expand Up @@ -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")
Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion R/industry_subsectors_specific.R
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -39,7 +39,7 @@ In case of questions / problems please contact Falk Benke <benke@pik-potsdam.de>

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, <https://github.com/pik-piam/mrindustry>.
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, <https://github.com/pik-piam/mrindustry>.

A BibTeX entry for LaTeX users is

Expand All @@ -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},
}
```
2 changes: 1 addition & 1 deletion man/industry_subsector_specific.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2bf253b

Please sign in to comment.