https://github.com/rightfulcode/customer-segmentation-rfm
This project performs customer segmentation using Recency, Frequency, and Monetary (RFM) metrics to identify key customer groups and provide actionable marketing insights.
https://github.com/rightfulcode/customer-segmentation-rfm
data-analysis-python data-visualization elevvo-internship jupyter-notebook matplotlib pandas python rfm-analysis seaborn
Last synced: 5 months ago
JSON representation
This project performs customer segmentation using Recency, Frequency, and Monetary (RFM) metrics to identify key customer groups and provide actionable marketing insights.
- Host: GitHub
- URL: https://github.com/rightfulcode/customer-segmentation-rfm
- Owner: RightfulCode
- Created: 2025-09-24T07:54:04.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-09-24T08:00:35.000Z (6 months ago)
- Last Synced: 2025-09-24T10:11:00.813Z (6 months ago)
- Topics: data-analysis-python, data-visualization, elevvo-internship, jupyter-notebook, matplotlib, pandas, python, rfm-analysis, seaborn
- Language: Jupyter Notebook
- Homepage:
- Size: 21.5 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Task 3: Customer Segmentation Using RFM Analysis
This project is part of my **Elevvo Internship (Data Analytics Track)**.
The objective was to perform **customer segmentation** on the Online Retail dataset using **RFM (Recency, Frequency, Monetary)** analysis to identify key customer groups and suggest actionable marketing strategies.
## 📂 Dataset
- Source: [Online Retail Dataset (UCI)](https://archive.ics.uci.edu/dataset/352/online+retail)
- Data includes invoice details, customer IDs, quantities, unit prices, and purchase dates.
## 🛠️ Tools & Libraries
- Python
- Pandas
- Matplotlib
- Seaborn
- Jupyter Notebook
## 🔎 Key Steps
1. **Data Loading** – Import the Excel dataset into a Pandas DataFrame
2. **Data Cleaning** – Remove missing CustomerIDs, filter negative/zero quantities or prices, convert data types for memory efficiency
3. **Calculating RFM Metrics** – Compute Recency, Frequency, and Monetary value per customer
4. **Assigning RFM Scores** – Score each metric from 1–4 based on quartiles
5. **Segmentation** – Classify customers into segments like Champions, Loyal Customers, At Risk, and Others
6. **Data Visualization** – Create bar charts and heatmaps to analyze RFM patterns
7. **Insights & Marketing Suggestions** – Provide actionable recommendations for each segment
## 📊 Key Insights
- **Champions:** High recency, frequency, and monetary — top customers to reward
- **Loyal Customers:** Frequent buyers — encourage repeat purchases and cross-selling
- **At Risk:** Inactive or infrequent buyers — target with re-engagement campaigns
- **Others:** Moderate or new customers — monitor and engage lightly
## 📈 Visualizations
### Customer Segment Distribution

### Monetary Value by Recency & Frequency

## ▶️ How to Run
- Install dependencies: `pip install -r requirements.txt`
- Open the notebook: `jupyter notebook Customer_Segmentation_RFM.ipynb`