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.
- π 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.
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
- Python (Pandas, Scikit-learn, Matplotlib, Seaborn)
- Machine Learning: K-Means, Logistic Regression
- Visualization: Plotly, Streamlit
git clone https://github.com/your-username/customer-segmentation-churn-dashboard.git
cd customer-segmentation-churn-dashboard
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
streamlit run streamlit_app.py
- 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
This project uses a public e-commerce transactions dataset with ~25,000 records:
InvoiceNo
,CustomerID
,InvoiceDate
,Quantity
,UnitPrice
,Country
This project is licensed under the MIT License.
Priyanka Malavade
Made with β€οΈ using Streamlit and Plotly.