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', graph_title: str | None = None)[source]#

Shows the distribution of the events in the specified dimension.

This allows identifying work shifts, busy days, and busy periods of the year.

Parameters:
  • log – Event log

  • distr_type (str) – Type of distribution (default: days_week): - days_month: Distribution of events among days of a month (1-31) - months: Distribution of events among months (1-12) - years: Distribution of events among years - hours: Distribution of events among hours of a day (0-23) - days_week: Distribution of events among days of the week (Mon-Sun) - weeks: Distribution of events among weeks of a year (0-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

  • graph_title – Sets the title of the visualization (if provided)

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