0Pricing
Pandas & NumPy Academy · Lesson

Visualising User Journeys

Plot the funnel as a horizontal bar chart and the retention matrix as a heatmap to communicate findings to stakeholders.

Why Visualise User Journeys?

Raw event tables and conversion rates as numbers are hard to communicate to non-technical stakeholders. Visual representations of user journeys — funnel charts, retention heatmaps, and Sankey diagrams — make patterns immediately apparent. The goal is not to replace the numbers but to present them in a form where insights are self-evident at a glance, reducing the cognitive load on the audience.

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

# Assume funnel_summary and retention_pct are already computed
print('Visualisation libraries loaded')

Horizontal Bar Chart for Funnel

A horizontal bar chart is the simplest and most widely understood funnel visualisation. Each bar represents a funnel step; bar length represents the user count. Sort steps from top to bottom in funnel order so the chart reads as a widening funnel. Use a single contrasting colour for all bars so attention stays on the values, not the colour variety.

FUNNEL_STEPS = ['homepage', 'product_page', 'add_to_cart', 'checkout', 'purchase']
users = [10000, 7200, 4100, 2300, 980]

fig, ax = plt.subplots(figsize=(9, 5))
bars = ax.barh(FUNNEL_STEPS[::-1], users[::-1], color='steelblue', height=0.6)
ax.set_xlabel('Unique Users')
ax.set_title('Conversion Funnel')
plt.tight_layout()
plt.show()

All lessons in this course

  1. Sessionisation and Event Sequencing
  2. Funnel Analysis
  3. Cohort Retention Table
  4. Visualising User Journeys
← Back to Pandas & NumPy Academy