Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'World' aggregation also for 12 region runs #32

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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},
}
```
Loading