pm4py.vis.view_events_distribution_graph#

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

Shows the distribution of the events in the specified dimension

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

  • 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) - weeks => Gets the distribution of the events among the weeks of a year (from 0 to 52)

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

  • 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.view_events_distribution_graph(dataframe, format='svg', distr_type='days_week', activity_key='concept:name', case_id_key='case:concept:name', timestamp_key='time:timestamp')