Skip to content

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Workforce Intelligence – HR Analytics Dashboard

An end-to-end HR Analytics and Workforce Intelligence project that analyzes employee attrition using Python, SQL Server, T-SQL, Power BI, and DAX.

The project transforms raw employee data into meaningful workforce insights through exploratory data analysis, SQL-based data processing and validation, business analysis, and an interactive Power BI dashboard.


πŸ“Œ Overview

Employee attrition is an important workforce metric that can help organizations understand workforce stability and identify employee segments with higher observed attrition.

This project analyzes attrition across key workforce dimensions such as tenure, overtime, salary, job satisfaction, work-life balance, department, and job role.

The project follows an end-to-end analytics workflow:

  • Exploratory Data Analysis using Python
  • SQL Server database setup
  • Data loading and validation
  • SQL-based business analysis
  • Power BI data modeling
  • DAX KPI calculations
  • Interactive workforce dashboard
  • Workforce attrition insights

⭐ Project Highlights

  • πŸ‘₯ Workforce & Employee Analysis
  • πŸšͺ Employee Attrition Analysis
  • πŸ“‰ Attrition Rate Calculation
  • 🐍 Python Exploratory Data Analysis
  • πŸ—„οΈ SQL Server Database
  • πŸ’Ύ T-SQL Business Analysis
  • πŸ” Data Validation
  • πŸ“Š Power BI Dashboard
  • πŸ“ DAX Measures & KPIs
  • πŸ“… Tenure Analysis
  • ⏰ Overtime Analysis
  • πŸ’° Salary Analysis
  • 😊 Job Satisfaction Analysis
  • βš–οΈ Work-Life Balance Analysis
  • 🏒 Department Analysis
  • πŸ’Ό Job Role Analysis

πŸ“Έ Dashboard Preview

Workforce Intelligence – HR Analytics Dashboard

Workforce Intelligence HR Analytics Dashboard


πŸ’Ό Business Problem

Organizations collect employee information across departments, job roles, compensation, tenure, overtime, satisfaction, and other workforce attributes.

However, raw employee records make it difficult to quickly identify patterns in employee attrition.

This project provides an analytical solution to answer questions such as:

  • What is the overall employee attrition rate?
  • Which workforce segments show higher observed attrition?
  • How does attrition vary across employee tenure?
  • Do overtime employees show higher observed attrition?
  • Does lower salary correspond with higher observed attrition?
  • How does job satisfaction relate to observed attrition?
  • How does work-life balance relate to observed attrition?
  • Which departments and job roles show comparatively higher attrition?

The goal is to transform employee-level data into a clear and interactive workforce intelligence solution.


🎯 Project Objectives

  • Analyze employee attrition patterns.
  • Calculate the overall attrition rate.
  • Identify higher-attrition workforce segments.
  • Analyze attrition across tenure bands.
  • Compare overtime and non-overtime employees.
  • Analyze salary-based attrition patterns.
  • Examine job satisfaction and attrition.
  • Examine work-life balance and attrition.
  • Compare departments and job roles.
  • Build an interactive Power BI dashboard.
  • Present workforce findings in a business-friendly format.

πŸ”„ Analytics Workflow

                 Raw Employee Dataset
                          β”‚
                          β–Ό
                Exploratory Data Analysis
                          β”‚
                          β–Ό
                    Data Preparation
                          β”‚
                          β–Ό
                  SQL Server Database
                          β”‚
                          β–Ό
                   Data Loading
                          β”‚
                          β–Ό
                    Data Validation
                          β”‚
                          β–Ό
                 Business Analysis
                          β”‚
                          β–Ό
                Power BI Data Model
                          β”‚
                          β–Ό
                    DAX Measures
                          β”‚
                          β–Ό
              Interactive HR Dashboard
                          β”‚
                          β–Ό
                 Workforce Insights

πŸ› οΈ Tech Stack

Category Technology
🐍 Programming Language Python
πŸ“Š Data Analysis Pandas
πŸ““ Notebook Jupyter Notebook
πŸ—„οΈ Database Microsoft SQL Server
πŸ’Ύ Query Language T-SQL
πŸ“ˆ Business Intelligence Power BI
πŸ“ Analytical Calculations DAX
πŸ”„ Version Control Git
☁️ Repository Hosting GitHub

πŸ“‚ Project Structure

workforce-intelligence-hr-analytics/
β”‚
β”œβ”€β”€ data/
β”‚   └── raw/
β”‚       └── WA_Fn-UseC_-HR-Employee-Attrition.csv
β”‚
β”œβ”€β”€ notebooks/
β”‚   └── 01_Exploratory_Data_Analysis.ipynb
β”‚
β”œβ”€β”€ powerbi/
β”‚   └── Workforce_Intelligence_HR_Analytic.pbix
β”‚
β”œβ”€β”€ sql/
β”‚   β”œβ”€β”€ 01_database_schema.sql
β”‚   β”œβ”€β”€ 02_data_loading.sql
β”‚   β”œβ”€β”€ 03_data_validation.sql
β”‚   └── 04_business_analysis.sql
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
└── requirements.txt

πŸ“ Dataset

The project uses the IBM HR Analytics Employee Attrition & Performance dataset.

The dataset contains employee-level information covering areas such as:

  • Employee demographics
  • Department
  • Job role
  • Job level
  • Monthly income
  • Overtime
  • Job satisfaction
  • Work-life balance
  • Years at company
  • Employment attributes
  • Attrition

The raw dataset is stored at:

data/raw/WA_Fn-UseC_-HR-Employee-Attrition.csv

🐍 Exploratory Data Analysis

Exploratory Data Analysis is performed using Python, Pandas, and Jupyter Notebook.

The EDA process is used to understand the dataset before SQL-based analysis.

Key activities include:

  • Dataset structure inspection
  • Data type checks
  • Missing-value analysis
  • Duplicate checks
  • Employee distribution analysis
  • Attrition distribution
  • Numerical analysis
  • Categorical analysis
  • Workforce segmentation
  • Initial attrition analysis

The notebook is available at:

notebooks/01_Exploratory_Data_Analysis.ipynb

πŸ—„οΈ SQL Server Workflow

The SQL component processes and analyzes the employee dataset using Microsoft SQL Server and T-SQL.

The workflow is organized into four scripts.

1. Database Schema

sql/01_database_schema.sql

Creates the database structure required for the project.

2. Data Loading

sql/02_data_loading.sql

Loads the employee dataset into the SQL Server environment.

3. Data Validation

sql/03_data_validation.sql

Performs data-quality and consistency checks before analysis.

4. Business Analysis

sql/04_business_analysis.sql

Contains SQL queries used to analyze employee attrition and workforce segments.


πŸ“Š Power BI Dashboard

The final reporting layer is built using Microsoft Power BI.

The dashboard combines workforce KPIs and employee segmentation into an interactive analytical interface.

Power BI file:

powerbi/Workforce_Intelligence_HR_Analytic.pbix

The dashboard focuses on:

  • πŸ‘₯ Workforce size
  • πŸšͺ Attrition
  • πŸ“‰ Attrition rate
  • πŸ“… Tenure
  • ⏰ Overtime
  • πŸ’° Salary
  • 😊 Job satisfaction
  • βš–οΈ Work-life balance
  • 🏒 Department
  • πŸ’Ό Job role

πŸ“ DAX & KPI Analysis

DAX measures are used in Power BI to calculate workforce metrics dynamically.

Key analytical measures include:

  • Total Employees
  • Employees Who Left
  • Attrition Rate
  • Segment-level Attrition Rate

These measures allow dashboard visuals and KPIs to respond dynamically to report interactions and filters.


πŸ“ˆ Key Workforce Findings

The analysis identified several workforce segments with comparatively higher observed attrition.

Workforce Segment Employees Employees Left Observed Attrition Rate
πŸ“… Early Tenure (0–1 Years) 215 75 34.88%
βš–οΈ Low Work-Life Balance 80 25 31.25%
⏰ Overtime Employees 416 127 30.53%
πŸ’° Low Salary (< 3K) 395 113 28.61%
😊 Low Job Satisfaction 289 66 22.84%

The overall workforce baseline is:

Metric Value
πŸ‘₯ Total Employees 1,470
πŸšͺ Employees Who Left 237
πŸ“‰ Overall Attrition Rate 16.12%

πŸ’‘ Business Insights

The analysis highlights several areas that could be investigated further:

πŸ“… Early Tenure

Employees with 0–1 years of tenure recorded the highest observed attrition rate among the analyzed segments.

⏰ Overtime

Employees working overtime showed a substantially higher observed attrition rate than the overall workforce baseline.

βš–οΈ Work-Life Balance

The lower work-life balance segment also showed elevated observed attrition.

πŸ’° Salary

Employees in the lower-salary segment recorded a higher observed attrition rate compared with the overall workforce.

😊 Job Satisfaction

Lower job satisfaction was associated with a comparatively higher observed attrition rate in the dataset.

These findings can help identify workforce areas that may deserve deeper HR investigation.


⚠️ Analytical Disclaimer

The results represent observed relationships within the available dataset.

A higher attrition rate within a particular segment does not prove that the corresponding characteristic causes employees to leave.

For example, the higher observed attrition among overtime employees does not establish that overtime itself causes attrition.

The findings should therefore be treated as exploratory workforce insights and a starting point for further analysis.


πŸš€ Installation & Setup

1. Clone the Repository

git clone https://github.com/harsh8767/Workforce-Intelligence-HR-Analytics.git

2. Navigate to the Project

cd Workforce-Intelligence-HR-Analytics

3. Create a Virtual Environment

Windows

python -m venv venv
venv\Scripts\activate

Linux / macOS

python3 -m venv venv
source venv/bin/activate

4. Install Dependencies

pip install -r requirements.txt

▢️ Running the Project

Python EDA

Open:

notebooks/01_Exploratory_Data_Analysis.ipynb

Run the notebook using Jupyter Notebook or JupyterLab.

jupyter notebook

SQL Analysis

Execute the SQL scripts in this order:

01_database_schema.sql
        ↓
02_data_loading.sql
        ↓
03_data_validation.sql
        ↓
04_business_analysis.sql

These scripts create the database environment, load the data, validate the dataset, and perform workforce analysis.


Power BI Dashboard

Open:

powerbi/Workforce_Intelligence_HR_Analytic.pbix

using Power BI Desktop.

If required, update the SQL Server data-source connection and refresh the data model.


πŸ§ͺ Data Validation

Data validation is performed before business analysis to improve confidence in the analytical results.

The validation process includes checks for:

  • Record counts
  • Missing values
  • Duplicate records
  • Data consistency
  • Key fields
  • Attribute values

Validation logic is available in:

sql/03_data_validation.sql

πŸš€ Future Improvements

Potential future enhancements include:

  • πŸ“ˆ Attrition trend analysis
  • πŸ€– Machine learning-based attrition prediction
  • πŸ‘₯ Employee segmentation
  • πŸ“Š Advanced HR KPIs
  • πŸ” Power BI drill-through pages
  • πŸ“… Monthly and yearly attrition analysis
  • πŸ“± Power BI mobile layout
  • ☁️ Power BI Service deployment
  • ⚑ Automated data refresh
  • πŸ” Row-level security

πŸ™ Acknowledgements

This project was developed using:

  • Python
  • Pandas
  • Jupyter Notebook
  • Microsoft SQL Server
  • T-SQL
  • Microsoft Power BI
  • DAX
  • Git
  • GitHub

πŸ‘¨β€πŸ’» Developer

Harsh Chavan

Passionate about Data Analytics, Business Intelligence, SQL, Power BI, Python, Machine Learning, and Artificial Intelligence.

πŸ“« Connect With Me

GitHub

https://github.com/harsh8767

LinkedIn

https://www.linkedin.com/in/harsh-chavan-1646a2257/


πŸ“œ License

This project is licensed under the MIT License.

See the LICENSE file for more information.


⭐ Support

If you found this project useful:

  • ⭐ Star the repository
  • 🍴 Fork the repository
  • πŸ’‘ Share your feedback
  • πŸ› Report issues
  • πŸš€ Suggest improvements

πŸ“Œ Project Summary

Workforce Intelligence – HR Analytics demonstrates an end-to-end HR analytics workflow:

Raw Employee Data
       ↓
Python EDA
       ↓
SQL Server
       ↓
Data Validation
       ↓
Business Analysis
       ↓
Power BI + DAX
       ↓
Workforce Insights

The project demonstrates practical skills in data analysis, SQL, database processing, business intelligence, DAX, data visualization, and workforce analytics.

The final dashboard transforms employee-level data into an interactive view of attrition patterns and workforce segments, providing a foundation for data-driven HR analysis.


Thank You for Visiting This Repository! πŸ‘‹

If you found the project useful, don't forget to ⭐ the repository.

Happy Learning & Analyzing! πŸš€

About

End-to-end HR analytics project for employee attrition analysis using SQL Server, Power BI, DAX, and Python.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages