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

fix GDP thresholds in adjustCAPEXtrackedFleet #22

Merged
merged 2 commits into from
Oct 24, 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
3 changes: 2 additions & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
ValidationKey: '1521292'
ValidationKey: '1541463'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
AcceptedNotes: 'Undefined global functions or variables:'
allowLinterWarnings: yes
enforceVersionUpdate: no
skipCoverage: no
2 changes: 1 addition & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ jobs:
shell: Rscript {0}
run: |
nonDummyTests <- setdiff(list.files("./tests/testthat/"), c("test-dummy.R", "_snaps"))
if(length(nonDummyTests) > 0) covr::codecov(quiet = FALSE)
if(length(nonDummyTests) > 0 && !lucode2:::loadBuildLibraryConfig()[["skipCoverage"]]) covr::codecov(quiet = FALSE)
env:
NOT_CRAN: "true"
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.7.6
date-released: '2024-10-21'
version: 0.7.7
date-released: '2024-10-23'
abstract: The mrtransport package contains data preprocessing for the EDGE-Transport
model.
authors:
Expand Down
4 changes: 2 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.7.6
Version: 0.7.7
Authors@R: c(
person("Johanna", "Hoppe", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0009-0004-6753-5090")),
Expand All @@ -26,4 +26,4 @@ Imports:
magrittr,
quitte,
data.table
Date: 2024-10-21
Date: 2024-10-23
7 changes: 5 additions & 2 deletions R/toolAdjustCAPEXtrackedFleet.R
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,11 @@ toolAdjustCAPEXtrackedFleet <- function(dt, ISOcountries, yrs, completeData, GDP
dt <- rbind(dt[!(is.na(value) & univocalName %in% filter$trn_pass_road_LDV_4W)], missing4W)[, check := NULL]

# 5: Lower the prices for LDW 4 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,
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Input data generation for the EDGE-Transport model

R package **mrtransport**, version **0.7.6**
R package **mrtransport**, version **0.7.7**

[![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)

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.7.6, <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.7.7, <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.7.6},
note = {R package version 0.7.7},
url = {https://github.com/pik-piam/mrtransport},
}
```
Loading