otoole.visualise package

Submodules

otoole.visualise.res module

Visualise the reference energy system

otoole.visualise.res.build_graph(nodes: List[Tuple[str, Dict[KT, VT]]], edges: List[Tuple[str, str, Dict[KT, VT]]]) → networkx.classes.digraph.DiGraph[source]

Builds the graph using networkx

Parameters:
Returns:

A directed graph representing the reference energy system

Return type:

networkx.DiGraph

otoole.visualise.res.create_res(path_to_datapackage: str, path_to_resfile: str)[source]

Create a reference energy system diagram from a Tabular Data Package

Parameters:
  • path_to_datapackage (str) – The path to the datapackage.json
  • path_to_resfile (str) – The path to the image file to be created
otoole.visualise.res.draw_graph(graph, path_to_resfile)[source]

Layout the graph and write it to disk

Uses pygraphviz to set some graph attributes, layout the graph and write it to disk

Parameters:path_to_resfile (str) – The file path of the PNG image file that will be created
otoole.visualise.res.load_datapackage(path_to_datapackage: str) → datapackage.package.Package[source]

Module contents

Visualise different aspects of an OSeMOSYS model and data

Provides the following commands:

otoole viz res <path_to_datapackage.json> <path_to_res_image>

otoole viz res generates an image of the reference energy system in a datapackage

otoole.visualise.create_res(path_to_datapackage: str, path_to_resfile: str)[source]

Create a reference energy system diagram from a Tabular Data Package

Parameters:
  • path_to_datapackage (str) – The path to the datapackage.json
  • path_to_resfile (str) – The path to the image file to be created