HR Data Analysis
HR Data Analysis
1. Introduction
2. Objectives
3. Dataset Overview
python
Insights:
o Missing values in certain columns like termination date (for active employees).
o Basic summary statistics highlight salary ranges and other key metrics.
4.2. Demographic Analysis
Gender Distribution:
python
gender_distribution = df['Sex'].value_counts()
python
race_distribution = df['RaceDesc'].value_counts()
python
marital_status_distribution = df['MaritalDesc'].value_counts()
Salary by Gender:
python
salary_by_gender = df.groupby('Sex')['Salary'].mean()
python
salary_by_department = df.groupby('Department')['Salary'].mean()
python
salary_by_race = df.groupby('RaceDesc')['Salary'].mean()
Performance-Satisfaction Correlation:
python
python
absences_by_performance = df.groupby('PerformanceScore')['Absences'].mean()
Termination Rates:
python
termination_rate = df['EmploymentStatus'].value_counts()
Termination Reasons:
python
python
recruitment_source_dist = df['RecruitmentSource'].value_counts()
python
recruitment_performance = df.groupby('RecruitmentSource')['PerformanceScore'].value_counts()
Assesses whether certain recruitment sources yield better-performing employees.
python
projects_by_department = df.groupby('Department')['SpecialProjectsCount'].mean()
Demographics:
Male and female employees have similar average salaries, but deeper analysis may be
needed to uncover inequities.
Race and marital status distributions suggest potential diversity and inclusion
opportunities.
Salaries:
Terminations:
Recruitment:
Projects:
7. Conclusion
The analysis provides valuable insights into HR data, addressing key areas like salaries,
performance, terminations, and recruitment. By implementing the recommendations,
organizations can enhance employee satisfaction, reduce turnover, and optimize hiring strategies.