Visualizing Human Resources Data : A Pandas Plotting Exploration
Visualizing Human Resources Data : A Pandas Plotting Exploration Data Science Project
Intro to Pandas for Data Analysis

Visualizing Human Resources Data : A Pandas Plotting Exploration

This project takes you on an exploratory journey through a diverse dataset of HR analytics. It features numerous activities designed to hone your skills in data visualization, particularly focusing on basic plotting techniques. Get ready to dive deep and master these essential data visualization skills!
Start this project
Visualizing Human Resources Data : A Pandas Plotting ExplorationVisualizing Human Resources Data : A Pandas Plotting Exploration
Project Created by

Vidhi Shah

Project Activities

All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.

All our activities include solutions with explanations on how they work and why we chose them.

codevalidated

Top Five Recruitment Sources by Number of Hires

Let's start with identifying the Top 5 sources , through which people are getting recruited at this company!

Your task is to first identify the top 5 recuritment sources using the value_counts() method on the RecruitmentSource column. Store the results in top_recruitment_sources variable.

Second, now using the top_recruitment_sources, plot a bar plot contaning following details :

X-axis: 'Recruitment Source'

Y-axis: 'Number of Hires'

Title: 'Top Five Recruitment Sources by Number of Hires'

The result should match the following output:

Plot_1

codevalidated

Performance Scores by Gender in the Sales Department

Let's plot a Stacked Bar Plot to understand the distribution of performance scores by gender within the Sales department.

First filter out the Department column of the dataframe to extract records of Sales department. Store the results in sales_gender_performance variable.

Now using sales_gender_performance, plot a stacked bar plot contaning following details :

X-axis: 'Gender'

Y-axis: 'Count'

Title: 'Performance Scores by Gender in Sales'

The result should match the following output:

Plot_2

multiplechoice

In which situation would a bar plot be the most appropriate to use?

multiplechoice

As an HR manager, when would you use a stacked bar plot?

codevalidated

Employee Satisfaction Scores

Let's plot a histogram to visualise how satisfied the employees are!

Use the EmpSatisfaction column to plot the histogram using the following details :

X-axis: 'Satisfaction Score'

Y-axis: 'Frequency'

Title: 'Distribution of Employee Satisfaction Scores'

The result should match the following output:

Plot_5

multiplechoice

Are employees Happy or Sad?

Which Employee Satisfaction Score has the highest frequency?

multiplechoice

As a data analyst in HR, for which of the following scenarios is a histogram most useful?

codevalidated

Relationship Between Salary and Engagement Score

Plot a Scatter plot between Salary and EngagementSurvey to see if there is any relationship between them.

Use the following details :

X-axis: 'Salary'

Y-axis: 'Engagement Survey Score'

Title: 'Relationship Between Salary and Engagement Score'

The result should match the following output:

Plot_10

codevalidated

Employee Satisfaction vs. Number of Special Projects

Visualize the relationship between employee satisfaction and the number of special projects, with bubble size representing salary.

First, scale down the Salary column by dividing it by 1000 for use as the bubble size marker.

Next, using the dataframe df, plot a scatter plot containing the following details:

X-axis: 'Employee Satisfaction'

Y-axis: 'Number of Special Projects'

Bubble Size: 'Salary'

Title: 'Employee Satisfaction vs. Number of Special Projects (Bubble Size: Salary)'

The result should match the following output:

Plot_11

multiplechoice

In which scenario would a bubble plot be most effectively used by an HR analyst?

codevalidated

Trend of Employee Terminations Over the Years

Plot a Line Plot and Visualize the trend of employee terminations over the years.

First, extract the year from the DateofTermination column and store the results in a new column YearTerminated.

Next, count the number of terminations per year and sort the results. Store this in the terminations_per_year variable.

Now, using terminations_per_year, plot a line plot containing the following details:

X-axis: 'Year Terminated'

Y-axis: 'Number of Terminations'

Title: 'Trend of Employee Terminations Over the Years'

The result should match the following output:

Plot_13

codevalidated

Employee Distribution by Marital Status

Create a pie chart that portrays the distribution of employees by their Marital Status.

First, count the occurrences of each marital status category in the MaritalDesc column and store the results in the marital_status_counts variable.

Next, using marital_status_counts, plot a pie chart containing the following details:

Use autopct formatted as %1.1f%% to display the percentage of each slice.

Set ylabel='' to clear any standard Y-axis label.

Set the title to Employee Distribution by Marital Status.

The result should match the following output:

Plot_14

multiplechoice

Distribution of Employees by State

From which state are the maximum employees from ?

Use value_counts() method to find out.

Visualizing Human Resources Data : A Pandas Plotting ExplorationVisualizing Human Resources Data : A Pandas Plotting Exploration
Project Created by

Vidhi Shah

As a Project Author at DataWars, I dive into the world of data science and AI/ML with a millennial flair, constantly intrigued by the inner workings of technology. While I'm not crunching numbers, you'll find me cheering for my favorite cricket team.

As a Project Author at DataWars, I dive into the world of data science and AI/ML with a millennial flair, constantly intrigued by the inner workings of technology. While I'm not crunching numbers, you'll find me cheering for my favorite cricket team.

This project is part of

Intro to Pandas for Data Analysis

Explore other projects