data4plot: Prepare data for plot lollipop, ts, mosaic, RVP.

Description Usage Arguments Value

Description

data4plot regroups several functions, in order: f_keepSize, f_keepSource, f_keepRegion, f_keepSupplies, f_rkRegion, f_rkSupplies, f_topSupplies, f_keepDateYear, f_summariseIFnum, f_summarise4lollipop, f_summarise4ts, f_summarise4mosaic, f_summarise4RVP. data4plot is used in: data4plot_RVP data4plot_Lollipop data4plot_Mosaic data4plot_ts

Usage

1
2
3
data4plot(data, keepSize, keepSource, RRL, RRV, RSL, SPL, SPV, SSL,
  yearRef, rankBy, topN, ditch, showFY, lollipop_measure, ts_measure,
  mosaic_measure, RVP_facetY)

Arguments

data

a dataframe.

keepSize

a boolean.

keepSource

a boolean.

RRL

a string, reportRegionLevel.

RRV

a string, ReportRegionValue.

RSL

a string, RegionSplitLevel.

SPL

a string, SuppliesPlotLevel.

SPV

a string, SuppliesPlotValue.

SSL

a string, SppliesSplitLevel.

yearRef

an Integer representing the reference year.

rankBy

a string representing the measure on which the Region are ranked, "Rev" or "Vol".

topN

An integer representing the number of items to display, the others will be grouped together.

ditch

a string, a column name.

showFY

a string vector, such as "All" or c("2017", "2018").

lollipop_measure

a string, such as "Rev" or "Liters". NULL if the plot isn't a lollipop.

ts_measure

a string, such as "Rev_sm" or "Liters_sm". NULL if not a ts plot.

mosaic_measure

a string, such as "Rev" or "Liters". NULL if the plot isn't a mosaic.

RVP_facetY

a string, such as "RegionSplit", "source". NULL is the plot isn't an RVP.

Value

a dataframe expected by one of the plot functions.


FabienNicol/suppliesdash documentation built on May 6, 2019, 7:04 p.m.