This project builds a performance analytics dashboard for a company's HR team, analyzing employee performance scores across departments and identifying the factors linked to strong performance.
C2.2 Business Problem
Management wants to understand which departments are performing best, whether tenure affects performance, and where to focus coaching and development resources.
C2.3 Dataset Description
Column
Description
employee_id
Unique employee identifier
department
Department (Sales, Marketing, Support, Engineering, HR)
tenure_years
Number of years at the company
performance_score
Annual performance review score (0-100)
training_hours
Hours of training completed in the year
Sample size: 150 employee records from the latest annual review cycle.
C2.4 Objectives
Compare performance score distributions across departments
Identify the department with the highest average performance
Explore whether tenure is associated with better performance
Recommend where HR should focus training and development efforts
C2.5 Step-by-Step Solution
Step 1: Load the employee performance CSV into Pandas
Step 3: Create a box plot to compare score distributions by department
Step 4: Calculate average performance score per department
Step 5: Create a scatter plot of tenure vs performance score
Step 6: Summarize findings into HR-focused recommendations
C2.6 Complete Python Code
► employee_performance.py
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# 1. Load data
df = pd.read_csv("employee_performance.csv")
# 2. Clean data
df = df.drop_duplicates(subset="employee_id")
df = df.dropna(subset=["performance_score"])
# 3. Department-wise summary
avg_by_dept = df.groupby("department")["performance_score"].mean().sort_values(ascending=False)
print("Average Performance by Department:\n", avg_by_dept.round(1))
# 4. Correlation: tenure vs performance
correlation = df[["tenure_years","performance_score"]].corr()
print("Correlation:\n", correlation)
# 5. Visualize
sns.boxplot(data=df, x="department", y="performance_score")
plt.title("Performance Score by Department")
plt.savefig("performance_boxplot.png")
C2.7 Expected Output
Output
Average Performance by Department: Engineering 79.8 Sales 77.2 HR 75.4 Marketing 73.9 Support 71.6
C2.8 Visualizations
Figure C2.1 — Performance score distribution by department, showing spread and outliers.Figure C2.2 — Average performance score ranked by department.Figure C2.3 — Relationship between employee tenure and performance score.
C2.9 Key Insights
Engineering has the highest average performance score (79.8), while Support trails behind at 71.6 — an 8+ point gap.
The Support department also shows the widest score spread in the box plot, suggesting inconsistent performance rather than a uniformly weaker team.
Tenure and performance show only a weak positive relationship — experience alone doesn't guarantee stronger scores.
A handful of low outlier scores appear across every department, indicating individual coaching needs rather than a department-wide issue.
C2.10 Business Recommendations
Launch a targeted coaching program for the Support department to reduce score variability and lift the department average.
Since tenure alone doesn't predict performance, invest in structured onboarding and training programs rather than relying on time-served.
Identify and support the specific low-scoring outlier employees individually across all departments, rather than applying blanket departmental policies.
Study Engineering's practices (management style, tools, workload) as a potential internal best-practice model for other departments.
✓ Instructor Tip
This project is an excellent template for students to adapt into their own portfolio using publicly available HR analytics sample datasets (e.g. on Kaggle).