% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/VizScorecard.R
\name{VizScorecard}
\alias{VizScorecard}
\title{Scorecards function create simple scorecards}
\usage{
VizScorecard(
  data,
  row.dim = "region",
  subrow.dim = "time",
  col.dim = "metric",
  subcol.dim = "sdate",
  legend.dim = "metric",
  row.names = NULL,
  subrow.names = NULL,
  col.names = NULL,
  subcol.names = NULL,
  row.title = "",
  subrow.title = "",
  col.title = "",
  table.title = "",
  table.subtitle = "",
  legend.breaks = NULL,
  plot.legend = TRUE,
  label.scale = 1.4,
  legend.width = NULL,
  legend.height = 50,
  palette = NULL,
  colorunder = NULL,
  colorsup = NULL,
  round.decimal = 2,
  font.size = 1.1,
  legend.white.space = 6,
  col1.width = NULL,
  col2.width = NULL,
  fileout = "./scorecard.png"
)
}
\arguments{
\item{data}{A multidimensional array containing spatially aggregated metrics 
data with dimensions: metric, region, sdate and ftime.}

\item{row.dim}{A character string indicating the dimension name to show in the 
rows of the plot.}

\item{subrow.dim}{A character string indicating the dimension name to show in 
the sub-rows of the plot.}

\item{col.dim}{A character string indicating the dimension name to show in the 
columns of the plot.}

\item{subcol.dim}{A character string indicating the dimension name to show in
the sub-columns of the plot.}

\item{legend.dim}{A character string indicating the dimension name to use for 
the legend.}

\item{row.names}{A vector of character strings with row display names.}

\item{subrow.names}{A vector of character strings with sub-row display names.}

\item{col.names}{A vector of character strings with column display names.}

\item{subcol.names}{A vector of character strings with sub-column display 
names.}

\item{row.title}{A character string for the title of the row names.}

\item{subrow.title}{A character string for the title of the sub-row names.}

\item{table.title}{A character string for the title of the plot.}

\item{table.subtitle}{A character string for the sub-title of the plot.}

\item{legend.breaks}{A vector of numerics or a list of vectors of numerics,
containing the breaks for the legends. If a vector is given as input, then 
these breaks will be repeated for each 'legend.dim'. A list of vectors can 
be given as input if the 'legend.dims' require different breaks. This  
parameter is required even if the legend is not plotted, to define the 
colors in the scorecard table.}

\item{plot.legend}{A logical value to determine if the legend is plotted.}

\item{legend.width}{A numeric value to define the width of the legend bars.}

\item{legend.height}{A numeric value to define the height of the legend bars.}

\item{palette}{A vector of character strings or a list of vectors of 
character strings containing the colors to use in the legends. If a vector 
is given as input, then these colors will be used for each legend.dim. A 
list of vectors can be given as input if different colors are desired for 
the legend.dims. This parameter must be included even if the the legend is 
not plotted, to define the colors in the scorecard table.}

\item{colorunder}{A character string or of vector of character strings 
defining the colors to use for data values with are inferior to the lowest 
breaks value. This parameter will also plot a inferior triangle in the 
legend bar. The parameter can be set to NULL if there are no inferior values.
If a character string is given this color will be applied to all 
'legend.dims'.}

\item{colorsup}{A character string or of vector of character strings 
defining the colors to use for data values with are superior to the highest 
breaks value. This parameter will also plot a inferior triangle in the 
legend bar. The parameter can be set to NULL if there are no superior values.
If a character string is given this color will be applied to all legend.dims.}

\item{round.decimal}{A numeric indicating to which decimal point the data 
is to be displayed in the scorecard table.}

\item{font.size}{A numeric indicating the font size on the scorecard table.}

\item{fileout}{A path of the location to save the scorecard plots.}
}
\value{
An image file containing the scorecard.
}
\description{
This function creates a scorecard for a single system and 
reference combination, showing data by region and forecast month. 

Note: Module PhantomJS is required.
}
\examples{
data <- array(rnorm(1000), dim = c('sdate' = 12, 'metric' = 4, 'region' = 3, 
                                  'time' = 6)) 
row.names <- c('Tropics', 'Extra-tropical NH', 'Extra-tropical SH')
col.names <- c('Mean bias (K)', 'Correlation', 'RPSS','CRPSS')
VizScorecard(data = data, row.names = row.names, col.names = col.names, 
               subcol.names =  month.abb[as.numeric(1:12)],
               row.title = 'Region', subrow.title = 'Forecast Month', 
               col.title = 'Start date', 
               table.title = "Temperature of ECMWF System 5", 
               table.subtitle = "(Ref: ERA5 1994-2016)", 
               fileout = 'test.png')

}
