A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

antaresRead

Import, manipulate and explore the results of an Antares simulation.
https://github.com/rte-antares-rpackage/antaresread

Category: Energy Systems
Sub Category: Energy System Modeling Frameworks

Keywords

adequacy bilan electricity energy hdf5 linear-algebra monte-carlo-simulation optimisation previsionnel r rhdf5 rte simulation tyndp

Keywords from Contributors

antares-simulation cluster shiny-apps shiny plotly manipulatewidge renewable-energy electric dygraphs stochastic-simulation-algorithm

Last synced: about 19 hours ago
JSON representation

Repository metadata

Import, manipulate and explore the results of an Antares simulation

README.md

antaresRead

Read data from an Antares study with R package 'antaresRead'

CRAN_Status_Badge
Lifecycle: experimental
Project Status: Active – The project has reached a stable, usable state and is being actively developed.
R-CMD-check
Codecov test coverage

Installation

You can install the package from CRAN:

install.packages("antaresRead")

You can also install the last development version from Github:

devtools::install_github("rte-antares-rpackage/antaresRead")

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

help(package="antaresRead")

To see a practical example of use of the package, look at the vignette :

vignette("antares")

Finally, you can download a cheatsheet that summarize in a single page how to use the package: https://github.com/rte-antares-rpackage/antaresRead/raw/master/cheat_sheet/antares_cheat_sheet_en.pdf .

See website for more documentation: https://rte-antares-rpackage.github.io/antaresRead/

Initialisation

Load the package

library(antaresRead)

Select an Antares simulation interactively.

setSimulationPath()

You can also select it programmatically:

setsimulationPath("study_path", simulation)

The parameter simulation can be the name of a simulation, the name of the folder containing the simulation results, or the index of the simulation. 1 corresponds to the oldest simulation, -1 to the newest one, 0 to the inputs.

Read data from a simulation

Most data from a simulation can be imported in the R session with function readAntares(). It has many parameters that control what data is imported. Here are a few examples:

# Read synthetic results of all areas of a study with hourly time step.
areaData <- readAntares(areas = "all")

# Same but with a daily time step:
areaData <- readAntares(areas = "all", timeStep = "daily")

# Read all Monte Carlo scenarios for a given area.
myArea <- readAntares(areas = "my_area", mcYears = "all")

# Same but add miscelaneous production time series to the result 
myArea <- readAntares(areas = "my_area", mcYears = "all", misc = TRUE)

# Read only columns "LOAD" and "MRG. PRICE"
areaData <- readAntares(areas = "all", select = c("LOAD", "MRG. PRICE"))

Functions getAreas and getLinks are helpful to create a selection of areas or links of interest. Here are a few examples:

# select areas containing "fr"
myareas <- getAreas("fr")

# Same but remove areas containing "hvdc"
myareas <- getAreas("fr", exclude = "hvdc")

# Get the links that connect two of the previous areas
mylinks <- getLinks(myareas, internalOnly = FALSE)

# Get the results for these areas and links
mydata <- readAntares(areas = myareas, links = mylinks)

Work with the imported data

When only one type of elements is imported (only areas or only links, etc.) readAntares() read antares returns a data.table with some extra attributes. A data.table is a table with some enhanced capacities offered by package data.table. In particular it provides a special syntax to manipulate its content:

name_of_the_table[filter_rows, select_columns, group_by]

Here are some examples:

# Select lines based on some criteria
mydata[area == "fr" & month == "JUL"]

# Select columns, and compute new ones
mydata[, .(area, month, load2 = LOAD^2)]

# Aggregate data by some variables
mydata[, .(total = sum(LOAD)), by = .(month)]

# All three operations can be done with a single line of code
mydata[area == "fr", .(total = sum(LOAD)), by = .(month)]

help(package = "data.table")

If you are not familiar with package data.table, you should have a look at the documentation and especially at the vignettes of the package:

help(package="data.table")
vignette("datatable-intro")

Contributing:

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

The folder test_case contains a test Antares study used to run automatic tests. If you modifies it, you need to run the following command to include the modifications in the tests:

saveWd<-getwd()
setwd('inst/testdata/')
tar(
  tarfile = "antares-test-study.tar.gz", 
  files = "test_case", 
  compression = "gzip"
)

setwd(saveWd)

ANTARES :

Antares is a powerful software developed by RTE to simulate and study electric power systems (more information about Antares here : https://antares-simulator.org/).

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 https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 7 days ago

Total Commits: 916
Total Committers: 27
Avg Commits per committer: 33.926
Development Distribution Score (DDS): 0.651

Commits in past year: 24
Committers in past year: 5
Avg Commits per committer in past year: 4.8
Development Distribution Score (DDS) in past year: 0.458

Name Email Commits
françois GUILLEM f****m@r****m 320
zawam j****m@r****m 202
TitouanRobert t****o@g****m 149
Benoit Thieurmel b****l@g****m 45
Benoit Thieurmel b****l@d****r 44
pvictor p****r@g****m 40
Clément Berthet c****3@g****m 29
Etienne e****z@d****r 18
AssilMa 4****a 15
MANSOURI Assil Ext a****i@r****m 13
KKamel67 5****7 8
unknown j****a@G****m 6
Mahabd 1****7 4
Baptiste b****t@r****m 3
PPlessiez p****z@r****m 3
Paul Bui-Quang p****g@r****m 3
Benoit Thieurmel b****l@p****r 3
kemihak k****a@r****m 2
vargastat 1****t 1
BERTHET Clement (Externe) c****e@r****m 1
BERTHET Clement Ext c****t@r****m 1
GUILLEM Francois f****l@g****m 1
Titouan Robert tr@d****r 1
olivroy 5****y 1
janusdebondt j****t@g****m 1
etienne-s 2****s 1
boitardn 1****a 1

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 119
Total pull requests: 176
Average time to close issues: 11 months
Average time to close pull requests: 12 days
Total issue authors: 25
Total pull request authors: 18
Average comments per issue: 1.6
Average comments per pull request: 0.2
Merged pull request: 145
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 51
Past year average time to close issues: N/A
Past year average time to close pull requests: 8 days
Past year issue authors: 0
Past year pull request authors: 5
Past year average comments per issue: 0
Past year average comments per pull request: 0.14
Past year merged pull request: 40
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/rte-antares-rpackage/antaresread

Top Issue Authors

  • jalazawa (42)
  • FrancoisGuillem (19)
  • baptsegu (8)
  • pl-buiquang (6)
  • janusdebondt (5)
  • TitouanRobert (5)
  • hugo-antoine-rtei (4)
  • Maxxouxx (4)
  • jorritvm (3)
  • payementcha (3)
  • pvictor (3)
  • MarionLi0 (2)
  • JulienBretteville (2)
  • bthieurmel (2)
  • nbaladakis (1)

Top Pull Request Authors

  • berthetclement (56)
  • jalazawa (26)
  • KKamel67 (24)
  • AssilMa (18)
  • etienne-s (15)
  • TitouanRobert (10)
  • Nekmek7 (8)
  • bthieurmel (6)
  • boitardn (2)
  • baptsegu (2)
  • pl-buiquang (2)
  • vargastat (1)
  • olivroy (1)
  • PPlessiez (1)
  • pvictor (1)

Top Issue Labels

  • bug (37)
  • enhancement (29)
  • feature (15)
  • next_release (3)
  • question (2)
  • to discuss at the weekly point (1)
  • rhdf5 (1)
  • help wanted (1)

Top Pull Request Labels

  • bug (25)
  • feature (13)
  • enhancement (11)
  • release_cran (5)
  • next_release (3)
  • release (3)
  • documentation (2)
  • update_from_CRAN_release (1)

Package metadata

cran.r-project.org: antaresRead

Import, Manipulate and Explore the Results of an 'Antares' Simulation

  • Homepage: https://github.com/rte-antares-rpackage/antaresRead
  • Documentation: http://cran.r-project.org/web/packages/antaresRead/antaresRead.pdf
  • Licenses: GPL-2 | GPL-3 | file LICENSE [expanded from: GPL (≥ 2) | file LICENSE]
  • Latest release: 2.9.0 (published 3 months ago)
  • Last Synced: 2025-04-25T14:04:03.084Z (2 days ago)
  • Versions: 32
  • Dependent Packages: 3
  • Dependent Repositories: 9
  • Downloads: 791 Last month
  • Rankings:
    • Forks count: 9.729%
    • Dependent repos count: 9.886%
    • Dependent packages count: 10.634%
    • Average: 11.679%
    • Downloads: 12.281%
    • Stargazers count: 15.864%
  • Maintainers (1)

Dependencies

DESCRIPTION cran
  • bit64 * imports
  • data.table >= 1.9.6 imports
  • doParallel * imports
  • httr * imports
  • jsonlite * imports
  • lubridate >= 1.7.1 imports
  • methods * imports
  • pbapply * imports
  • plyr * imports
  • shiny * imports
  • stats * imports
  • stringr * imports
  • utils * imports
  • covr * suggests
  • foreach * suggests
  • htmltools * suggests
  • knitr * suggests
  • parallel * suggests
  • rhdf5 >= 2.24.0 suggests
  • rmarkdown * suggests
  • testthat * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite

Score: 13.076478588541612