R Tutorial: Visualizing the recruiting data

Learn to visualize recruiting data with ggplot2 bar charts in R. A sorted table works fine for a few teams, but with 26 teams it gets messy. Bar charts using aes() and geom_bar() instantly show which teams have the highest and lowest call volumes.
Chapters
Communicating the results of your analysis to your audience is a critical part of HR analytics. If business leaders and decision makers don't understand what you've uncovered, they are unlikely to do something about it. That's why part of the final step is to plot the differences you've found between the groups. Let's look at an example to see why visualization can be so powerful. This code produces a sorted data frame of average calls made by different teams in a call center. Because it's sorted, you can easily tell that teams D and B made more calls than teams A and C, even without a graph or chart. But what happens when you are analyzing many more teams? Here we have 26 teams, and although we can still tell which teams are making the most calls, it is no longer a simple story. Here is where Using a bar chart can help communicate what is going on better than numbers alone can using ggplot2, you can turn this data frame into a bar chart. Remember that you define the X and Y axes as aesthetics inside the AES function. The geomcall function may be new to you. It displays a bar chart with one bar for each value of x. The Y aesthetic is used to determine the height of the bars. Now it's easier to see not only that teams J, U, and M made the most calls, but also that X made the fewest. In this course, you'll learn several ways to visualize differences between groups, and we'll focus less on customizing and polishing the plots. You should be aware that it is possible to arrange the bars, add colors, and customize the labels to make your points clear. You can learn more about customizing plots in data visualization courses on datacamp. It's time for you to visualize the recruitment data.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







