pm4py.vis.view_network_analysis#

pm4py.vis.view_network_analysis(network_analysis: Dict[Tuple[str, str], Dict[str, Any]], variant: str = 'frequency', format: str = 'png', activity_threshold: int = 1, edge_threshold: int = 1, bgcolor: str = 'white', graph_title: str | None = None)[source]#

Visualizes the network analysis.

Parameters:
  • network_analysis – Network analysis

  • variant (str) – “frequency” or “performance”

  • format (str) – Format of the visualization (if ‘html’ is provided, GraphvizJS is used)

  • activity_threshold (int) – Minimum occurrences of an activity to be included

  • edge_threshold (int) – Minimum occurrences of an edge to be included

  • bgcolor (str) – Background color (default: white)

  • graph_title – Title of the visualization (if provided)

import pm4py

net_ana = pm4py.discover_network_analysis(dataframe, out_column='case:concept:name', in_column='case:concept:name', node_column_source='org:resource', node_column_target='org:resource', edge_column='concept:name')
pm4py.view_network_analysis(net_ana, format='svg')