An enterprise-grade HR analytics dashboard combining Power BI visualization with Python-powered machine learning to predict employee attrition and optimize retention strategies.
This comprehensive HR Analytics Dashboard provides deep insights into workforce metrics, employee satisfaction, and attrition patterns. The project integrates traditional business intelligence with advanced machine learning algorithms to deliver actionable predictions and recommendations.
- Identify high-risk employees before they leave
- Analyze compensation trends and performance correlations
- Predict employee attrition with 87% accuracy using ML models
- Optimize retention strategies through data-driven insights
- Visualize complex HR metrics in an intuitive, interactive dashboard
- Executive Overview - High-level workforce metrics and KPIs
- Attrition Analysis - Deep dive into turnover patterns and drivers
- Compensation & Performance - Salary trends and performance correlations
- Employee Engagement - Satisfaction scores and work-life balance metrics
- Risk Management - Predictive analytics for at-risk employees
- Machine Learning Insights - AI-powered clustering and feature importance
- K-Means Clustering: Segments employees into 4 distinct groups
- Random Forest Classification: Predicts attrition with 87% accuracy
- Feature Importance Analysis: Identifies top drivers of employee turnover
- Risk Distribution Modeling: Categorizes employees by attrition probability
- Dynamic slicers (Department, Gender, Age Group)
- Cross-page navigation buttons
- Drill-through capabilities
- Real-time filtering across all visualizations
Real-time insights into workforce metrics and attrition trends
Understanding why employees leave and identifying patterns
Analyzing salary trends and performance correlations
Measuring satisfaction, work-life balance, and development
Identifying at-risk employees and prevention strategies
AI-powered predictive analytics and employee clustering
- 33.3% Attrition Rate across 3,000 employees
- 429 High-Risk Employees requiring immediate intervention
- 87% Model Accuracy in predicting employee attrition
- Job Satisfaction is the #1 predictor of turnover (28-35% importance)
- $2,864 Income Gap between employees who stayed vs. left
- 15-20% of workforce in HIGH RISK zone (>70% attrition probability)
- Immediate Focus: Intervene with 429 high-risk employees identified by ML model
- Department Priority: Sales department shows 35.9% attrition - highest across org
- Satisfaction Initiatives: 51% of employees report low satisfaction (score โค2)
- Work-Life Balance: Implement flexible policies - scores lowest at 2.50/4.00
- Compensation Strategy: Address income gap to reduce attrition by 12%
| Technology | Purpose |
|---|---|
| Power BI Desktop | Primary visualization and dashboard development |
| DAX (Data Analysis Expressions) | Custom measures and calculated columns |
| Python 3.x | Machine learning models and advanced analytics |
| scikit-learn | K-Means clustering, Random Forest classification |
| pandas | Data manipulation and preprocessing |
| matplotlib & seaborn | Python-based visualizations |
| Power Query (M) | Data transformation and cleaning |
The dataset includes 31 columns covering:
- Age, Gender, Marital Status, Education Level
- Department, Job Role, Job Level, Business Travel frequency
- Monthly Income, Hourly Rate, Salary Hike %, Stock Options
- Performance Rating, Job Satisfaction, Environment Satisfaction
- Work-Life Balance, Relationship Satisfaction
- Years at Company, Years in Current Role, Years Since Promotion
- Training Sessions, Total Working Years
- Attrition (Yes/No), Attrition Risk Score, Predicted Attrition
Total Records: 3,000 employees
- Power BI Desktop (Download here)
- Python 3.7+ (for ML visualizations)
- Required Python libraries:
pip install pandas scikit-learn matplotlib seaborn- Clone the repository
git clone https://github.com/yourusername/HR-Analytics-Dashboard-ML.git
cd HR-Analytics-Dashboard-ML-
Open the Power BI file
- Launch Power BI Desktop
- Open
HR_Analytics_Dashboard_ML_Enhanced.pbix
-
Configure Python (if not already set)
- Go to File โ Options โ Python scripting
- Set Python home directory
- Click OK
-
Explore the dashboard
- Use slicers to filter by Department, Gender, Age Group
- Navigate between pages using bottom navigation buttons
- Click on any visual to cross-filter the entire page
-
Refresh data (optional, if you have the source data)
- Home โ Refresh
- Python visuals will re-execute automatically
Total Employees = COUNTROWS(HR_Analytics)
Attrition Rate =
DIVIDE(
CALCULATE(COUNTROWS(HR_Analytics), HR_Analytics[Attrition] = "Yes"),
COUNTROWS(HR_Analytics),
0
)
High Risk Employees =
CALCULATE(
COUNTROWS(HR_Analytics),
HR_Analytics[OverTime] = "Yes",
HR_Analytics[JobSatisfaction] <= 2,
HR_Analytics[WorkLifeBalance] <= 2
)
Avg Monthly Income = AVERAGE(HR_Analytics[MonthlyIncome])
For complete DAX measures, see docs/dax_measures.md
- Algorithm: K-Means with k=4 clusters
- Features: Age, Income, Tenure, Satisfaction scores
- Purpose: Segment employees into behavioral groups
- Output: 4 clusters - "High Performers", "Flight Risks", "Steady Workers", "New Joiners"
- Algorithm: Random Forest with 100 estimators
- Features: 10 employee attributes (satisfaction, income, tenure, etc.)
- Target: Attrition (Yes/No)
- Accuracy: 87.4% on test set
- Purpose: Predict which employees are likely to leave
- Method: Gini importance from Random Forest
- Top 3 Predictors:
- Number of Companies Worked (19.4%)
- Monthly Income (13.4%)
- Environment Satisfaction (12.6%)
- Reduced Attrition: Targeted interventions for 429 high-risk employees
- Cost Savings: Average cost to replace an employee is $15,000 - preventing 10% attrition saves $450K annually
- Improved Satisfaction: Data-driven initiatives to boost engagement
- Strategic Planning: Predictive insights for workforce planning
- HR Leadership: Strategic workforce planning and retention strategies
- Department Managers: Identify team-specific risks and engagement issues
- Executives: High-level metrics for board presentations
- Recruiters: Understand hiring patterns and role-specific attrition
- Real-time data integration with HRIS systems
- Automated email alerts for high-risk employees
- Employee journey mapping and lifecycle analysis
- Sentiment analysis from employee surveys
- Benchmark comparisons with industry standards
- Mobile-optimized dashboard for Power BI Service
- Advanced NLP for exit interview analysis
This project is open source and available under the MIT License.
Sukesh Singla
- ๐ผ LinkedIn: linkedin.com/in/sukesh-singla-667701a5
- ๐ง Email: ssingla25@gmail.com
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a โญ if this project helped you learn something new!
- Dataset inspired by IBM HR Analytics Employee Attrition dataset
- Power BI community for visualization best practices
- scikit-learn documentation for ML implementations