-
Book Overview & Buying
-
Table Of Contents
The Data Visualization Workshop
By :
Comparison plots include charts that are ideal for comparing multiple variables or variables over time. Line charts are great for visualizing variables over time. For comparison among items, bar charts (also called column charts) are the best way to go. For a certain time period (say, fewer than 10-time points), vertical bar charts can be used as well. Radar charts or spider plots are great for visualizing multiple variables for multiple groups.
Line charts are used to display quantitative values over a continuous time period and show information as a series. A line chart is ideal for a time series that is connected by straight-line segments.
The value being measured is placed on the y-axis, while the x-axis is the timescale.
The following diagram shows a trend of real estate prices (per million US dollars) across two decades. Line charts are ideal for showing data trends:
Figure 2.1: Line chart for a single variable
The following figure is a multiple-variable line chart that compares the stock-closing prices for Google, Facebook, Apple, Amazon, and Microsoft. A line chart is great for comparing values and visualizing the trend of the stock. As we can see, Amazon shows the highest growth:
Figure 2.2: Line chart showing stock trends for five companies
Note
For plots with multiple variables, a legend should be given to describe each variable.
In a bar chart, the bar length encodes the value. There are two variants of bar charts: vertical bar charts and horizontal bar charts.
While they are both used to compare numerical values across categories, vertical bar charts are sometimes used to show a single variable over time.
The following diagram shows a vertical bar chart. Each bar shows the marks out of 100 that 5 students obtained in a test:
Figure 2.3: Vertical bar chart using student test data
The following diagram shows a horizontal bar chart. Each bar shows the marks out of 100 that 5 students obtained in a test:
Figure 2.4: Horizontal bar chart using student test data
The following diagram compares movie ratings, giving two different scores. The Tomatometer is the percentage of approved critics who have given a positive review for the movie. The Audience Score is the percentage of users who have given a score of 3.5 or higher out of 5. As we can see, The Martian is the only movie with both a high Tomatometer and Audience Score. The Hobbit: An Unexpected Journey has a relatively high Audience Score compared to the Tomatometer score, which might be due to a huge fan base:
Figure 2.5: Comparative bar chart
Radar charts (also known as spider or web charts) visualize multiple variables with each variable plotted on its own axis, resulting in a polygon. All axes are arranged radially, starting at the center with equal distances between one another, and have the same scale.
The following diagram shows a radar chart for a single variable. This chart displays data about a student scoring marks in different subjects:
Figure 2.6: Radar chart for one variable (student)
The following diagram shows a radar chart for two variables/groups. Here, the chart explains the marks that were scored by two students in different subjects:
Figure 2.7: Radar chart for two variables (two students)
The following diagram shows a radar chart for multiple variables/groups. Each chart displays data about a student’s performance in different subjects:
Figure 2.8: Radar chart with faceting for multiple variables (multiple students)
In the first section, we learned which plots are suitable for comparing items. Line charts are great for comparing something over time, whereas bar charts are for comparing different items. Last but not least, radar charts are best suited for visualizing multiple variables for multiple groups. In the following activity, you can check whether you understood which plot is best for which scenario.
You are given scores of four employees (Alex, Alice, Chris, and Jennifer) for five attributes: efficiency, quality, commitment, responsible conduct, and cooperation. Your task is to compare the employees and their skills. This activity will foster your skills in choosing the best visualization when it comes to comparing items.
The following diagram shows a bar chart for the employee skills:

Figure 2.9: Employee skills comparison with a bar chart
The following diagram shows a radar chart for the employee skills:

Figure 2.10: Employee skills comparison with a radar chart
Note
The solution for this activity can be found via this link.
Concluding the activity, you hopefully have a good understanding of deciding which comparison plots are best for the situation. In the next section, we will discuss different relation plots.
Change the font size
Change margin width
Change background colour