Package 'mrtutorial'

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

Help Index


mrtutorial: 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 .

Author(s)

Maintainer: David Meng-Chuen Chen [email protected]


calcAgGDP

Description

calculates Ag GDP as % of total GDP

Usage

calcAgGDP()

Value

List of magpie object with results on country level, weight, unit and description.

Author(s)

David Chen

Examples

## Not run: 
calcOutput("AgGDP")

## End(Not run)

calcValidPopulation

Description

Returns historical development of population

Usage

calcValidPopulation(datasource = "WDI")

Arguments

datasource

Various daasource to load population data from can be specified here. So far available: WDI (default)

Author(s)

Florian Humpenoeder, Jan Philipp Dietrich, Kristine Karsens


Convert WDI

Description

Convert WDI converts data from readWDI() to ISO country level. Adds Taiwan as difference from global total.

Usage

convertTutorialWDI(x, subtype)

Arguments

x

MAgPIE object containing WDI data region resolution

subtype

Name of the worldbank indicator, e.g. "SP.POP.TOTL"

Value

MAgPIE object of the WDI data disaggregated to country level

Author(s)

Jan Phillip Dietrich, Benjamin Bodirsky, Xiaoxi Wang, David Chen

Examples

## Not run:  a <- convertWDI(x)

Dowload WDI

Description

Download WDI (World development indicators) data .rda file.

Usage

downloadTutorialWDI()

Author(s)

David Chen

See Also

downloadSource WDI

Examples

## Not run:  a <- downloadSource(type="TutorialWDI")

fullMAgPIE

Description

Function that produces the complete regional data set required for running the MAgPIE model.

Usage

fullTUTORIAL(rev = numeric_version("1"), dev = "", extra = "Example Argument")

Arguments

rev

data revision which should be used as input (numeric_version).

dev

dev flag for testing

extra

extra text to insert

Author(s)

David M Chen

See Also

readSource, getCalculations, calcOutput

Examples

## Not run: 
retrieveData("tutorial", rev = numeric_version("12"),
             mainfolder = "pathtowhereallfilesarestored")

## End(Not run)

fullTUTORIALVALIDATION

Description

Function that produces the complete validation data set used for evaluation of MAgPIE outputs

Usage

fullTUTORIALVALIDATION(rev = 0.1)

Arguments

rev

data revision which should be used as input (positive numeric).

Author(s)

Jan Philipp Dietrich, Kristine Karstens

See Also

readSource, getCalculations, calcOutput

Examples

## Not run: 
retrieveData("VALIDATION")

## End(Not run)

fullValidation

Description

Function that produces the complete validation data set used for evaluation of MAgPIE outputs

Usage

fullVALIDATION(rev = 0.1)

Arguments

rev

data revision which should be used as input (positive numeric).

Author(s)

Jan Philipp Dietrich, Kristine Karstens

See Also

readSource, getCalculations, calcOutput

Examples

## Not run: 
retrieveData("VALIDATION")

## End(Not run)

Read WDI

Description

Read-in WDI (World development indicators) data .rda file as magclass object.

Usage

readTutorialWDI(subtype = "SP.POP.TOTL")

Arguments

subtype

Type of WDI data that should be read. Please use the worldbank indicator abbreviation. Available types are e.g.:

  • SP.POP.TOTL: Population, total

  • NY.GDP.MKTP.PP.CD: GDP, PPP (current international Dollar)

  • SL.AGR.EMPL.ZS: Employment in agriculture as % of total employment

  • NV.AGR.TOTL.CD: Agricultural GDP (current international Dollar)

Value

magpie object of the WDI data

Author(s)

David Chen

See Also

readSource downloadTutorialWDI

Examples

## Not run:  a <- readSource(type="WDI",subtype="SP.POP.TOTL")

Tool: spatialHeader

Description

Given a regionmapping (mapping between ISO countries and regions) the function calculates a 0.5 degree spatial header for 0.5 degree magclass objects

Usage

spatialHeader(mapping)

Arguments

mapping

Either a path to a mapping or an already read-in mapping as data.frame.

Value

A vector with 59199 elements

Author(s)

Jan Philipp Dietrich

See Also

regionscode

Examples

## Not run: 
spatialHeader("regionmappingMAgPIE.csv")

## End(Not run)