Skip to content

priyanka7411/customer-segmentation-churn-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Customer Segmentation & Churn Prediction Dashboard

An interactive Streamlit + Plotly dashboard to analyze customer transactions using RFM segmentation, clustering, and churn prediction. Built for marketing and business strategy teams to understand customer behavior, identify valuable segments, and reduce churn.


πŸš€ Features

  • πŸ” RFM Analysis: Calculate Recency, Frequency, and Monetary value for each customer.
  • πŸ”„ Customer Segmentation: Cluster customers using K-Means.
  • ⚠️ Churn Prediction: Predict churn risk using a machine learning model.
  • 🌐 Interactive Dashboard: View insights, filter segments, and simulate churn.

πŸ“‚ Folder Structure

Customer_Segmentation_Sales_Analytics/
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ raw/
β”‚   └── processed/
β”œβ”€β”€ notebooks/
β”‚   β”œβ”€β”€ 1_data_cleaning.ipynb
β”‚   β”œβ”€β”€ 2_rfm_segmentation.ipynb
β”‚   β”œβ”€β”€ 3_clustering.ipynb
β”‚   └── 4_churn_prediction.ipynb
β”œβ”€β”€ model/
β”‚   └── churn_prediction_model.pkl
β”œβ”€β”€ streamlit_app.py
└── README.md

πŸ› οΈ Technologies Used

  • Python (Pandas, Scikit-learn, Matplotlib, Seaborn)
  • Machine Learning: K-Means, Logistic Regression
  • Visualization: Plotly, Streamlit

πŸ“ˆ How to Run

1. Clone the repository:

git clone https://github.com/your-username/customer-segmentation-churn-dashboard.git
cd customer-segmentation-churn-dashboard

2. Create a virtual environment:

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

3. Install dependencies:

pip install -r requirements.txt

4. Launch the Streamlit app:

streamlit run streamlit_app.py

πŸ“Œ Dashboard Sections

  • Introduction: Overview of goals and dataset
  • Overview: KPIs and churn stats
  • RFM Analysis: Distribution plots
  • Clusters: Segment insights
  • Churn Analysis: Risk visualizations
  • Predict Churn: User input + model output

πŸ“Š Dataset

This project uses a public e-commerce transactions dataset with ~25,000 records:

  • InvoiceNo, CustomerID, InvoiceDate, Quantity, UnitPrice, Country

πŸ“„ License

This project is licensed under the MIT License.


πŸ™‹β€β™€οΈ Author

Priyanka Malavade


Made with ❀️ using Streamlit and Plotly.

About

πŸ“Š Streamlit + Plotly dashboard for customer segmentation, RFM analysis, and churn prediction using machine learning.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published