HR Workforce Analysis

Python | SQL | Power BI

Project summary

Where should a business focus its retention efforts?

I analysed a synthetic workforce of 10,000 employees, with overall attrition of 9.03%, to identify priorities for targeted retention initiatives.

Attrition was more than twice as high among employees reporting satisfaction score 2 compared with score 5. Employees working overtime had 1.56 times the attrition rate of those not working overtime, while the largest departure count occurred among employees recorded at zero years’ tenure.

The analysis supports focused pilots to address employee concerns, review workloads and strengthen onboarding. Sales and Engineering are priority departments, combining the highest department attrition rates with more than $64M in estimated vacancy costs.

This project uses synthetic data. Findings describe associations, and recommendations are proposed interventions. Vacancy costs are scenario estimates based on an annual-salary multiplier.

Interactive Power BI Dashboard:

Why this project?

Employee attrition is rarely just an HR issue, it is a massive financial drain. I built this project to move beyond basic headcount reporting and start to find answers to the questions executives really ask. I have identified several key factors which, with further investigation would reveal what is driving people out the door.

Beyond the business case, this project was an opportunity to demonstrate a full-stack data workflow taking messy raw data through a Python cleaning pipeline, structuring a relational Star Schema in PostgreSQL, and delivering an interactive, multi-page Power BI app tailored for executive decision-making. This project allowed me to expand my experience beyond business performance to different types of data which are essential cross all large companies.

Methodology

  • Dataset Acquisition: The raw data was sourced from Kaggle, a community data platform. While the dataset is simulated, it mirrors real-world HR workforce structures complete with realistic corporate pain points like unstandardized column formats, inconsistent text casing, and raw numerical values that required custom binning. Click here to see dataset.

  • Data Cleaning (Python): Used Python and Pandas to extract, inspect, and clean the raw data. Normalized string fields, handled missing values, standardized text casing across department and job titles to prevent join errors, and validated data types prior to loading into the database.

  • Database & Modeling (PostgreSQL): Imported the cleaned dataset into PostgreSQL and engineered a relational Star Schema. Designed a central fact table flanked by clean dimension tables (dim_department, dim_employee, dim_survey_profile). Wrote SQL scripts to enforce primary/foreign key relationships and ensure strict data integrity. Python and SQL code can be viewed on my GitHub page here.

  • Visualization & Analysis (Power BI): Connected Power BI to the PostgreSQL model. Authored custom DAX measures to quantify business-critical metrics including estimated vacancy cost ($135M+), regret attrition rate, and high-risk employee counts. Designed a polished, 3-page interactive dashboard using tile slicers, synchronized page cross-filtering, conditional heatmaps, and AI-driven key influencer visual models.

Business Insights

1. Target retention support where job satisfaction is lowest.

Employees reporting job satisfaction score 2 had an attrition rate of 16.63%, compared with 7.17% at score 5. In Sales, attrition reached 20.16% among employees reporting the lowest satisfaction score.

Prioritise confidential employee feedback and manager-led conversations in these groups. Use the recurring concerns to select specific changes to workload, role expectations or development opportunities, then trial them before expanding the programme.

2. Make overtime teams a priority for workload reviews.

Employees recorded as working overtime had 1.56 times the observed attrition rate of those not working overtime. The supplied analysis also found gaps of approximately 3–5 percentage points across most employee groups examined.

Pilot workload and staffing reviews in teams with the largest gaps. Use actual working hours and employee feedback to identify practical changes, such as redistributing tasks, adjusting deadlines or improving cover during busy periods. Assess whether the pilot improves retention without reducing service performance.

3. Strengthen onboarding at the point with the most departures.

Around 160 departures occurred among employees recorded at zero years’ tenure, the largest departure count of any tenure group. This makes the initial employment period a practical focus for retention support.

Introduce structured check-ins at 30, 60 and 90 days to address role clarity, training needs and access to support. Give managers responsibility for following up on issues, and assess first-year retention against a comparable new-hire group.

4. Focus the initial departmental retention pilot on Sales and Engineering.

Engineering and Sales recorded attrition rates of 9.58% and 9.50%, respectively, compared with 9.03% overall. Together, they account for more than $64M in estimated vacancy costs under the salary-based model.

Start departmental retention pilots here, using the satisfaction and overtime findings to choose the employee groups and issues to address. Use the cost estimate to compare intervention budgets with plausible reductions in departures, alongside operational needs.