Skip to main content

A package that contains postprocessing and visualisation tools for oemof-solph models

Project description

oemof’s visualisation package badge

Installation

Use pypi to install the latest version. You can install the version just to plot graphs on oemof-solph results with

pip install oemof.visio

or you can install the extra requirements to also produce an image of the energy system

pip install oemof.visio[network]

You can also clone this repository and install locally with

pip install .

or

pip install .[network]

Special for Windows in case of optional network setting: download Graphviz (https://graphviz.org/download/) install it on your system -> activate “add PATH” variables during installation process otherwise the executable cannot be found. Afterwards, restart your environment.

Examples

Have a look at the plotting examples at the ‘oemof_example’ repository to learn how to create the following examples.

(scientifically correct)

docs/io_plot.png

(smooth)

docs/io_plot_smooth_pre.png

Render energy system

To render the component of an energy system, you can insert this code before you turn your EnergySytem instance into a model (not well suited for very large models).

from oemof.visio import ESGraphRenderer
esgr = ESGraphRenderer(
    <your EnergySystem instance>,
    legend=True,
    filepath="full path including filename without extension",
    img_format="pdf"
)
esgr.render()

Render depth

Since oemof-network release above 0.5.1, the SubNetwork class allows to create energy systems with nested subnodes.

By default esgr.render() will display all the subnodes. However, if you want to hide complexity of subnodes you can use esgr.render(max_depth=2) to hide all subnodes with depth greater than 2 within their parent.

Sankey diagramm

To produce a sankey diagramm from the raw oemof-solph results you can use this code snippet into your own model file

import plotly.io as pio

from oemof.visio import ESGraphRenderer
esgr = ESGraphRenderer(<your EnergySystem instance>)

# after the solve method of the model has been called
results = solph.processing.results(model)
fig_dict = esgr.sankey(results)
pio.show(fig_dict)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oemof_visio-0.0.3a1.tar.gz (130.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oemof_visio-0.0.3a1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file oemof_visio-0.0.3a1.tar.gz.

File metadata

  • Download URL: oemof_visio-0.0.3a1.tar.gz
  • Upload date:
  • Size: 130.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for oemof_visio-0.0.3a1.tar.gz
Algorithm Hash digest
SHA256 2b4e601c0f927f43f3002570a0a76ce6fd7f53026a6e3632b53ee7d6c208939e
MD5 689a080028029b67a780f96d893796d8
BLAKE2b-256 dc3be57b9f72f7da273b711e80e906e3bc337411434f93eda84304b181ef6ef5

See more details on using hashes here.

File details

Details for the file oemof_visio-0.0.3a1-py3-none-any.whl.

File metadata

  • Download URL: oemof_visio-0.0.3a1-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for oemof_visio-0.0.3a1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c63158c7c60f6b71145d962de8e6d5fd9234e5314e8a25fbca4060f9d6b31f3
MD5 003fc6ba32db81a8c57771773f163dd7
BLAKE2b-256 d4c760b384b6762a064cafbfaa7a7900edf48b9967178af3c4f620a11df597fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page