diff --git a/.buildlibrary b/.buildlibrary index 8b6d2e9..ae6e3c8 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '1541463' +ValidationKey: '1561560' AutocreateReadme: yes AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' diff --git a/CITATION.cff b/CITATION.cff index 17994ac..b4961ad 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.7.7 -date-released: '2024-10-23' +version: 0.7.8 +date-released: '2024-10-24' abstract: The mrtransport package contains data preprocessing for the EDGE-Transport model. authors: diff --git a/DESCRIPTION b/DESCRIPTION index 8df55fa..689a594 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: mrtransport Title: Input data generation for the EDGE-Transport model -Version: 0.7.7 +Version: 0.7.8 Authors@R: c( person("Johanna", "Hoppe", , "johanna.hoppe@pik-potsdam.de", role = c("aut", "cre"), comment = c(ORCID = "0009-0004-6753-5090")), @@ -26,4 +26,4 @@ Imports: magrittr, quitte, data.table -Date: 2024-10-23 +Date: 2024-10-24 diff --git a/R/calcEdgeTransportSAinputs.R b/R/calcEdgeTransportSAinputs.R index 7b95cea..e285c40 100644 --- a/R/calcEdgeTransportSAinputs.R +++ b/R/calcEdgeTransportSAinputs.R @@ -385,7 +385,7 @@ calcEdgeTransportSAinputs <- function(subtype, SSPscen = "SSP2EU", IEAharm = TRU # PSI CAPEX for 4 Wheelers feature only purchase costs - take other capital costs from UCD for EUR regions CAPEXraw <- rbind(PSIpurchaseCosts, CAPEXUCD4W, CAPEXcombinedUCD, data$operatingSubsidyUCD) - GDPpcMERmag <- calcOutput("GDPpc", aggregate = FALSE) |> time_interpolate(highResYears) + GDPpcMERmag <- calcOutput("GDPpc", aggregate = FALSE, unit = "constant 2017 US$MER") |> time_interpolate(highResYears) GDPpcMERmag <- GDPpcMERmag[, , paste0("gdppc_", SSPscen)] GDPpcMER <- magpie2dt(GDPpcMERmag, yearcol = "period", regioncol = "region", valcol = "gdppc")[, variable := NULL] @@ -532,7 +532,7 @@ calcEdgeTransportSAinputs <- function(subtype, SSPscen = "SSP2EU", IEAharm = TRU # merge.data.table data CAPEXraw <- rbind(CAPEXUCD, data$CAPEXcombinedUCD, data$operatingSubsidyUCD) - GDPpcMERmag <- calcOutput("GDPpc", aggregate = FALSE) |> time_interpolate(lowResYears) + GDPpcMERmag <- calcOutput("GDPpc", aggregate = FALSE, unit = "constant 2017 US$MER") |> time_interpolate(lowResYears) GDPpcMERmag <- GDPpcMERmag[, , paste0("gdppc_", SSPscen)] GDPpcMER <- magpie2dt(GDPpcMERmag, yearcol = "period", regioncol = "region", valcol = "gdppc")[, variable := NULL] diff --git a/R/toolAdjustCAPEXother.R b/R/toolAdjustCAPEXother.R index 741df3a..60357c5 100644 --- a/R/toolAdjustCAPEXother.R +++ b/R/toolAdjustCAPEXother.R @@ -111,8 +111,10 @@ toolAdjustCAPEXother <- function(dt, ISOcountries, yrs, completeData, GDPpcMER, dt[, check := NULL] #5: Lower the prices for LDW 2 Wheelers depending on the GDP to represent a 2nd hand vehicle market - minGDP <- 4000 ## minimum GDPcap after which the linear trend starts - maxGDP <- 30000 ## maximum GDPcap marking the level where no factor is implemented + convfact <- convertSingle(x = 1, iso3c = "USA", unit_in = "constant 2005 Int$PPP", + unit_out = mrdrivers::toolGetUnitDollar()) + minGDP <- 4000 * convfact ## minimum GDPcap after which the linear trend starts + maxGDP <- 30000 * convfact ## maximum GDPcap marking the level where no factor is implemented lowerBound <- 0.3 ## maximum decrease to be applied to the original costs value GDPpcMER[, factor := ifelse(gdppc < maxGDP & gdppc > minGDP, (1 - lowerBound) / diff --git a/README.md b/README.md index bd30529..47ab584 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Input data generation for the EDGE-Transport model -R package **mrtransport**, version **0.7.7** +R package **mrtransport**, version **0.7.8** [![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) @@ -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.7.8, . 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.7.7}, + note = {R package version 0.7.8}, url = {https://github.com/pik-piam/mrtransport}, } ```