pm4py.vis.save_vis_events_distribution_graph#

pm4py.vis.save_vis_events_distribution_graph(log: EventLog | DataFrame, file_path: str, distr_type: str = 'days_week', activity_key='concept:name', timestamp_key='time:timestamp', case_id_key='case:concept:name', **kwargs)[source]#

Saves the distribution of the events in a picture file

Observing the distribution of events over time permits to infer useful information about the work shifts, the working days, and the period of the year that are more or less busy.

Parameters:
  • log – Event log

  • file_path (str) – Destination path (including the extension)

  • distr_type (str) – Type of distribution (default: days_week): - days_month => Gets the distribution of the events among the days of a month (from 1 to 31) - months => Gets the distribution of the events among the months (from 1 to 12) - years => Gets the distribution of the events among the years of the event log - hours => Gets the distribution of the events among the hours of a day (from 0 to 23) - days_week => Gets the distribution of the events among the days of a week (from Monday to Sunday)

  • activity_key (str) – attribute to be used as activity

  • case_id_key (str) – attribute to be used as case identifier

  • timestamp_key (str) – attribute to be used as timestamp

import pm4py

pm4py.save_vis_events_distribution_graph(dataframe, 'ev_distr_graph.png', distr_type='days_week', activity_key='concept:name', case_id_key='case:concept:name', timestamp_key='time:timestamp')