Skip to main content
GEMS-ViewsBuilder logo

GEMS Views Builder

Turn GEMS Simulation Tables into business ready Views.

PyPI Python versions License: MPL 2.0 Documentation
Tests CI Ruff Checked with mypy uv

Documentation · Getting started · Examples · Changelog · Report an issue


GEMS Views Builder turns the results of a GEMS simulation into Views: tables of metrics aggregated per location, time granularity and scenario, ready to analyse or plot.

A View answers a business question on top of a Simulation Table, for example "hourly production per area" or "yearly unsupplied energy per country, averaged over scenarios".
GVB works with any Simulation Table that follows the GEMS format, whether it was written by GemsPy or by Antares Simulator.

%%{init: {"flowchart": {"htmlLabels": false, "wrappingWidth": 420, "padding": 14, "nodeSpacing": 36, "rankSpacing": 48}} }%%
flowchart TB
    study["GEMS Study"] --> sim["Simulation: GemsPy or Antares Simulator"]
    sim --> table[("Simulation Table")]
    study --> study_files["Libraries and System"]
    study_files --> gvb["GEMS Views Builder"]
    inputs["Taxonomy, Catalogs, View Configs, Calendar"] --> gvb
    table --> gvb
    gvb --> views[("Views")]

📦 Installation

pip install gems-views-builder

🚀 Quickstart

gems-views-builder \
  --system            path/to/system.yml \
  --libraries-dir     path/to/libraries \
  --taxonomy          path/to/taxonomy.yml \
  --catalogs-dir      path/to/catalogs \
  --view-configs      "path/to/view_configs/*.yml" \
  --calendar          path/to/calendar.csv \
  --simulation-tables "path/to/results/st-x-mc-*.parquet" \
  --output-dir        views_out

Then open the result with any Parquet reader:

import polars as pl

view = pl.read_parquet("views_out/*.parquet")
print(view.head())

Run gems-views-builder --help for every option, or see the Command line page.

🧩 Inputs and outputs

Input What it is
System and model libraries The GEMS study that was simulated.
Simulation Tables One or several simulation results, consistent with the system.
Taxonomy Groups the models of the study into categories (generator, load, area, ...).
Catalogs Define the metrics computed from those categories.
View configs Select the metrics, the location category and the aggregation patterns.
Calendar Maps simulation time indices to dates (CSV).

The output is one View per view config and aggregation pattern, with one row per metric, location, date and scenario (or scenario statistic).

🛠️ Development

git clone https://github.com/AntaresSimulatorTeam/GEMS-ViewsBuilder.git
cd GEMS-ViewsBuilder
uv sync
uv run pre-commit install

Run mypy and Ruff:

uv run pre-commit run --all-files

Build the documentation locally:

uv sync --extra doc
uv run mkdocs serve

📄 License

GEMS-ViewsBuilder is developed by RTE and distributed under the Mozilla Public License 2.0. The list of authors is in AUTHORS.txt.

Metadata

Release files for gems-views-builder 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gems-views-builder 0.1.1
File Size Uploaded Provenance Actions
gems_views_builder-0.1.1.tar.gz 47.3 kB Without provenance Details for gems_views_builder-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gems-views-builder 0.1.1
File Interpreter ABI Platform Actions
gems_views_builder-0.1.1-py3-none-any.whl Python 3 none any Details for gems_views_builder-0.1.1-py3-none-any.whl

Total release size: 105.8 kB

Release files / gems_views_builder-0.1.1.tar.gz

Download URL gems_views_builder-0.1.1.tar.gz
Size 47.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bd5ab1a96b0541afaeae5721ee802cce409cbd7ab970d7931171bf05d680f39f
BLAKE2b-256 checksum
How to use checksums
63792a5f6698f6b759e85c874674a3a3a8dbb5f952f245ddcca7e42b871f247b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / gems_views_builder-0.1.1-py3-none-any.whl

Download URL gems_views_builder-0.1.1-py3-none-any.whl
Size 58.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
071eb0f9a9e24b25162285be9c0d3f5ddf0dabb3a68b7ff0e56777293d1ddfff
BLAKE2b-256 checksum
How to use checksums
865a48f8d6710c61dd50a400d8bcfe504940d529d6ec7111275ece5d9d24ed73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for gems-views-builder 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page