Open Sustainable Technology
A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.
Browse accepted projects | Review proposed projects | Propose new project | Open Issues
antaresRead
Import, manipulate and explore the results of an Antares simulation.
https://github.com/rte-antares-rpackage/antaresread
adequacy bilan electricity energy hdf5 linear-algebra monte-carlo-simulation optimisation previsionnel r rhdf5 rte simulation tyndp
Last synced: about 24 hours ago
JSON representation
Repository metadata
Import, manipulate and explore the results of an Antares simulation
- Host: GitHub
- URL: https://github.com/rte-antares-rpackage/antaresread
- Owner: rte-antares-rpackage
- Created: 2016-11-15T15:26:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-30T13:06:36.000Z (12 days ago)
- Last Synced: 2024-05-01T03:42:29.314Z (11 days ago)
- Topics: adequacy, bilan, electricity, energy, hdf5, linear-algebra, monte-carlo-simulation, optimisation, previsionnel, r, rhdf5, rte, simulation, tyndp
- Language: R
- Homepage: https://rte-antares-rpackage.github.io/antaresRead/
- Size: 67.6 MB
- Stars: 11
- Watchers: 7
- Forks: 6
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README
# antaresRead
> Read data from an Antares study with R package 'antaresRead'
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/antaresRead)](https://cran.r-project.org/package=antaresRead)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-CMD-check](https://github.com/rte-antares-rpackage/antaresRead/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rte-antares-rpackage/antaresRead/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/rte-antares-rpackage/antaresRead/branch/master/graph/badge.svg)](https://app.codecov.io/gh/rte-antares-rpackage/antaresRead?branch=master)## Installation
You can install the package from CRAN:
```r
install.packages("antaresRead")
```You can also install the last development version from Github:
```r
devtools::install_github("rte-antares-rpackage/antaresRead")
```To display the help of the package and see all the functions it provides, type:
```r
help(package="antaresRead")
```To see a practical example of use of the package, look at the vignette :
```r
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
```r
library(antaresRead)
```Select an Antares simulation interactively.
```r
setSimulationPath()
```You can also select it programmatically:
```r
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:
```r
# 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:
```r
# 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:
```r
name_of_the_table[filter_rows, select_columns, group_by]
```Here are some examples:
```r
# 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:
```r
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:
```r
saveWd<-getwd()
setwd('inst/testdata/')
tar(
tarfile = "antares-test-study.tar.gz",
files = "test_case",
compression = "gzip"
)setwd(saveWd)
```You must also change the h5 file [here](https://github.com/rte-antares-rpackage/antaresRead/blob/master/tests/testthat/helper_init.R#L35).
## ANTARES :
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](https://github.com/AntaresSimulatorTeam/Antares_Simulator) if you want to use this package.## License Information:
Copyright 2015-2016 RTE (France)
* RTE: https://www.rte-france.com
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
- Name: rte-antares-rpackage
- Login: rte-antares-rpackage
- Email: [email protected]
- Kind: organization
- Description: RTE ANTARES R PACKAGE
- Website: https://rte-antares-rpackage.github.io/rPackagesRte/
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/23478907?v=4
- Repositories: 30
- Last ynced at: 2024-04-14T20:00:08.206Z
- Profile URL: https://github.com/rte-antares-rpackage
GitHub Events
Total
- Create event: 133
- Release event: 16
- Issues event: 176
- Watch event: 10
- Delete event: 94
- Member event: 8
- Issue comment event: 168
- Push event: 626
- Pull request review comment event: 1
- Pull request review event: 8
- Pull request event: 209
- Fork event: 17
Last Year
- Create event: 45
- Delete event: 32
- Fork event: 1
- Issue comment event: 5
- Pull request event: 65
- Pull request review comment event: 1
- Pull request review event: 6
- Push event: 110
- Release event: 1
Committers metadata
Last synced: 2 days ago
Total Commits: 894
Total Committers: 25
Avg Commits per committer: 35.76
Development Distribution Score (DDS): 0.642
Commits in past year: 25
Committers in past year: 7
Avg Commits per committer in past year: 3.571
Development Distribution Score (DDS) in past year: 0.36
Name | 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 |
Etienne | e****z@d****r | 18 |
Clément Berthet | c****3@g****m | 17 |
AssilMa | 4****a | 15 |
MANSOURI Assil Ext | a****i@r****m | 13 |
unknown | j****a@G****m | 6 |
Mahabd | 1****7 | 4 |
Benoit Thieurmel | b****l@p****r | 3 |
Baptiste | b****t@r****m | 3 |
Paul Bui-Quang | p****g@r****m | 3 |
PPlessiez | p****z@r****m | 3 |
KKamel67 | 5****7 | 1 |
boitardn | 1****a | 1 |
etienne-s | 2****s | 1 |
janusdebondt | j****t@g****m | 1 |
olivroy | 5****y | 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 | t****r@d****r | 1 |
Committer domains:
- rte-france.com: 8
- datak.fr: 1
- gr0vsdma.rte-france.com: 1
- pyre.datastorm.fr: 1
- grovsw57.gr0vsdma.rte-france.com: 1
- dreamrs.fr: 1
- datastorm.fr: 1
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 119
Total pull requests: 130
Average time to close issues: 11 months
Average time to close pull requests: 10 days
Total issue authors: 25
Total pull request authors: 16
Average comments per issue: 1.6
Average comments per pull request: 0.22
Merged pull request: 105
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 44
Past year average time to close issues: N/A
Past year average time to close pull requests: 4 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.11
Past year merged pull request: 34
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- jalazawa (42)
- FrancoisGuillem (19)
- baptsegu (8)
- pl-buiquang (6)
- TitouanRobert (5)
- janusdebondt (5)
- hugo-antoine-rtei (4)
- Maxxouxx (4)
- pvictor (3)
- payementcha (3)
- jorritvm (3)
- bthieurmel (2)
- MarionLi0 (2)
- JulienBretteville (2)
- MathildeFranconRTE (1)
Top Pull Request Authors
- berthetclement (31)
- jalazawa (26)
- AssilMa (18)
- etienne-s (15)
- TitouanRobert (10)
- KKamel67 (7)
- Nekmek7 (7)
- bthieurmel (6)
- baptsegu (2)
- pl-buiquang (2)
- pvictor (1)
- FrancoisGuillem (1)
- PPlessiez (1)
- olivroy (1)
- janusdebondt (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 (10)
- enhancement (8)
- feature (6)
- documentation (2)
- next_release (2)
- release_cran (1)
- update_from_CRAN_release (1)
Package metadata
- Total packages: 1
-
Total downloads:
- cran: 1,187 last-month
- Total dependent packages: 3
- Total dependent repositories: 9
- Total versions: 28
- Total maintainers: 1
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.6.1 (published 20 days ago)
- Last Synced: 2024-05-10T09:02:28.205Z (2 days ago)
- Versions: 28
- Dependent Packages: 3
- Dependent Repositories: 9
- Downloads: 1,187 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
- 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
- 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
- actions/checkout v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
Score: 13.399995114002609