pm4py.vis.save_vis_performance_dfg#

pm4py.vis.save_vis_performance_dfg(dfg: dict, start_activities: dict, end_activities: dict, file_path: str, aggregation_measure='mean', bgcolor: str = 'white', rankdir: str = 'LR', serv_time: Dict[str, float] | None = None, **kwargs)[source]#

Saves the visualization of a performance DFG

Parameters:
  • dfg (dict) – DFG object

  • start_activities (dict) – Start activities

  • end_activities (dict) – End activities

  • file_path (str) – Destination path

  • aggregation_measure (str) – Aggregation measure (default: mean): mean, median, min, max, sum, stdev

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

  • rankdir (str) – sets the direction of the graph (“LR” for left-to-right; “TB” for top-to-bottom)

  • serv_time – (optional) provides the activities’ service times, used to decorate the graph

import pm4py

performance_dfg, start_activities, end_activities = pm4py.discover_performance_dfg(dataframe, case_id_key='case:concept:name', activity_key='concept:name', timestamp_key='time:timestamp')
pm4py.save_vis_performance_dfg(performance_dfg, start_activities, end_activities, 'perf_dfg.png')