forked from pik-piam/mrcommons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
531 changed files
with
73,432 additions
and
7,982 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ carbon_stored.* | |
^\.buildlibrary$ | ||
^\.github$ | ||
^codecov\.yml$ | ||
^\.pre-commit-config\.yaml$ | ||
^workflow$ |
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,9 +1,10 @@ | ||
ValidationKey: '12547608' | ||
ValidationKey: '3062864' | ||
AcceptedWarnings: | ||
- 'Warning: package ''.*'' was built under R version' | ||
- 'Warning: namespace ''.*'' is not available and has been replaced' | ||
AcceptedNotes: | ||
- unable to verify current time | ||
- Imports includes .* non-default packages. | ||
- installed size is .* | ||
AutocreateReadme: yes | ||
allowLinterWarnings: yes |
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,12 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: check-case-conflict | ||
- id: check-json | ||
- id: check-yaml | ||
- id: check-merge-conflict | ||
- id: fix-byte-order-marker | ||
- id: end-of-file-fixer | ||
ci: | ||
autoupdate_schedule: quarterly |
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 @@ | ||
Package: mrcommons | ||
Type: Package | ||
Title: MadRat commons Input Data Library | ||
Version: 0.66.4 | ||
Date: 2021-09-27 | ||
Version: 1.6.1 | ||
Date: 2022-02-01 | ||
Authors@R: c(person("Benjamin Leon", "Bodirsky", email = "[email protected]", role = "aut"), | ||
person("Kristine", "Karstens", role = "aut"), | ||
person("Lavinia", "Baumstark", role = "aut"), | ||
|
@@ -36,17 +36,17 @@ Description: Provides useful functions and a common structure to all the input d | |
Depends: | ||
R(>= 2.10.0), | ||
magclass(>= 3.17), | ||
madrat(>= 2.2.1), | ||
madrat(>= 2.5.1), | ||
mrdrivers (>= 0.2.1), | ||
mstools | ||
Imports: | ||
bezier, | ||
countrycode, | ||
data.table, | ||
dplyr, | ||
hdf5r, | ||
GDPuc, | ||
glue, | ||
lazyeval, | ||
lifecycle, | ||
lpjclass, | ||
luscale, | ||
magpiesets(>= 0.44.2), | ||
|
@@ -61,10 +61,7 @@ Imports: | |
rlang, | ||
SPEI, | ||
stringr, | ||
tibble, | ||
tidyr, | ||
tidyselect, | ||
WDI, | ||
zoo | ||
Suggests: | ||
covr, | ||
|
@@ -83,3 +80,4 @@ LazyData: no | |
Encoding: UTF-8 | ||
RoxygenNote: 7.1.2 | ||
VignetteBuilder: knitr | ||
Roxygen: list(markdown = TRUE) |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,33 +1,28 @@ | ||
#' @title calc1stBioenergyPast | ||
#' @description | ||
#' Calculates first generation biofuels production, imports, exports for biogas, bioethanol and biodiesel from IEA database. | ||
#' The unit is Petajoule. | ||
#' @description | ||
#' Calculates first generation biofuels production, imports, exports for biogas, bioethanol and biodiesel | ||
#' from IEA database. The unit is Petajoule. | ||
#' | ||
#' @return List of magpie objects with results on country level, weight on country level, unit and description. | ||
#' @author Xiaoxi Wang, Isabelle Weindl | ||
#' @seealso | ||
#' \code{\link{setConfig}} | ||
#' @examples | ||
#' | ||
#' \dontrun{ | ||
#' \dontrun{ | ||
#' calcOutput("1stBioenergyPast") | ||
#' } | ||
#' @importFrom magclass getNames<- as.magpie | ||
#' @importFrom madrat toolGetMapping | ||
#' @export | ||
|
||
calc1stBioenergyPast <- function(){ | ||
calc1stBioenergyPast <- function() { | ||
df <- toolCalcIEAfromStructureMappingPEFE( | ||
readSource("IEA",subtype="EnergyBalances"), | ||
readSource("IEA", subtype = "EnergyBalances"), | ||
toolGetMapping(type = "sectoral", name = "structuremappingPE.csv", returnPathOnly = TRUE), | ||
subtype="magpie") | ||
#Unit conversion from ktoe to PJ | ||
df <- df[,,c("biogas","ethanol","oils","woodfuel")]*0.041868 | ||
return(list(x=df, | ||
weight=NULL, | ||
unit="PJ", | ||
description="1st generation bionegy demand") | ||
subtype = "magpie") | ||
|
||
# Unit conversion from ktoe to PJ | ||
df <- df[, , c("biogas", "ethanol", "oils", "woodfuel")] * 0.041868 | ||
|
||
return(list(x = df, | ||
weight = NULL, | ||
unit = "PJ", | ||
description = "1st generation bionegy 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
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.