01

Getting data

The dataframe we will be working with has to contain a completion timestamp for each step of each process run. Depending on the source — Salesforce, an ERP system, an ETL pipeline — you’ll get there differently, but once the data is standardized you can manipulate and analyze it in Python (or, here, in your browser).

Step 1Step 2Step 3Step 4Step 5
7.61NaNNaNNaNNaN
4.4217.93NaNNaNNaN
9.1011.417.979.261.41
9.9014.38NaNNaNNaN
10.0214.3528.3012.2110.53
9.4414.00109.6926.8750.00
3.879.4719.6711.4235.02
9.5121.3228.3617.5316.46
6.527.6316.6212.8623.20
10.9519.9811.9723.9233.44

Showing first 10 of generated runs.

Key insight
Each row represents a single process run. Each column is a step completion timestamp. This is the raw format you would receive from most data sources before any cleaning.
02

Dealing with missing values

We need to verify the data is complete. With real-life data it is very likely that not all process steps have been completed, leaving us with missing values. The chart below visualizes them — each row is a run, each column a step, blanks are missing values.

Missing value matrix — blanks indicate incomplete process runs

Depending on the case, you can either discard rows with empty values or replace them with a proxy. Here we simply drop them and keep completed runs only.

Good to know
After dropping incomplete rows, we retain only runs where every step has a recorded completion timestamp — giving us a clean, analyzable dataset.
03

Dealing with outliers

Real-life data is full of surprises — and outliers. Here we use the interquartile range (IQR) method: any value below Q1 − 1.5×IQR or above Q3 + 1.5×IQR is flagged as an outlier. Pick a step to inspect:

Visualize outliers on

Violin plots per step — before outlier treatment (with strip overlay)

With the goal of producing high-level insights on overall trend, we deal with these outliers by winsorizing them — clamping extreme values to the fence boundaries rather than removing them entirely. We now have a tighter distribution that limits the influence of extreme values:

Violin plots per step — after outlier treatment (winsorization)

Key insight
Winsorization clamps extreme values to the fence boundaries (Q1 − 1.5×IQR and Q3 + 1.5×IQR) rather than replacing them with a single value like the median. This preserves the distribution’s shape and spread while limiting the influence of anomalous data points.
04

Visualizing step completion

One way to get a visual representation of process timeliness is to overlay our data onto a Gantt chart. Each dot is a step completion timing; the triangle marks the average for each step.

Gantt overlay — actual completion dots vs. planned targets

It’s also useful to have high-level average values to share alongside the planned targets:

StepTarget durationActual average duration
Step 188.4
Step 22122.8
Step 33844.9
Step 44861.1
Step 57089.2
Key insight
Steps where actual averages consistently exceed target durations are bottlenecks worth investigating. In practice, delays at one step often push the start of the next — and in resource-constrained environments, late arrivals hit busier queues, compounding the effect across the process.
05

Analyzing categories

With a good understanding of step timeliness, we can compare performance across categorical variables (e.g. teams, products). Boxplots let us visualize each category at every step.

Gantt boxplots by category — distribution per step per group

We can then compute the average timeliness for each category at each step:

StepTarget durationCategory 1Category 2Category 3
Step 187.28.29.6
Step 22119.522.725.9
Step 33835.851.747.4
Step 44845.465.371.8
Step 57071.690.7103.9
Key insight
Categories that are consistently late across all steps point to systemic issues (resource constraints, training gaps) rather than step-specific problems. Categories that are late only on specific steps suggest localized bottlenecks.

A deviation heatmap makes this distinction immediately visible. Each cell shows how far the category’s average deviates from the target at each step — a row that’s uniformly red signals a systemic issue, while a single red cell in an otherwise neutral row points to a localized bottleneck:

Deviation heatmap — % difference from target per category per step

06

To go further

To summarize, we generated a process-timeliness dataset, cleaned it, and visualized actual durations against planned targets — including by category.

What next? We could explore sub-category results, or run a clustering algorithm such as K-Means or DBSCAN to identify the best and worst performers. That would surface why some groups are consistently late or performing better — and inform best practices to improve overall timeliness.

Good to know
Clustering is particularly powerful here: it can segment runs by performance profile without requiring labeled training data, making it ideal for exploratory process analysis where you don’t yet know what patterns to expect.