Skip to content

Commit

Permalink
Merge pull request #28 from fbenke-pik/refactor
Browse files Browse the repository at this point in the history
add read function for REMIND fuel prices
  • Loading branch information
fbenke-pik authored Dec 13, 2024
2 parents 72a78dc + 8dc260d commit f86f00b
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '1805040'
ValidationKey: '2006600'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
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: 'mrtransport: Input data generation for the EDGE-Transport model'
version: 0.9.0
date-released: '2024-11-29'
version: 0.10.0
date-released: '2024-12-09'
abstract: The mrtransport package contains data preprocessing for the EDGE-Transport
model.
authors:
Expand Down
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: mrtransport
Title: Input data generation for the EDGE-Transport model
Version: 0.9.0
Version: 0.10.0
Authors@R: c(
person("Johanna", "Hoppe", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0009-0004-6753-5090")),
Expand All @@ -21,6 +21,7 @@ Depends:
Imports:
data.table,
dplyr,
gdx,
magclass,
magrittr,
quitte,
Expand All @@ -32,4 +33,4 @@ Imports:
tidyselect,
utils,
zoo
Date: 2024-11-29
Date: 2024-12-09
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export(convertUCD)
export(correctGCAM)
export(readGCAM)
export(readPSI)
export(readREMINDinputForTransportStandalone)
export(readTRACCS)
export(readUCD)
export(toolAggregateVehicleTypes)
Expand All @@ -23,6 +24,7 @@ import(mrdrivers)
importFrom(data.table,data.table)
importFrom(data.table,fread)
importFrom(data.table,merge.data.table)
importFrom(gdx,readGDX)
importFrom(madrat,calcOutput)
importFrom(madrat,getISOlist)
importFrom(madrat,readSource)
Expand Down
10 changes: 10 additions & 0 deletions R/readREMINDinputForTransportStandalone.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#' Load fuel prices from a REMIND fulldata.gdx in USD/MJ
#'
#' @importFrom gdx readGDX
#' @export
readREMINDinputForTransportStandalone <- function() {
gdxPath <- file.path("v1.2", "fulldata.gdx")
out <- readGDX(gdxPath, "pm_FEPrice", format = "first_found",
restore_zeros = FALSE)[, , "trans.ES", pmatch = TRUE]
return(out)
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Input data generation for the EDGE-Transport model

R package **mrtransport**, version **0.9.0**
R package **mrtransport**, version **0.10.0**

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

## Purpose and Functionality

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

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

Hoppe J, Muessel J, Dirnaichner A (2024). _mrtransport: Input data generation for the EDGE-Transport model_. R package version 0.9.0, <https://github.com/pik-piam/mrtransport>.
Hoppe J, Muessel J, Dirnaichner A (2024). _mrtransport: Input data generation for the EDGE-Transport model_. R package version 0.10.0, <https://github.com/pik-piam/mrtransport>.

A BibTeX entry for LaTeX users is

Expand All @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is
title = {mrtransport: Input data generation for the EDGE-Transport model},
author = {Johanna Hoppe and Jarusch Muessel and Alois Dirnaichner},
year = {2024},
note = {R package version 0.9.0},
note = {R package version 0.10.0},
url = {https://github.com/pik-piam/mrtransport},
}
```
11 changes: 11 additions & 0 deletions man/readREMINDinputForTransportStandalone.Rd

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

0 comments on commit f86f00b

Please sign in to comment.