otoole.visualise package#
Submodules#
otoole.visualise.res module#
Visualise the reference energy system
- otoole.visualise.res.add_fuel(package_rows: List[List]) List[Tuple[str, Dict]] [source]#
Add fuel nodes
- otoole.visualise.res.build_graph(nodes: List[Tuple[str, Dict]], edges: List[Tuple[str, str, Dict]]) DiGraph [source]#
Builds the graph using networkx
- otoole.visualise.res.create_graph(input_data: Dict[str, DataFrame])[source]#
Creates a graph of technologies and fuels
- Parameters
input_data (Dict[str, pd.DataFrame]) – Internal datastore for otoole input data
- Returns
networkx.DiGraph
- Return type
graph
- otoole.visualise.res.create_res(input_data: Dict[str, DataFrame], path_to_resfile: str)[source]#
Create a reference energy system diagram
- 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.extract_edges(package_rows: List[Dict], from_column: str, to_column: str, parameter_name: str, directed: bool = True) List[Tuple[str, str, Dict]] [source]#
Add edges from a Tabular Data Table
- Parameters
- Returns
A list of edges with from/to nodes names and edge attributes
- Return type
Module contents#
Visualise different aspects of an OSeMOSYS model and data
Provides the following commands:
otoole viz res <input_data_format> <path_to_input_data> <path_to_res_image> <path_to_user_config>
otoole viz res
generates an image of the reference energy system