-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from robinhasse/fixedgeInput
Bugfix: End use share calculation
- Loading branch information
Showing
19 changed files
with
124 additions
and
180 deletions.
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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#' Calculate end use shares from WEO 2015 | ||
#' | ||
#' Table 10.2 in the WEO 2015 report lists the chare of regional enduses in the | ||
#' global final energy demand. Here, we calculate the share of enduses in the | ||
#' final energ demand for buildings in each region. | ||
#' | ||
#' @author Robin Hasse | ||
#' | ||
#' @importFrom madrat readSource | ||
#' @importFrom magclass dimSums | ||
#' @export | ||
|
||
calcShareWEO <- function() { | ||
weo <- readSource("WEO", subtype = "Buildings", convert = FALSE) | ||
shares <- weo / dimSums(weo) | ||
|
||
return(list(x = shares, | ||
min = 0, | ||
max = 1, | ||
unit = "1", | ||
isocountries = FALSE, | ||
description = "regional end use shares in buildings final energy demand")) | ||
} |
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
Oops, something went wrong.