Task 4:
Employee Data Analysis – Visualizations and Insights
1. Number of Employees that Resigned and Terminated by Department
Objective: Identify and visualize the number of employees who have resigned or been terminated, grouped by department.
Approach:
Filter data to include only “Resigned” or “Terminated” employees.
Group by department and status (resigned or terminated), and count unique
Employee_IDs to get the employee count for each status per department.Use Seaborn’s barplot to create a visualization with:
Departmenton the x-axis.Count of
Employee_IDon the y-axis.Hue to distinguish between “Resigned” and “Terminated” statuses.
Labels and title are adjusted to improve readability.
Key Insight: Provides a clear breakdown of resignation and termination rates by department.
2. Country with Highest Concentration of Employees
Objective: Find the country with the highest concentration of employees.
Approach:
Extract country information from the
Locationcolumn by splitting the string.Count the unique
Employee_IDper country.Sort the countries by employee count in descending order and display the top results.
Key Insight: This helps identify which countries have the highest employee concentration, assisting in understanding global employee distribution.
3. Numbers of Hires Changed Over Time (Per Year)
Objective: Track the number of new hires over time (by year).
Approach:
Extract the year from the
datecolumn.Count the number of unique
Employee_IDs hired per year.Use Seaborn’s barplot to visualize the trend of new hires, with:
Years on the x-axis.
Number of hires on the y-axis.
Use color palette for better distinction of the years.
Label adjustments to show the exact count on top of the bars.
Key Insight: Allows for a visual representation of hiring trends, helping to spot peaks or declines in hiring activity.
4. Department with High Attrition Rate
Objective: Identify the department with the highest attrition rate (resignation rate).
Approach:
Group data by department and calculate the total number of employees and the number of resigned employees.
Calculate the attrition rate as the ratio of resigned employees to total employees per department.
Present the departments with the highest attrition rates, rounded to two decimal places.
Key Insight: Helps to pinpoint departments with high turnover, which may indicate underlying issues with employee satisfaction, management, or workload.
Technologies & Libraries Used:
Pandas: For data manipulation and cleaning.
Matplotlib/Seaborn: For creating various visualizations (bar plots).
Python: Core language for data processing and analysis.
Outcome:
The analysis provides actionable insights into employee status (resigned/terminated), hiring trends, country-based employee concentration, and department-wise attrition rates. These findings can be used for workforce management, HR decision-making, and strategic planning.