8 Case Study: Visualizing Absenteeism Patterns
In Chapter 7, we covered the grammar of graphics, the principles of effective visual design, and the role of storytelling in data analysis. In Chapter 4, we took a first look at the absenteeism data with a few exploratory plots. Now we put those tools to work.
This case study walks through a series of visualizations of the Absenteeism at Work dataset, each chosen to answer a specific business question. Rather than building one chart and refining it, we will build several — each using a different chart type from Chapter 7 — because different questions call for different visual encodings. Along the way, we will revisit the design principles from Chapter 7 as we make deliberate choices about axes, color, faceting, and layout.
Chapter Goals
Upon concluding this chapter, readers will be able to:
- Match a business question about employee absenteeism to an appropriate chart type (bar chart, histogram, box plot, heat map).
- Build the matching visualization in
ggplot2using the layered grammar of graphics introduced in Chapter 7. - Apply design principles — clear encoding, faceting, scale choice — to refine a first-draft chart into a publishable one.
- Read patterns from a chart and translate them into business-relevant observations about when, where, and how absenteeism occurs.