Skip to content

Commit

Permalink
Merge pull request #70 from whitehacker/main
Browse files Browse the repository at this point in the history
Adjusted the where value in toolGetMapping()
  • Loading branch information
whitehacker authored Jul 13, 2023
2 parents d45b792 + 051e173 commit 334373c
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '2341080'
ValidationKey: '2365671'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/lorenzwalthert/precommit
rev: v0.3.2.9007
rev: v0.3.2.9013
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: 'mrdrivers: Create GDP and Population Scenarios'
version: 1.2.0
date-released: '2023-06-01'
version: 1.2.1
date-released: '2023-07-13'
abstract: Create GDP and population scenarios This package constructs the GDP and
population scenarios used as drivers in both the REMIND and MAgPIE models.
authors:
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: mrdrivers
Type: Package
Title: Create GDP and Population Scenarios
Version: 1.2.0
Version: 1.2.1
Authors@R: c(person(given = "Johannes",
family = "Koch",
email = "[email protected]",
Expand Down Expand Up @@ -49,6 +49,6 @@ Suggests:
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Date: 2023-06-01
Date: 2023-07-13
Config/testthat/edition: 3
VignetteBuilder: knitr
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ HELP_PARSING = 'm <- readLines("Makefile");\
help: ## Show this help.
@Rscript -e $(HELP_PARSING)

build: ## Build the package using lucode2::buildLibrary().
Rscript -e 'lucode2::buildLibrary()'
build: ## Build the package using lucode2::buildLibrary(). You can pass the
## updateType with 'make build u=3'
Rscript -e 'lucode2::buildLibrary(updateType = "$(u)")'

check: ## Build documentation and vignettes, run testthat tests,
## and check if code etiquette is followed using lucode2::check().
Expand Down
2 changes: 1 addition & 1 deletion R/calcUrbanFuture.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ mapSHAPEurban <- function(ssp, sdp, sspUrb) {
if (grepl("|", ssp, fixed = TRUE)) {
# distinguish between OECD and non-OECD
ssp <- strsplit(ssp, split = "\\|")[[1]]
oecdMapping <- toolGetMapping("regionmappingOECD.csv", type = "regional")
oecdMapping <- toolGetMapping("regionmappingOECD.csv", type = "regional", where = "mappingfolder")
oecd <- oecdMapping[oecdMapping$RegionCode == "OECD", "CountryCode"]
nonOECD <- oecdMapping[oecdMapping$RegionCode == "Non-OECD", "CountryCode"]
mbind(setNames(sspUrb[oecd, , ssp[1]], sdp),
Expand Down
2 changes: 1 addition & 1 deletion R/toolGetEUcountries.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# These countries are the ones (essentiall the EU-27) that receive special treatment
# in the SSP2EU scenario.
toolGetEUcountries <- function(onlyWithARIADNEgdpData = FALSE) {
x <- toolGetMapping("regionmappingH12.csv") %>%
x <- toolGetMapping("regionmappingH12.csv", where = "mappingfolder") %>%
tibble::as_tibble() %>%
dplyr::filter(.data$RegionCode == "EUR", .data$CountryCode != "GBR") %>%
dplyr::pull(.data$CountryCode)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Create GDP and Population Scenarios

R package **mrdrivers**, version **1.2.0**
R package **mrdrivers**, version **1.2.1**

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

Expand Down Expand Up @@ -103,7 +103,7 @@ In case of questions / problems please contact Johannes Koch <jokoch@pik-potsdam

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

Koch J, Soergel B, Leip D, Benke F, Dietrich J (2023). _mrdrivers: Create GDP and Population Scenarios_. R package version 1.2.0, <https://pik-piam.github.io/mrdrivershttps://github.com/pik-piam/mrdrivers>.
Koch J, Soergel B, Leip D, Benke F, Dietrich J (2023). _mrdrivers: Create GDP and Population Scenarios_. R package version 1.2.1, <URL: https://pik-piam.github.io/mrdrivershttps://github.com/pik-piam/mrdrivers>.

A BibTeX entry for LaTeX users is

Expand All @@ -112,7 +112,7 @@ A BibTeX entry for LaTeX users is
title = {mrdrivers: Create GDP and Population Scenarios},
author = {Johannes Koch and Bjoern Soergel and Deborra Leip and Falk Benke and Jan Philipp Dietrich},
year = {2023},
note = {R package version 1.2.0},
note = {R package version 1.2.1},
url = {https://pik-piam.github.io/mrdrivers},
url = {https://github.com/pik-piam/mrdrivers},
}
Expand Down

0 comments on commit 334373c

Please sign in to comment.