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')[source]#

Visualizes the network analysis

Parameters:
  • network_analysis – Network analysis

  • variant (str) – Variant of the visualization: - frequency (if the discovered network analysis contains the frequency of the interactions) - performance (if the discovered network analysis contains the performance of the interactions)

  • format (str) – Format of the visualization (default: png)

  • activity_threshold (int) – The minimum number of occurrences for an activity to be included (default: 1)

  • edge_threshold (int) – The minimum number of occurrences for an edge to be included (default: 1)

  • bgcolor (str) – Background color of the visualization (default: white)

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')