An e-commerce giant wants to improve its product offerings, and customer relations and also maximize profit. To achieve this, the company wants to calculate the percentage of customers it's able to retain every month. The company also needs to segment its customers for target marketing and promotions.
- Calculate the percentage of customers the company is able to retain every month.
- Segment the customers based on their behaviour. The behaviour under consideration includes customers' recent transactions with the company, the frequency of purchases, and how much each customer spends on the company products.
- Analyze customer segments based on Recency, Frequency, and Monetary value.
The objectives of the project are:
- To calculate customer retention rate.
- To segment the customers based on their behaviour.
- To analyze customer segments based on Recency, Frequency, and Monetary value with Power BI.
Recency (R)
refers to the days elapsed since the last purchase. It is calculated by deducting the date that the customer made the last purchase from the offset date (the assumed date when the analysis was carried out).
Frequency (F)
refers to the total number of transactions a customer has made with the company. It represents how often a customer purchases a product/product from the company. It is calculated by counting the number of complete purchases a customer has made with the company.
Monetary (M)
refers to the sum of a customer's monies on the company's products. It is calculated by multiplying the number of products by the unit price of products.
The project was implemented using Python programming language and the following software and packages (libraries) were used:
Softwares
- Jupyter Notebook
- Power BI
Libraries
- Sickit-Learn
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Cohort Analysis: Time-based cohort analysis was performed to calculate and visualize the retention rate for each cohort. This involves grouping the data frame by "CohortMonth" and "CohortIndex" columns, selecting the first column storing it to cohort_sizes and then dividing the cohort count by cohort sizes along the rows.
- Customer Segmentation: The customers were segmented based on their behaviour which includes recency, frequency, and monetary value. RFM analysis was performed to determine the customer segments. The data was visualized using a heatmap to show the relationship between recency, frequency, and monetary value. To determine each segment in terms of Platinum, Gold, Bronze, and Silver, the metric values were clustered and visualized using a snake plot.
- Power BI Customer Segmentation Analysis: With the help of Power BI, the segmented customer base
Platinum
,Gold
,Bronze
, andSilver
was further analyzed in order to gain a deeper understanding of the interactions between distinct clusters and the company through an interactive dashboard.
The project has been successful in calculating customer retention rate, segmenting customers based on their behaviour, and analyzing customer segments based on Recency, Frequency, and Monetary value. The results obtained from the project can be used to make informed product decisions that will reduce churn and drastically increase revenue.