Skip to content

Commit

Permalink
Residential and commercial floor space.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinhasse committed Jan 25, 2023
1 parent b35ef8e commit 586041b
Show file tree
Hide file tree
Showing 7 changed files with 45 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: '29691692'
ValidationKey: '29712606'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
Expand Down
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "mrremind: MadRat REMIND Input Data Package",
"version": "0.153.2",
"version": "0.153.3",
"description": "<p>The mrremind packages contains data preprocessing for the\n REMIND model.<\/p>",
"creators": [
{
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: mrremind
Title: MadRat REMIND Input Data Package
Version: 0.153.2
Date: 2023-01-24
Version: 0.153.3
Date: 2023-01-25
Authors@R: c(
person("Lavinia", "Baumstark", , "[email protected]", role = c("aut", "cre")),
person("Renato", "Rodrigues", role = "aut"),
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,19 @@ test: ## Run testthat tests
Rscript -e 'devtools::test(show_report = TRUE)'

lint: ## Check if code etiquette is followed using lucode2::lint()
## Only checks files you changed.
Rscript -e 'lucode2::lint()'

lint-all: ## Check if code etiquette is followed using lucode2::lint()
## Checks all files.
Rscript -e 'lucode2::lint(".")'

format: ## Apply auto-formatting to changed files and lint afterwards
Rscript -e 'lucode2::autoFormat()'

format-all: ## Apply auto-formatting to all files and lint afterwards
Rscript -e 'lucode2::autoFormat(files=list.files("./R", full.names = TRUE, pattern = "\\.R"))'

install: ## Install the package locally via devtools::install()
Rscript -e 'devtools::install(upgrade = "never")'

Expand Down
19 changes: 13 additions & 6 deletions R/calcFloorspace.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@

#' Floor space in buildings
#'
#' Residential, commercial and total floor space fro EDGE-B
#' @importFrom madrat readSource
#' @author Antoine Levesque, Robin Hasse
#' @return MAgPIE object with buildings floor space
calcFloorspace <- function() {

data <- readSource("EDGE", subtype = "Floorspace")
data <- collapseNames(data[,,"buildings"])

return(list(x=data,weight=NULL, unit = "million m2", description = "Buildings floorspace"))

data <- readSource("EDGE", subtype = "Floorspace")

return(list(x = data,
weight = NULL,
unit = "million m2",
description = "Buildings floor space"))
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MadRat REMIND Input Data Package

R package **mrremind**, version **0.153.2**
R package **mrremind**, version **0.153.3**

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

Expand Down Expand Up @@ -39,7 +39,7 @@ In case of questions / problems please contact Lavinia Baumstark <lavinia@pik-po

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

Baumstark L, Rodrigues R, Levesque A, Oeser J, Bertram C, Mouratiadou I, Malik A, Schreyer F, Soergel B, Rottoli M, Mishra A, Dirnaichner A, Pehl M, Giannousakis A, Klein D, Strefler J, Feldhaus L, Brecha R, Rauner S, Dietrich J, Bi S, Benke F, Weigmann P, Richters O, Hasse R (2023). _mrremind: MadRat REMIND Input Data Package_. R package version 0.153.2, <https://github.com/pik-piam/mrremind>.
Baumstark L, Rodrigues R, Levesque A, Oeser J, Bertram C, Mouratiadou I, Malik A, Schreyer F, Soergel B, Rottoli M, Mishra A, Dirnaichner A, Pehl M, Giannousakis A, Klein D, Strefler J, Feldhaus L, Brecha R, Rauner S, Dietrich J, Bi S, Benke F, Weigmann P, Richters O, Hasse R (2023). _mrremind: MadRat REMIND Input Data Package_. R package version 0.153.3, <https://github.com/pik-piam/mrremind>.

A BibTeX entry for LaTeX users is

Expand All @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is
title = {mrremind: MadRat REMIND Input Data Package},
author = {Lavinia Baumstark and Renato Rodrigues and Antoine Levesque and Julian Oeser and Christoph Bertram and Ioanna Mouratiadou and Aman Malik and Felix Schreyer and Bjoern Soergel and Marianna Rottoli and Abhijeet Mishra and Alois Dirnaichner and Michaja Pehl and Anastasis Giannousakis and David Klein and Jessica Strefler and Lukas Feldhaus and Regina Brecha and Sebastian Rauner and Jan Philipp Dietrich and Stephen Bi and Falk Benke and Pascal Weigmann and Oliver Richters and Robin Hasse},
year = {2023},
note = {R package version 0.153.2},
note = {R package version 0.153.3},
url = {https://github.com/pik-piam/mrremind},
}
```
17 changes: 17 additions & 0 deletions man/calcFloorspace.Rd

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

0 comments on commit 586041b

Please sign in to comment.