Antares Visualizations

Visualize results generated by Antares, a powerful open source software developed by RTE to simulate and study electric power systems (more information about 'Antares' here: <>). This package provides functions that create interactive charts to help 'Antares' users visually explore the results of their simulations.

CRAN_Status_Badge Travis-CI Build Status AppVeyor Build Statuscodecov

antaresViz is the package to visualize the results of your Antares simulations that you have imported in the R session with package antaresRead. It provides some functions that generate interactive visualisations. Moreover, by default, these functions launch a shiny widget that provides some controls to dynamically choose what data is displayed in the graphics.


This package has been published on CRAN, so you can install it easily:


To install the last development version:

devtools::install_github("rte-antares-rpackage/antaresViz", ref ="develop")

To display the help of the package and see all the functions it provides, type:


Basic plots

antaresViz provides a plot method for tables generated with antaresRead. This method is for visualizing a single variable in different formats (times series, barplot, monotone, distribution and cumulative distribution). For instance, the following code displays the distribution of marginal price in different areas.

mydata <- readAntares(areas = "all")
plot(mydata, variable = "MRG. PRICE")

For more information, run:



Function prodStack generates a production stack for a set of areas. Different stacks have been defined. One can see their definition with command productionStackAliases().

With function exchangesStack, one can visualize the evolution and origin/destination of imports and exports for a given area.


The construction of maps first requires to associate geographic coordinates to the areas of a study. antaresViz provides function mapLayout to do interactively this association.

# Get the coordinates of the areas as they have been placed in the antaresSoftware
layout <- readLayout()
# Associate geographical coordinates
myMapLayout <- mapLayout(layout)
# This mapping should be done once and the result be saved on disk.
save(myMapLayout, file = "myMapLayout.rda")

Then map can be generated with function plotMap:

myData <- readAntares(areas = "all", links = "all")
plotMap(myData, myMapLayout)

You can use spMaps to set a map background or download some files at


Contributions to the library are welcome and can be submitted in the form of pull requests to this repository.


Antares is a powerful software developed by RTE to simulate and study electric power systems (more information about Antares here :

ANTARES is now an open-source project (since 2018), you can download the sources here if you want to use this package.

License Information:

Copyright 2015-2016 RTE (France)

This Source Code is subject to the terms of the GNU General Public License, version 2 or any higher version. If a copy of the GPL-v2 was not distributed with this file, You can obtain one at


Copyright © 2016 RTE Réseau de transport d’électricité

Changes in version 0.15.0 (2018-09-28)


  • In prodStack(), exchangesStack(), tsPlot() and plotMap() it is now possible to compare several studies with a reference. A new 'refStudy' parameter can be used to set the reference study.
  • runAppAntaresViz() we can use a reference study with all manipulateWidget modules.


  • prodStack() and exchangesStack() were not working correctly with a list of antaresData or antaresDataList, only one legend was working when the interactive parameter was set to FALSE.
  • plotMap() was not working correctly with a list of optsH5, the first graph was not updated correctly when the interactive parameter was set to TRUE.

Changes in version 0.14.0 (2018-06-12)


  • In prodStack(), exchangesStack() and tsPlot(), it is now possible to save a plot as PNG or HTML.

Changes in version 0.13.0 (2018-05-03)


  • In runAppAntaresViz(), prodStack(), exchangesStack() and tsPlot(), it is now possible to change the language from 'en' to 'fr'.
  • prodStack() and exchangesStack() can now represent annual data.
  • In plotMap(), it is now possible to give an alias to the parameter "size". A user can specify a new alias with the function setAlias() of 'antaresRead'.
  • tsPlot() can now plot several mcYear for several variables.


  • plotMap() was not working with 'leaflet' version 2.0.0.

Changes in version 0.12.0 (2017-12-14)


  • plot(), prodStack(), exchangesStack(), plotMap() work with studies in h5.
  • new function runAppAntaresViz().
  • new function plotThermalGroupCapacities().
  • new function limitSizeGraph().
  • new function plotXY().
  • new function modXY().
  • new function stackMap().
  • new option stepPlot in plot(), prodStack() and exchangesStack().

Changes in version 0.11 (2017-07-17)


  • In plotMap(), it is now possible to represent areas with polygons instead of circles. To do see, user needs to provide a SpatialPolygonsDataFrame object to function mapLayout(). He is then able to interactively set associations between an area and a polygon.


  • Hour was not correctly printed in some charts.
  • It was not possible anymore to choose a specific Monte-Carlo scenario in plotMap() when interactive = FALSE.
  • Non numeric columns were not correcly handled by plotMap().
  • Heatmaps were not correctly displayed in comparison mode.

Changes in version 0.10 (2017-06-20)


  • Function plotMapOptions() has lost some parameters of little use and has gained new ones. This may break some scripts.


  • Comparison mode: All functions can now be used to compare two or more antaresData objects. It is also possible to use a single antaresData object but to compare multiple charts with different parameters.


  • mapLayout() was containing references to the deprecated 'mapStudio' package. This causes a crash on computers where this package has not been installed when it was alive.

Changes in version 0.9 (2017-05-31)


  • plotMap() can now export animated maps.
  • It is now possible to set minimal and maximal size of labels in maps.
  • plotMap() can now bind non-numeric columns to the color of areas and links.
  • It is now possible to set the size of plots in Rmarkdown documents with "runtime:shiny"


  • plotMap(interactive=TRUE) now works in Rmarkdown documents with "runtime:shiny"

Changes in version 0.8 (2017-04-07)


  • All visualisation functions now accept synthetic and detailed data. A new parameter "mcYear" permits to choose whether to view averaged data or a given Monte-Carlo scenario.
  • plotMap() now always uses the absolute value of variable 'FLOW LIN.' to avoid any confusion. Direction of flows are represented with arrows.
  • plotMap() can now also represent categorical variables.
  • It is now possible to use custom color palette for continuous color scales in maps and heatmaps.
  • In heatmaps, the y-axis now contains month names instead of week ids. Moreover the info displayed when hovering data has been improved.
  • exchangesStack() can now also represent exchanges with rest of the world (column 'ROW BAL.').
  • A new function called setInteractivity() has been added to globally turn off or turn on interactive mode.


  • In plotMap(), several parameters were not working in non-interactive mode.
  • In plotMap(), some links were not displayed if the associated values were small.
  • Numbers are now correctly rounded on popups and legend in plotMap().
  • Invalid date/hours were displayed on charts due to problems of timezone.
  • It was not possible to change width and height of heatmaps.

Changes in version 0.7 (2017-02-23)


  • plot() method can now generate heatmaps.
  • plot() method has a new parameter "aggregate" to choose whether to visualize individual plots or aggregated plot.
  • plotMap() can now display labels. This may require to increase area size so there is enough place for labels.


  • Many small problems detected by R CMD CHECK have been solved.

Changes in version 0.6 (2017-01-23)


  • productionStack and has been renamed prodStack.


  • plotMap() can now use pie charts, bar charts and polar area charts to represent multiple variables.
  • plotMap() can now represent average values on the whole period instead of representing only a single time step.
  • plotMap() can now display labels on areas. This feature is still experimental for now and will be improved in next versions.
  • It is now possible to choose which variables are displayed in popups in maps created with plotMap().
  • It is now possible to manually set break points for color scales in maps thourgh parameter "options" of plotMap.
  • plot() method for antaresDataTable can now output monotone, density and cululated distribution.
  • There is now a plot() method for antaresDataList objects.
  • It is now possible to register custom production stack aliases with function 'setProdStackLegend'. New aliases are then available in prodStack().
  • The package now also provides a plot method for antaresDataList objects.


  • plot() was not working with annual data.

Changes in version 0.5 (2016-11-14)


  • plotMap() can now represent only areas and/or links. It is not necessary anymore to import both to create a map.
  • plotMap() can now represent multiple variables with barcharts. A new option is available to choose whether to use the same scale for different variables or one scale per variable.
  • plotMap() now displays a nice and clear legend.
  • It is now possible to add a title to a map.
  • plotMap() has a new parameter "options". With this parameter, user can modify many graphical parameters like colors, size of elements, parameters to construct color scales, etc.
  • It is now possible to use a custom base map imported with package "sp". So an internet connection is not necesary anymore to display a nice map.
  • When user clicks on a link or an area in a map, a popup appears and display values of the variables represented.

Changes in version 0.4 (2016-10-06)


  • add a file LICENSE and copyright to sources files

Changes in version 0.3 (2016-09-27)


  • New function exchangesStack to draw the exchanges of an area with its neighbours
  • New function mapLayout that helps the user to bind areas of an antares study with geographical coordinates. The function launches an interactive widget where the user can place and move areas.
  • New plot method for objects return by mapLayout(). It generates an interactive map that represents the network of an antares study.
  • New function plotMap to visualize the results of an Antares simulation on a map.
  • All functions have gained new arguments to control graphical parameters like title, axis label, colors, width and height.
  • All functions that produce time series (stacked or not) now produce a beautiful and very clear legend.
  • Time series plots (stacked or not) can share a unique legend. When they do, their zoom is synchronised: if the users zooms on one graphic, the zoom is also applied to the other graphics. This can be very helpful in shiny application or interactive documents produced with Rmarkdown.

Changes in version 0.2 (2016-08-22)


  • plot method for antaresTable objects and productionStack have an improved interface that helps user choose what he wants to visualize.
  • plot method for antaresTable objects can now draw time series but also barplots and monotones.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.16 by Veronique Bachelier, 4 months ago

Report a bug at

Browse source code at

Authors: Veronique Bachelier [aut, cre] , Jalal-Edine Zawam [aut] , Francois Guillem [aut] , Benoit Thieurmel [aut] , Titouan Robert [aut] , Paul Plessiez [aut] , Baptiste Seguinot [ctb] , RTE [cph]

Documentation:   PDF Manual  

GPL (>= 2) | file LICENSE license

Imports dygraphs, shiny, plotly, htmltools, htmlwidgets, manipulateWidget, leaflet, sp, rgeos, raster, webshot, data.table, methods, lubridate, geojsonio, graphics, stats, leaflet.minicharts, assertthat, rAmCharts, utils

Depends on antaresRead, antaresProcessing, spMaps

Suggests testthat, covr, rhdf5, ggplot2, hexbin, knitr, visNetwork, rmarkdown

Suggested by spMaps.

See at CRAN