metis.chartsProcess: metis.chartsProcess

Description Usage Arguments Details Value

View source: R/metis.chartsProcess.R

Description

This function produces charts given any number of tables in the metis format. The metis.chart() function produces charts for each region nd scenario. If there are more than one scenario then the function also produces a folder for diffplots. The input tables should be .csv files with the following columns: scenario, region, sources, param, x, xLabel, vintage, class1, class2, units, value, aggregate, classLabel1,classPalette1,classLabel2,classPalette2. Running the metis.readgcam automatically produces An empty template with these columns for the relevant parameters. Each column is defined below:

Usage

1
2
3
4
5
6
7
8
metis.chartsProcess(dataTables = NULL, rTable = NULL, scenRef = NULL,
  dirOutputs = paste(getwd(), "/outputs", sep = ""), pdfpng = "png",
  xRange = "All", xCompare = c("2015", "2030", "2050", "2100"),
  paramsSelect = "All", regionsSelect = "All", xData = "x",
  yData = "value", xLabel = "xLabel", yLabel = "units",
  aggregate = "sum", class = "class", classPalette = "pal_Basic",
  regionCompareOnly = 1, useNewLabels = 0, sizeBarLines = 0,
  sizeLines = 1.5, nameAppend = "")

Arguments

dataTables

Vector of strings with full path to datatables to be read in. Example c("D:/metis/outputs/Colombia/dataTable_Colombia_1975to2100.csv", "D:/metis/outputs/Colombia/dataTableLocal_Colombia_1975to2100.csv"). Where "dataTableLocal_Colombia_1975to2100.csv" is the new datafile created based on "dataTableTemplate_Colombia_1975to2100.csv" and contains new local data.

rTable

If a table is created directly in R as a data.frame or tibble it can entered here.

scenRef

The reference scenario to compare against. Default will pick first scenario from list f all scenarios

dirOutputs

Full path to directory for outputs. Default is paste(getwd(),"/outputs",sep="")

pdfpng

Choose the format for outputs. Either "pdf", "png" or "both. Default is "png"

xRange

Default "All". Range of x values eg. c(2001:2005)

xCompare

Choose the years to compare scenarios for xScenSelectYears plot. Default is c("2015","2030","2050","2100")

paramsSelect

Default = "All". Select the paramaters to analyze from the the tables provided. Full list of parameters: c("finalNrgbySec", "primNrgConsumByFuel", "elecByTech", "watConsumBySec", "watWithdrawBySec", "watWithdrawByCrop", "watBioPhysCons", "irrWatWithBasin","irrWatConsBasin", "gdpPerCapita", "gdp", "gdpGrowthRate", "pop", "agProdbyIrrRfd", "agProdBiomass", "agProdForest", "agProdByCrop", "landIrrRfd", "aggLandAlloc", "LUCemiss", "co2emission", "co2emissionByEndUse", "ghgEmissionByGHG", "ghgEmissByGHGGROUPS")

regionsSelect

Default = "All". Select regions to create charts for.

xData

Default "x"

yData

Default "value"

xLabel

Default "xLabel"

yLabel

Default "units"

aggregate

Default "sum"

class

Default "class"

classPalette

Default "pal_Basic" from metis.colors()$pal_Basic

regionCompareOnly

Default 0. If set to 1, will only run comparison plots and not individual

useNewLabels

Default 0

sizeBarLines

Default 0.5

sizeLines

Default 1.5

nameAppend

Default =""

Details

List of Assumptions

Value

Produces charts in output folder and also returns combined table in metis format.


zarrarkhan/srn documentation built on May 21, 2019, 4:07 a.m.