Can you help reduce employee turnover?
π Background
You work for the human capital department of a large corporation. The Board is worried about the relatively high turnover, and your team must look into ways to reduce the number of employees leaving the company.
The team needs to understand better the situation, which employees are more likely to leave, and why. Once it is clear what variables impact employee churn, you can present your findings along with your ideas on how to attack the problem.
πΎ The data
The department has assembled data on almost 10,000 employees. The team used information from exit interviews, performance reviews, and employee records.
- "department" - the department the employee belongs to.
- "promoted" - 1 if the employee was promoted in the previous 24 months, 0 otherwise.
- "review" - the composite score the employee received in their last evaluation.
- "projects" - how many projects the employee is involved in.
- "salary" - for confidentiality reasons, salary comes in three tiers: low, medium, high.
- "tenure" - how many years the employee has been at the company.
- "satisfaction" - a measure of employee satisfaction from surveys.
- "avg_hrs_month" - the average hours the employee worked in a month.
- "left" - "yes" if the employee ended up leaving, "no" otherwise.
import pandas as pd
df = pd.read_csv('./data/employee_churn_data.csv')
df.head()πͺ Competition challenge
Create a report that covers the following:
- Which department has the highest employee turnover? Which one has the lowest?
- Investigate which variables seem to be better predictors of employee departure.
- What recommendations would you make regarding ways to reduce employee turnover?
π§ββοΈ Judging criteria
| CATEGORY | WEIGHTING | DETAILS |
|---|---|---|
| Recommendations | 35% |
|
| Storytelling | 35% |
|
| Visualizations | 20% |
|
| Votes | 10% |
|
β
Checklist before publishing into the competition
- Rename your workspace to make it descriptive of your work. N.B. you should leave the notebook name as notebook.ipynb.
- Remove redundant cells like the judging criteria, so the workbook is focused on your story.
- Make sure the workbook reads well and explains how you found your insights.
- Check that all the cells run without error.
βοΈ Time is ticking. Good luck!
Reducing Employee Turnover
π Background
You work for the human capital department of a large corporation. The Board is worried about the relatively high turnover, and your team must look into ways to reduce the number of employees leaving the company.
The team needs to understand better the situation, which employees are more likely to leave, and why. Once it is clear what variables impact employee churn, you can present your findings along with your ideas on how to attack the problem.
The Main Questions
- Which department has the highest employee turnover? Which one has the lowest?
- Which factors have the strongest relationship with the turnover?
- What recommendation can you offer to reduce the turnover?
Bookkeeping
In this section, we will import the necesssary library and also perform data cleaning and preparation
# importing library for the task
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
df['left_num']=df['left'].map({'yes':True,'no':False})
# one-hot encoded the categorical feature such as salary
one_hot=pd.get_dummies(df.salary)
df=df.join(one_hot)
#binning the review score
bins=list(range(3,11))
df['review_bins']=pd.cut(df['review']*10, bins=bins)
# check the first 5 data
df.head()# checking the statistic summary of the initial data
df.describe()β
β