This Cohort Analysis App calculates the retention rate
(the percentage of active customers compared to the total number of customers, split by month). This retention rate
is then visualized and interpreted through a heatmap.
These 2 demos are based on the following tutorials:
This demo is inspired by this Cohort Analysis Tutorial.
This dataset came from the hypothetical Sprocket Central Pty Ltd
, a medium size bikes & cycling accessories organisation.
The data was collected from January 1, 2017
to December 31, 2017
, and available in CSV
format, downloadable here.
Each row in the dataset contains information about an individual bike purchase:
- Who bought it
- How much they paid
- The bike's
brand
andproduct line
- Its
class
andsize
- What
day
the purchase happened - The
day
when the product was first sold
The underlying code takes those purchases and groups them into cohorts and calculates the retention rate
, split by month, so that one can answer the question:
The underlying code groups those purchases into cohorts and calculates the retention rate
(split by month) so that one can answer the question:
if I'm making weekly changes to my store to get people to come back and buy more bikes, are those changes working?"
These cohorts are then visualized and interpreted through a heatmap powered by Plotly.
This demo is inspired by this Cohort Analysis Tutorial
This dataset comes from the hypothetical Relay Food
company. The data spans from June 1, 2009
to September 3, 2010
and is available in CSV format (downloadable here).
Each row in the dataset contains information about an individual food order:
- Who bought it
- How much they paid
- The pick-up date
The underlying code groups those purchases into monthly cohorts (with the user's cohort group based on their first order) and calculates the retention rate
so that one can answer the question:
if I'm making monthly changes to my shop to get people to come back and order more, are those changes working?"
These cohorts are then visualized and interpreted through a heatmap powered by Plotly.
Here are the steps we undertook to create the cohort analysis app:
- Load the data
- Create the cohort
- Calculate the retention rate
- Visualize and interpret the retention rate via the heatmap
- App created using 🎈Streamlit and Plotly Heatmaps
- Deployed on Streamlit Cloud ☁️
Please ask in the Streamlit community.