Title: | Tutorial Package For Madrat Package Library |
---|---|
Description: | Example package of mr- world libraries, in conjunction with MAgPIE MADRat tutorial. For more information please see: https://github.com/magpiemodel/tutorials/tree/master/madrat . |
Authors: | David Meng-Chuen Chen [aut, cre] |
Maintainer: | David Meng-Chuen Chen <[email protected]> |
License: | GPL-3 |
Version: | 0.2.11 |
Built: | 2024-10-08 05:33:41 UTC |
Source: | https://github.com/pik-piam/mrtutorial |
Example package of mr- world libraries, in conjunction with MAgPIE MADRat tutorial. For more information please see: https://github.com/magpiemodel/tutorials/tree/master/madrat .
Maintainer: David Meng-Chuen Chen [email protected]
calculates Ag GDP as % of total GDP
calcAgGDP()
calcAgGDP()
List of magpie object with results on country level, weight, unit and description.
David Chen
## Not run: calcOutput("AgGDP") ## End(Not run)
## Not run: calcOutput("AgGDP") ## End(Not run)
Returns historical development of population
calcValidPopulation(datasource = "WDI")
calcValidPopulation(datasource = "WDI")
datasource |
Various daasource to load population data from can be specified here. So far available: WDI (default) |
Florian Humpenoeder, Jan Philipp Dietrich, Kristine Karsens
Convert WDI converts data from readWDI() to ISO country level. Adds Taiwan as difference from global total.
convertTutorialWDI(x, subtype)
convertTutorialWDI(x, subtype)
x |
MAgPIE object containing WDI data region resolution |
subtype |
Name of the worldbank indicator, e.g. "SP.POP.TOTL" |
MAgPIE object of the WDI data disaggregated to country level
Jan Phillip Dietrich, Benjamin Bodirsky, Xiaoxi Wang, David Chen
## Not run: a <- convertWDI(x)
## Not run: a <- convertWDI(x)
Download WDI (World development indicators) data .rda file.
downloadTutorialWDI()
downloadTutorialWDI()
David Chen
## Not run: a <- downloadSource(type="TutorialWDI")
## Not run: a <- downloadSource(type="TutorialWDI")
Function that produces the complete regional data set required for running the MAgPIE model.
fullTUTORIAL(rev = numeric_version("1"), dev = "", extra = "Example Argument")
fullTUTORIAL(rev = numeric_version("1"), dev = "", extra = "Example Argument")
rev |
data revision which should be used as input (numeric_version). |
dev |
dev flag for testing |
extra |
extra text to insert |
David M Chen
readSource
, getCalculations
, calcOutput
## Not run: retrieveData("tutorial", rev = numeric_version("12"), mainfolder = "pathtowhereallfilesarestored") ## End(Not run)
## Not run: retrieveData("tutorial", rev = numeric_version("12"), mainfolder = "pathtowhereallfilesarestored") ## End(Not run)
Function that produces the complete validation data set used for evaluation of MAgPIE outputs
fullTUTORIALVALIDATION(rev = 0.1)
fullTUTORIALVALIDATION(rev = 0.1)
rev |
data revision which should be used as input (positive numeric). |
Jan Philipp Dietrich, Kristine Karstens
readSource
, getCalculations
, calcOutput
## Not run: retrieveData("VALIDATION") ## End(Not run)
## Not run: retrieveData("VALIDATION") ## End(Not run)
Function that produces the complete validation data set used for evaluation of MAgPIE outputs
fullVALIDATION(rev = 0.1)
fullVALIDATION(rev = 0.1)
rev |
data revision which should be used as input (positive numeric). |
Jan Philipp Dietrich, Kristine Karstens
readSource
, getCalculations
, calcOutput
## Not run: retrieveData("VALIDATION") ## End(Not run)
## Not run: retrieveData("VALIDATION") ## End(Not run)
Read-in WDI (World development indicators) data .rda file as magclass object.
readTutorialWDI(subtype = "SP.POP.TOTL")
readTutorialWDI(subtype = "SP.POP.TOTL")
subtype |
Type of WDI data that should be read. Please use the worldbank indicator abbreviation. Available types are e.g.:
|
magpie object of the WDI data
David Chen
readSource
downloadTutorialWDI
## Not run: a <- readSource(type="WDI",subtype="SP.POP.TOTL")
## Not run: a <- readSource(type="WDI",subtype="SP.POP.TOTL")
Given a regionmapping (mapping between ISO countries and regions) the function calculates a 0.5 degree spatial header for 0.5 degree magclass objects
spatialHeader(mapping)
spatialHeader(mapping)
mapping |
Either a path to a mapping or an already read-in mapping as data.frame. |
A vector with 59199 elements
Jan Philipp Dietrich
## Not run: spatialHeader("regionmappingMAgPIE.csv") ## End(Not run)
## Not run: spatialHeader("regionmappingMAgPIE.csv") ## End(Not run)