-
Notifications
You must be signed in to change notification settings - Fork 45
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
Residential and commercial floor space. #352
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.167.4 | ||
Date: 2023-08-14 | ||
Version: 0.168.0 | ||
Date: 2023-08-18 | ||
Authors@R: c( | ||
person("Lavinia", "Baumstark", , "[email protected]", role = c("aut", "cre")), | ||
person("Renato", "Rodrigues", role = "aut"), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
#' Floor space in buildings | ||
#' | ||
#' Residential, commercial and total floor space from EDGE-B. Set | ||
#' | ||
#' @author Antoine Levesque, Robin Hasse | ||
#' | ||
#' @param onlyTotal boolean, only give total instead of sub-sectoral floor space | ||
#' @return MAgPIE object with buildings floor space | ||
#' | ||
#' @importFrom madrat readSource | ||
#' @importFrom magclass collapseNames | ||
#' @export | ||
#' | ||
calcFloorspace <- function(onlyTotal = FALSE) { | ||
|
||
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") | ||
|
||
if (onlyTotal) { | ||
data <- collapseNames(data[, , "buildings"]) | ||
} | ||
|
||
return(list(x = data, | ||
weight = NULL, | ||
unit = "million m2", | ||
description = "Buildings floor space")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Barging in here without being asked: this has the (undesired) side effect of cutting all REMIND versions without remindmodel/remind#1197 off from new input data.
All project branches (SDP, Tokyo stuff, I don't know) that for whatever reason don't merge the REMIND changes will not be able to produce new input data, even if they need some because they did change something on their end.
I don't know which project needs new input data, and the REMIND changes are quite isolated and can easily be cherry-picked (I think), but it would be to put this behind a
subtype
parameter to allow them to toggle this.If
fullREMIND()
would produce two files from this data, one with and one without the collapsed dimension, projects could go on using input data without intervention.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the point and adding this is no effort. On the other hand, using newer input data will be impossible in many occasions. We just broke this option with the introduction of a new scenario that is now part of the input data and will give you a Domain violation Error with any REMIND version that is more than one week old.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, wasn't aware of that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So after some discussion some time ago also with @LaviniaBaumstark, I decided to create a new file
f36_floorspace.cs4r
with the sub-sectoral floor space and keep the oldp36_floorspace.cs4r
for a while. Once input data eith the new file is available, I will adapt REMIND and remind 2 to make use of it. This PR can be merged with no side-effects and compatibility issues expected.