This function generates an interactive plot of an antares time series.
tsPlot( x, refStudy = NULL, table = NULL, variable = NULL, elements = NULL, variable2Axe = NULL, mcYear = "average", type = c("ts", "barplot", "monotone", "density", "cdf", "heatmap"), dateRange = NULL, typeConfInt = FALSE, confInt = 0, minValue = NULL, maxValue = NULL, aggregate = c("none", "mean", "sum", "mean by areas", "sum by areas"), compare = NULL, compareOpts = list(), interactive = getInteractivity(), colors = NULL, main = NULL, ylab = NULL, legend = TRUE, legendItemsPerRow = 5, colorScaleOpts = colorScaleOptions(20), width = NULL, height = NULL, xyCompare = c("union", "intersect"), h5requestFiltering = list(), highlight = FALSE, stepPlot = FALSE, drawPoints = FALSE, secondAxis = FALSE, timeSteph5 = "hourly", mcYearh5 = NULL, tablesh5 = c("areas", "links"), language = "en", hidden = NULL, ... ) # S3 method for antaresData plot( x, refStudy = NULL, table = NULL, variable = NULL, elements = NULL, variable2Axe = NULL, mcYear = "average", type = c("ts", "barplot", "monotone", "density", "cdf", "heatmap"), dateRange = NULL, typeConfInt = FALSE, confInt = 0, minValue = NULL, maxValue = NULL, aggregate = c("none", "mean", "sum", "mean by areas", "sum by areas"), compare = NULL, compareOpts = list(), interactive = getInteractivity(), colors = NULL, main = NULL, ylab = NULL, legend = TRUE, legendItemsPerRow = 5, colorScaleOpts = colorScaleOptions(20), width = NULL, height = NULL, xyCompare = c("union", "intersect"), h5requestFiltering = list(), highlight = FALSE, stepPlot = FALSE, drawPoints = FALSE, secondAxis = FALSE, timeSteph5 = "hourly", mcYearh5 = NULL, tablesh5 = c("areas", "links"), language = "en", hidden = NULL, ... ) # S3 method for simOptions plot( x, refStudy = NULL, table = NULL, variable = NULL, elements = NULL, variable2Axe = NULL, mcYear = "average", type = c("ts", "barplot", "monotone", "density", "cdf", "heatmap"), dateRange = NULL, typeConfInt = FALSE, confInt = 0, minValue = NULL, maxValue = NULL, aggregate = c("none", "mean", "sum", "mean by areas", "sum by areas"), compare = NULL, compareOpts = list(), interactive = getInteractivity(), colors = NULL, main = NULL, ylab = NULL, legend = TRUE, legendItemsPerRow = 5, colorScaleOpts = colorScaleOptions(20), width = NULL, height = NULL, xyCompare = c("union", "intersect"), h5requestFiltering = list(), highlight = FALSE, stepPlot = FALSE, drawPoints = FALSE, secondAxis = FALSE, timeSteph5 = "hourly", mcYearh5 = NULL, tablesh5 = c("areas", "links"), language = "en", hidden = NULL, ... ) # S3 method for list plot( x, refStudy = NULL, table = NULL, variable = NULL, elements = NULL, variable2Axe = NULL, mcYear = "average", type = c("ts", "barplot", "monotone", "density", "cdf", "heatmap"), dateRange = NULL, typeConfInt = FALSE, confInt = 0, minValue = NULL, maxValue = NULL, aggregate = c("none", "mean", "sum", "mean by areas", "sum by areas"), compare = NULL, compareOpts = list(), interactive = getInteractivity(), colors = NULL, main = NULL, ylab = NULL, legend = TRUE, legendItemsPerRow = 5, colorScaleOpts = colorScaleOptions(20), width = NULL, height = NULL, xyCompare = c("union", "intersect"), h5requestFiltering = list(), highlight = FALSE, stepPlot = FALSE, drawPoints = FALSE, secondAxis = FALSE, timeSteph5 = "hourly", mcYearh5 = NULL, tablesh5 = c("areas", "links"), language = "en", hidden = NULL, ... )
x | Object of class |
---|---|
refStudy | An object of class |
table | Name of the table to display when |
variable | Name of the variable to plot. If this argument is missing, then the function starts a shiny gadget that let the user choose the variable to represent. When the user clicks on the "Done" button", the graphic is returned by the function. |
elements | Vector of "element" names indicating for which elements of 'x' should the
variable be plotted. For instance if the input data contains areas, then
this parameter should be a vector of area names. If data contains clusters
data, this parameter has to be the concatenation of the area name and the
cluster name, separated by |
variable2Axe |
|
mcYear | If |
type | Type of plot to draw. "ts" creates a time series plot, "barplot" creates a barplot with one bar per element representing the average value of the variable for this element. "monotone" draws the monotone curve of the variable for each element. |
dateRange | A vector of two dates. Only data points between these two dates are displayed. If NULL, then all data is displayed. |
typeConfInt |
|
confInt | Number between 0 and 1 indicating the size of the confidence interval to display. If it equals to 0, then confidence interval is not computed nor displayed. Used only when multiple Monte Carlo scenarios are present in the input data. |
minValue | Only used if parameter |
maxValue | Only used if parameter |
aggregate | When multiple elements are selected, should the data be aggregated. If "none", each element is represented separetly. If "mean" values are averaged and if "sum" they are added. You can also compute mean ans sum by areas. |
compare | An optional character vector containing names of parameters. When it is set, two charts are outputed with their own input controls. Alternatively, it can be a named list with names corresponding to parameter names and values being list with the initial values of the given parameter for each chart. See details if you are drawing a map. |
compareOpts | List of options that indicates the number of charts to create and their
position. Check out the documentation of
|
interactive | LogicalValue. If |
colors | Vector of colors |
main | Title of the graph. |
ylab | Label of the Y axis. |
legend | Logical value indicating if a legend should be drawn. This argument is
usefull when one wants to create a shared legend with
|
legendItemsPerRow | Number of elements to put in each row of the legend. |
colorScaleOpts | A list of parameters that control the creation of color scales. It is used
only for heatmaps. See |
width | Width of the graph expressed in pixels or in percentage of the parent element. For instance "500px" and "100%" are valid values. |
height | Height of the graph expressed in pixels or in percentage of the parent element. For instance "500px" and "100%" are valid values. |
xyCompare | Use when you compare studies, can be "union" or "intersect". If union, all of mcYears in one of studies will be selectable. If intersect, only mcYears in all studies will be selectable. |
h5requestFiltering | Contains arguments used by default for h5 request, typically h5requestFiltering = list(mcYears = 2) |
highlight | highlight curve when mouse over |
stepPlot |
|
drawPoints |
|
secondAxis | add second axis to graph |
timeSteph5 |
|
mcYearh5 |
|
tablesh5 |
|
language |
|
hidden |
|
... | Other arguments for |
The function returns an object of class "htmlwidget". It is generated by
package highcharter
if time step is annual or by dygraphs
for
any other time step.It can be directly displayed in the viewer or be stored
in a variable for later use.
If the input data contains several Monte-Carlo scenarios, the function will display the evolution of the average value. Moreover it will represent a 95
If the input data has a annual time step, the function creates a barplot instead of a line chart.
compare argument can take following values :
"mcYear"
"main"
"variable"
"type"
"typeConfInt"
"confInt"
"elements"
"aggregate"
"legend"
"highlight"
"stepPlot"
"drawPoints"
"secondAxis"