Data Analytics project 13
Employee Performance Analysis Project
Build a complete employee performance analysis portfolio project with documented metrics, reproducible Python code, validation checks, and responsible interpretation.
Explore Data Analytics training in VizagView all project ideas
Business question
How do aggregate performance indicators differ by department, and which numeric measures are associated with ratings?
Dataset and grain
Eight hundred synthetic employee records with department, training hours, goal attainment, quality score, and generated manager rating.
Requirements
Python 3.10 or later with numpy and pandas installed.
Method and validation checks
Use department medians to reduce outlier effects and calculate descriptive correlations after excluding the employee identifier.
- Employee IDs are never analysed as numeric features
- Ratings remain within the documented scale
- Department counts reconcile to total employees
- Correlation is not interpreted as training impact or individual merit
Complete Python code
Save the code as da_employee_performance_analysis.py. Review the stated model and field assumptions before using another dataset.
"""Analyse synthetic performance records with responsible-use limits."""
from __future__ import annotations
import numpy as np
import pandas as pd
def make_demo_performance(n: int = 800, seed: int = 42) -> pd.DataFrame:
rng = np.random.default_rng(seed)
department = rng.choice(["Engineering", "Sales", "Operations", "Support"], n)
training_hours = rng.gamma(2.2, 8, n)
goal_attainment = np.clip(rng.normal(0.92, 0.18, n) + 0.002 * training_hours, 0.25, 1.45)
quality_score = np.clip(rng.normal(82, 8, n), 45, 100)
rating = np.clip(1.2 + 1.7 * goal_attainment + 0.012 * quality_score + rng.normal(0, 0.35, n), 1, 5)
return pd.DataFrame({"employee_id": range(1, n + 1), "department": department,
"training_hours": training_hours.round(1), "goal_attainment": goal_attainment,
"quality_score": quality_score.round(1), "manager_rating": rating.round(1)})
def analyse_performance(data: pd.DataFrame) -> tuple[pd.DataFrame, pd.Series]:
dept = data.groupby("department", as_index=False).agg(employees=("employee_id", "nunique"), median_goal_attainment=("goal_attainment", "median"), median_quality=("quality_score", "median"), median_rating=("manager_rating", "median"), median_training_hours=("training_hours", "median"))
correlations = data.select_dtypes("number").corr()["manager_rating"].drop(["manager_rating", "employee_id"]).sort_values(key=abs, ascending=False)
return dept, correlations
def main() -> None:
departments, correlations = analyse_performance(make_demo_performance())
print(departments.round(3).to_string(index=False))
print("\nCorrelations with rating:\n", correlations.round(3).to_string())
print("Do not use this synthetic analysis for employment decisions or causal claims.")
if __name__ == "__main__":
main()
Build and run the project
Run python da_employee_performance_analysis.py to create department medians and descriptive correlations.
- Confirm the source grain and field definitions.
- Reconcile record counts and additive totals.
- Validate rate denominators and date filters.
- Review outliers and missing values.
- Read the interpretation limits before sharing conclusions.
Expected analytical output
Department-level medians and a correlation series for manager rating.
Interpretation and responsible-use limits
Do not use synthetic or unvalidated analytics for hiring, firing, compensation, promotion, surveillance, or individual ranking. Performance data can embed manager bias and role differences.
Ways to extend the project
Define role-specific goals, audit rating calibration and subgroup errors, add repeated periods, protect privacy, and involve HR and legal reviewers.
Continue learning Data Analytics
Try the next project, return to the Softenant project library, or explore the Data Analytics course in Vizag for guided SQL, Excel, Power BI, Python, dashboard, and portfolio practice.