diff --git a/.buildlibrary b/.buildlibrary index e1727e8..661c532 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '1805040' +ValidationKey: '2006600' AutocreateReadme: yes AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' diff --git a/CITATION.cff b/CITATION.cff index 8bd5b26..deb4875 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: '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: diff --git a/DESCRIPTION b/DESCRIPTION index a9da1af..f696eab 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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", , "johanna.hoppe@pik-potsdam.de", role = c("aut", "cre"), comment = c(ORCID = "0009-0004-6753-5090")), @@ -21,6 +21,7 @@ Depends: Imports: data.table, dplyr, + gdx, magclass, magrittr, quitte, @@ -32,4 +33,4 @@ Imports: tidyselect, utils, zoo -Date: 2024-11-29 +Date: 2024-12-09 diff --git a/NAMESPACE b/NAMESPACE index 59ebc1d..b0ff1d8 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -6,6 +6,7 @@ export(convertUCD) export(correctGCAM) export(readGCAM) export(readPSI) +export(readREMINDinputForTransportStandalone) export(readTRACCS) export(readUCD) export(toolAggregateVehicleTypes) @@ -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) diff --git a/R/readREMINDinputForTransportStandalone.R b/R/readREMINDinputForTransportStandalone.R new file mode 100644 index 0000000..6227404 --- /dev/null +++ b/R/readREMINDinputForTransportStandalone.R @@ -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) +} diff --git a/README.md b/README.md index 8bad5de..8e6d07e 100644 --- a/README.md +++ b/README.md @@ -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 @@ -39,7 +39,7 @@ In case of questions / problems please contact Johanna Hoppe . +Hoppe J, Muessel J, Dirnaichner A (2024). _mrtransport: Input data generation for the EDGE-Transport model_. R package version 0.10.0, . A BibTeX entry for LaTeX users is @@ -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}, } ``` diff --git a/man/readREMINDinputForTransportStandalone.Rd b/man/readREMINDinputForTransportStandalone.Rd new file mode 100644 index 0000000..f919fa7 --- /dev/null +++ b/man/readREMINDinputForTransportStandalone.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/readREMINDinputForTransportStandalone.R +\name{readREMINDinputForTransportStandalone} +\alias{readREMINDinputForTransportStandalone} +\title{Load fuel prices from a REMIND fulldata.gdx in USD/MJ} +\usage{ +readREMINDinputForTransportStandalone() +} +\description{ +Load fuel prices from a REMIND fulldata.gdx in USD/MJ +}