Skip to content

Commit

Permalink
Merge pull request #32 from ahagen-pik/updateCompScenTransport
Browse files Browse the repository at this point in the history
Add 'World' aggregation also for 12 region runs
  • Loading branch information
ahagen-pik authored Dec 5, 2024
2 parents 0cb343e + 99ec210 commit dcb8d29
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '1282240'
ValidationKey: '1303965'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exclude: '^tests/testthat/_snaps/.*$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: check-case-conflict
- id: check-json
Expand All @@ -15,7 +15,7 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/lorenzwalthert/precommit
rev: bae853d82da476eee0e0a57960ee6b741a3b3fb7 # frozen: v0.4.3
rev: 3b70240796cdccbe1474b0176560281aaded97e6 # frozen: v0.4.3.9003
hooks:
- id: parsable-R
- id: deps-in-desc
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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: 'reporttransport: Reporting package for edgeTransport'
version: 0.6.4
date-released: '2024-11-08'
version: 0.6.5
date-released: '2024-12-04'
abstract: This package contains edgeTransport-specific routines to report model results.
The main functionality is to generate transport reporting variables in MIF format
from a given edgeTransport model run folder or REMIND input data.
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: reporttransport
Title: Reporting package for edgeTransport
Version: 0.6.4
Date: 2024-11-08
Version: 0.6.5
Date: 2024-12-04
Authors@R:
person("Johanna", "Hoppe", , "[email protected]", role = c("aut", "cre"))
Description: This package contains edgeTransport-specific routines to
Expand Down
14 changes: 13 additions & 1 deletion R/convertToMIF.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ convertToMIF <- function(vars, GDPMER, helpers, scenario, model, gdx, isTranspo
"EU27" = c("ENC", "EWN", "ECS", "ESC", "ECE", "FRA", "DEU", "ESW")
))
}

# Create Mapping for region Aggregation out of region SubsetList
namesReg <- names(regionSubsetList)
regSubsetMap <- data.table()
Expand Down Expand Up @@ -138,7 +139,18 @@ convertToMIF <- function(vars, GDPMER, helpers, scenario, model, gdx, isTranspo
varsToMIFext <- rbind(varsToMIFext,
rbindlist(regSubsetDataExt[!names(regSubsetDataExt) %in% c("GDPppp", "population", "GDPMER")], fill = TRUE, use.names = TRUE),
rbindlist(worldDataExt[!names(worldDataExt) %in% c("GDPppp", "population", "GDPMER")], fill = TRUE, use.names = TRUE))
}
} else {
noAggregationvars <- rbind(noAggregationvars,
rbindlist(worldDataInt[c("GDPpcPPP", "GDPpcMER")], fill = TRUE, use.names = TRUE),
rbindlist(vars$ext[c("GDPppp", "population", "GDPMER")], fill = TRUE, use.names = TRUE),
rbindlist(worldDataExt[c("GDPppp", "population", "GDPMER")], fill = TRUE, use.names = TRUE))

varsToMIFint <- rbind(varsToMIFint,
rbindlist(worldDataInt[!names(worldDataInt) %in% c("GDPpcPPP", "GDPpcMER")], fill = TRUE, use.names = TRUE))

varsToMIFext <- rbind(varsToMIFext,
rbindlist(worldDataExt[!names(worldDataExt) %in% c("GDPppp", "population", "GDPMER")], fill = TRUE, use.names = TRUE))
} # close additional regions

# Apply variable naming convention----------------------------------------------------------
varsToMIFext <- applyReportingNames(varsToMIFext, helpers$reportingNames)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Reporting package for edgeTransport

R package **reporttransport**, version **0.6.4**
R package **reporttransport**, version **0.6.5**

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

## Purpose and Functionality

Expand Down Expand Up @@ -41,7 +41,7 @@ In case of questions / problems please contact Johanna Hoppe <johanna.hoppe@pik-

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

Hoppe J (2024). _reporttransport: Reporting package for edgeTransport_. R package version 0.6.4, <https://github.com/pik-piam/reporttransport>.
Hoppe J (2024). _reporttransport: Reporting package for edgeTransport_. R package version 0.6.5, <https://github.com/pik-piam/reporttransport>.

A BibTeX entry for LaTeX users is

Expand All @@ -50,7 +50,7 @@ A BibTeX entry for LaTeX users is
title = {reporttransport: Reporting package for edgeTransport},
author = {Johanna Hoppe},
year = {2024},
note = {R package version 0.6.4},
note = {R package version 0.6.5},
url = {https://github.com/pik-piam/reporttransport},
}
```

0 comments on commit dcb8d29

Please sign in to comment.