This project delivers an end-to-end Customer Churn Analytics solution using SQL, Python, Machine Learning, and Power BI.
The objective is to identify key drivers of customer churn, quantify revenue risk, predict customer attrition, and provide actionable business recommendations for customer retention.
The project combines:
- SQL-based business analysis
- Exploratory Data Analysis (EDA)
- Feature Engineering
- Machine Learning Prediction
- Interactive Power BI Executive Dashboard
Customer churn directly impacts revenue and profitability in the telecommunications industry.
This project aims to answer:
- Which customers are most likely to churn?
- What factors contribute most to churn?
- How much revenue is at risk?
- Which customer segments should be prioritized for retention?
- What actions can reduce churn and improve customer lifetime value?
Telco Customer Churn Dataset
Dataset Size:
- 7,043 customers
- 33 business attributes
- Demographics
- Services subscribed
- Billing information
- Churn indicators
- Customer Lifetime Value (CLTV)
Key Fields:
- Gender
- Senior Citizen
- Partner
- Dependents
- Tenure Months
- Internet Service
- Contract Type
- Monthly Charges
- Total Charges
- Churn Label
- Churn Score
- CLTV
This dataset is available in kaggle https://www.kaggle.com/datasets/blastchar/telco-customer-churn
Dataset ↓ SQL Analytics ↓ EDA & Business Insights ↓ Feature Engineering ↓ Random Forest Model ↓ Churn Predictions ↓ Power BI Executive Dashboard
telco-customer-churn-analysis/
├── data/
│ ├── Telco_customer_churn.xlsx
│ ├── churn_predictions.csv
│ └── feature_importance.csv
│
├── notebooks/
│ ├── 01_sql_analytics.ipynb
│ ├── 02_eda.ipynb
│ ├── 03_feature_engineering.ipynb
│ └── 04_churn_prediction.ipynb
│
├── powerbi/
│ ├── Customer churn prediction.pbix
│ └── screenshots/
│
├── src/
│ └── convert_to_csv.py
│
├── LICENSE
└── README.md
Key business questions answered:
Month-to-Month customers exhibited significantly higher churn rates than annual contract customers.
Revenue exposure was quantified by customer segment and churn category.
Customer retention was strongly associated with:
- Online Security
- Tech Support
- Contract Length
Customers were classified into:
- High Risk
- Medium Risk
- Low Risk
using churn score thresholds.
Performed:
- Missing value analysis
- Distribution analysis
- Churn segmentation
- Correlation analysis
- Revenue analysis
- Customer profile exploration
Key Insights:
- Short tenure customers churn more frequently.
- Month-to-Month contracts are the strongest churn driver.
- Customers lacking Online Security and Tech Support exhibit higher churn rates.
- Fiber Optic customers show elevated churn risk.
Implemented:
- Missing value handling
- Data type corrections
- Label encoding
- One-hot encoding
- Feature preparation for machine learning
Generated outputs:
- Model-ready dataset
- Feature importance dataset
- Prediction dataset
Model Used:
- Random Forest Classifier
Evaluation Metrics:
| Metric | Score |
|---|---|
| Accuracy | 80.7% |
| Precision | 64.1% |
| Recall | 53.5% |
| F1 Score | 57.7% |
| ROC-AUC | 84.3% |
Top Predictive Features:
- Tenure Months
- Total Charges
- Monthly Charges
- Contract Type
- Online Security
- Tech Support
- Internet Service
The dashboard contains 7 executive-level pages:
- Churn KPIs
- Revenue at Risk
- Customer Segmentation
- Contract Analysis
- Service Analysis
- Churn Trends
- Churn Reason Analysis
- Competitor Insights
- Service Quality Insights
- High-Risk Customer Segmentation
- Churn Score Analysis
- Strategic Retention Recommendations
- Revenue Protection Opportunities
- Machine Learning Results
- Feature Importance Analysis
- What-if Analysis
- Revenue Recovery Estimation
- Customer Retention Impact
- Prioritize Month-to-Month customers for retention campaigns.
- Bundle Online Security and Tech Support services.
- Target low-tenure customers within their first year.
- Focus retention efforts on high-risk customer segments.
- Offer incentives for migration to annual contracts.
- SQL
- SQLite
- Python
- Pandas
- NumPy
- Scikit-Learn
- Random Forest
- Matplotlib
- Seaborn
- Power BI
The project demonstrates how data analytics and machine learning can be combined to:
- Predict customer churn
- Quantify revenue risk
- Prioritize retention actions
- Improve customer lifetime value
- Support executive decision making
Arjun Ramprasad
Contributions, issue tracking, and feature recommendations are highly welcome. Feel free to fork this project, create a feature branch, and submit a pull request!
This project is licensed under the MIT License - see the LICENSE file for details.