Chapter 6. Visualizing Amounts

In many scenarios, we are interested in the magnitude of some set of numbers. For example, we might want to visualize the total sales volume of different brands of cars, or the total number of people living in different cities, or the age of Olympians performing different sports. In all these cases, we have a set of categories (e.g., brands of cars, cities, or sports) and a quantitative value for each category. I refer to these cases as visualizing amounts, because the main emphasis in these visualizations will be on the magnitude of the quantitative values. The standard visualization in this scenario is the bar plot, which has several variations, including simple bars as well as grouped and stacked bars. Alternatives to the bar plot are the dot plot and the heatmap.

Bar Plots

To motivate the concept of a bar plot, consider the total ticket sales for the most popular movies on a given weekend. Table 6-1 shows the top five highest-grossing films for the weekend before Christmas in 2017. Star Wars: The Last Jedi was by far the most popular movie on that weekend, outselling the fourth- and fifth-ranked movies, The Greatest Showman and Ferdinand, by almost a factor of 10.

Table 6-1. Highest-grossing movies for the weekend of December 22–24, 2017. Data source: Box Office Mojo. Used with permission.
Rank Title Weekend gross

1

Star Wars: The Last Jedi

$71,565,498

2

Jumanji: Welcome to the Jungle

$36,169,328

3

Pitch Perfect 3

$19,928,525

Get Fundamentals of Data Visualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.