Learn to Create a Pictorial Unit Chart in R With From Our World in Data (2018)

© 2021 SAGE Publications, Ltd. All Rights Reserved. This PDF has been generated from SAGE Research Methods Datasets. SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018)

Student Guide

Introduction This guide explores creating a chart, also known as a pictorial unit chart, visualizing total global energy consumption subdivided by region. Pictorial unit charts are used to visualize the division of a whole into subparts and enable the reader to roughly compare the distribution of individual units within the set. The pictorial unit chart uses mostly shape and color to encode the value.

The visualization in this tutorial uses data from Our World in Data about global energy consumption. The individual pictorial units represent 1,000 terawatt-hours of energy consumption each and are grouped by continent, and then color-coded by energy source type (Figure 1).

The chart consists of a grid with three types of pictorial units for each continent. Text reads, “1 unit equals 1,000 terawatt-hours.” The pictorial unit for coal is a solid circle, the pictorial unit is an icon of a wedged flame, and the pictorial unit for oil is an icon of a gas station pump. The data from the chart are tabulated below.

Continent Coal Natural gas Oil

Asia 33 units 8 units 20 units

Europe 4 units 5 units 9 units

Page 2 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization

North America 4 units 10 units 13 units

Text under the chart reads, “Source: Our World in Data, 2018.”

Figure 1. A Pictogram Chart of Select Energy Consumption by Type and Continent

What Is a Pictogram or Pictorial Unit Chart? A pictorial unit chart, also known as a pictogram chart or isotype chart, consists of a variety of shapes or glyphs representing absolute value—for example, a chart where each house symbol represents 100 households. The chosen glyphs can be abstract shapes such as circles or squares, but in most cases, self-explanatory are used. Generally speaking, pictograms are simple images that resemble and represent an object or concept.

The individual elements can be freely organized on the picture plane, though sometimes also the relative locations of elements convey some information. Grouping elements that belong to the same set into rows of equal width makes the whole considerably easier to visually evaluate.

Why Use a Pictorial Unit Chart Pictorial unit charts can be used with many of the same datasets as pie charts

Page 3 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization or 100% stacked bar charts to present the distribution of parts within a whole. In its most basic form, the pictogram chart can also just represent a single quantity broken up into visual units.

The benefit of the pictogram chart is that it emphasizes the parts that make up a whole, for example, highlighting how many individual units of a certain kind exist within a group of units, while the pie or is more adept at showing the series of values that make up an amorphous consolidated whole. Pie and donut charts are to some extent more precise, as pictorial unit charts often involve rounding values, but the pie and donut charts are significantly more difficult to visually evaluate due to their reliance on angle and area to encode the value.

The pictorial unit chart can also communicate some additional qualitative information through glyph choice that is usually omitted in other chart types.

Considerations and Cautions Some maintain that pictorial unit charts oversimplify issues and introduce unnecessary visual clutter—but, on the other hand, understanding these charts is often much easier for the general public compared to other chart types. The audience as well as the general complexity of the issue being portrayed should always be considered when choosing a chart type.

Pictorial unit charts should only make use of full and half glyphs, as visually assessing smaller subparts of nonuniform shapes is not particularly reliable. Depending on the pictorial unit chosen, for example, with people, rounding values, and using only whole glyphs makes for less disconcerting visuals.

Classification Pictorial unit charts are most often classified, in that the individual glyphs represent units in a one-to-many schema, that is, a number of recordings or

Page 4 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization percentage points are aggregated into one visual unit. The choice to classify units, and how to classify them, will depend very much on the dataset at hand. Generally, classified charts can provide a simpler visual but can be somewhat more difficult for readers to assess correctly.

The one-to-one unclassified version can also be called a waffle chart provided that the visual units are rectangles or squares.

Coloring Color scales, if used, are most often qualitative in pictorial unit charts. On a qualitative color scale, colors usually represent objects that belong to different groups or categories. The goal with a qualitative color scale is usually to create a color palette in which different colors are easily distinguishable, that is to say, relying heavily on major differences in hue.

Pictorial unit charts usually make use of qualitative color scales with distinguishable colors for each category of glyphs. It is also possible to mark different groups with direct labels. Additional colors or markings can be used to mark subgroups or to emphasize points of interest.

Quantitative color scales, on the other hand, which do not usually apply in the case of proportional symbol charts, often make use of variation in the lightness of color to show variation in value. Generally, as the value of a variable increases, so does the contrast between the color and its background. Using a quantitative color scale to reinforce the value of relationships in pictogram charts is not recommended (Figure 2).

The color scales shown in the image are listed as follows:

• Qualitative scale: This scale has boxes of markedly different colors. • Quantitative scale

Page 5 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization • Single-hue scale: This scale has boxes of same color but of increasing brightness. • Multi-hue scale: This scale has boxes of varying hue. • Diverging scale: This scale has boxes of different colors at each end, with a series of neutral-colored boxes between them.

Figure 2. Color Palette Examples: Qualitative, and Quantitative Single-Hue, Multi-Hue, and Diverging

Establishing good color contrast is overall a good practice, keeping in mind readers with differences in color vision. Whenever possible, it is recommended to check chosen color palettes through some form of simulated preview to see what the result looks like for readers with deuteranopia, protanopia, or other differences in color vision (e.g., within Adobe image and vector editing software with different Proof Setups or with online resources such as the Coblis simulator).

Labeling Labels are used in pictorial unit charts to identify subcategories by name, or present quantity or percent values. Sometimes color or glyph assignments are seen listed in a separate legend, but it is always preferable to label in direct proximity to the elements in question, thus removing one visual “step” in checking back and forth between the chart and the legend. In general, with most visualization types, any labels should be positioned as close as possible to the elements they refer to.

Page 6 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization

Variations and Alternatives A type of variant of the pictorial unit chart is the waffle chart, where instead of custom pictograms, the units are represented by rectangles or squares of equal size. Overall, waffle charts are a cell grid of any size, where each cell represents some predefined portion of a whole. Often these are rendered using a 10 × 10 grid where each unit represents 1% of the 100% total, but variants also exist where the number of cells is equal to the total quantity represented, for example. Cells within the grid are colored or shaded to represent a certain portion of a whole and sometimes are displayed in a series of colors to differentiate various subgroups within the whole. Waffle charts are most often unclassified, in that each rectangle represents one unit of the whole.

Waffle charts can be used with many of the same datasets as pictorial unit charts, or pie or donut charts to present the distribution of parts within a whole. The benefit of the waffle chart, like the pictorial unit chart, is that it emphasizes the individual parts that make up a whole (Figure 3).

The chart consists of a grid of colored squares for each continent, each color corresponding to an energy source. Text reads, “1 square = 1,000 terawatt-hours.” The data from the chart are tabulated below.

Continent Coal Natural gas Oil

Asia 33 squares 8 squares 20 squares

North America 4 squares 10 squares 13 squares

Europe 4 squares 5 squares 9 squares

Text under the chart reads, “Source: Our World in Data, 2018.”

Figure 3. A Waffle Chart

Page 7 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization

The pie or donut chart is a common chart type used to show the division of a whole into subparts and very familiar to readers (Figure 4). These charts are best used for rough approximations of part distribution rather than precise quantifiable comparisons, as all charts that rely on visual assessment of angles and areas, reading of pie charts is somewhat inaccurate by nature. For this reason, many

Page 8 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization people avoid pie charts altogether, but the difficulty in visual evaluation can be surmounted to some extent by choosing the donut chart variant and by ensuring that the slices being compared are noticeably of different sizes. Complete accuracy in visual assessment of these types of charts is, however, not particularly feasible.

The data from the are tabulated below.

Source Percentage Consumption in TWh

Oil 37.1 54,220

Coal 30.1 43,869

Natural Gas 26.4 38,489

Hydropower 2.9 4,193

Nuclear 1.9 2,701

Wind, solar, other renewables 1.7 2,480

Text under the charts reads, “Source: Our World in Data, 2018.”

Figure 4. A Pie Chart

Page 9 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization

A common and useful variant of the pie chart is the donut chart, in which the central circular section of the pie is removed to create a ring of slices. A good rule of thumb for the thickness of the donut ring is 40% of the outer radius of the original pie chart—though generally, any size will do as long as the ring is not too thin for slices to be clearly distinguishable.

This modification to a ring form allows for easier visual evaluation of slices by arc length and surface area, rather than by central angle and area in the traditional pie chart. Using arc length as a basis of assessment in this manner is particularly useful for a more accurate appraisal of small slices.

A 100% stacked bar chart is also often used to show the subdivision of a total value for data points on a qualitative scale on the vertical axis and is another visualization type familiar to readers (Figure 5). A stacked bar chart can be useful for relatively exact appraisals of differences between totals and giving a good visual overview of how these totals are subdivided into two or more categories.

The horizontal axis ranges from 0% to 100%, in increments of 20. The vertical axis lists regions. The approximate data from the chart are tabulated below.

Page 10 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization

Region Percentage of oil Percentage of coal Percentage of natural gas

Commonwealth of Independent States 22 18 60

Asia Pacific 32 54 14

Africa 45 24 31

Middle East 46 1 53

North America 47 15 33

Europe 48 20 22

Asia Pacific 63 7 30

Text under the chart reads, “Source: Our World in Data, 2020.”

Figure 5. A 100% Stacked Bar Chart

Generally, the horizontal version of a stacked bar chart is not interchangeable

Page 11 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization with the vertical bar chart, which is used to display time series and serves as an alternative to the line chart. Occasionally, a categorical variable might be used on a vertically stacked bar chart, if the number of data points is limited (two to four categories).

Illustrative Example: Energy Consumption of Oil, Coal, and Natural Gas by Continent in 2018 Figure 6 shows a pictorial unit chart of oil, coal, and natural gas consumption subdivided by region, using data from Our World in Data. The pictogram chart gives an easy at-a-glance impression of general volumes of consumption as well as the types of energy sources consumed.

The chart consists of a grid with three types of pictorial units for each continent. Text reads, “1 unit equals 1,000 terawatt-hours.” The pictorial unit for coal is a solid circle, the pictorial unit is an icon of a wedged flame, and the pictorial unit for oil is an icon of a gas station pump. The data from the chart are tabulated below.

Continent Coal Natural gas Oil

Asia 33 units 8 units 20 units

Europe 4 units 5 units 9 units

North America 4 units 10 units 13 units

Text under the chart reads, “Source: Our World in Data, 2018.”

Figure 6. A Pictogram Chart of Select Energy Consumption by Type and Continent

Page 12 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization

Pictorial units are grouped according to the region and colored based on the energy source type. A simple qualitative color scheme was used to distinguish these various energy sources. The headline clarifies the topic and scope of the visualization.

The Data The dataset used in this demonstration is the Global primary energy consumption OWID_WRL dataset from Our World in Data. The dataset comprises primary energy consumption 1965–2018 by continental regions and countries. Primary energy consumption shows how much coal, oil, gas, and other energy are consumed as inputs to the energy system of a country or region, including distribution but excluding energy carriers used for other purposes (such as petroleum for making plastic).

Primary energy consumption is the basic or “raw” form of energy statistics: it does not take into account the inefficiencies of converting fossil fuels to final energy.

The dataset only includes commercially traded fuels (coal, oil, and gas), nuclear, and modern renewables. Traditional biofuels are not included, which are the primary sources of fuel in much of the developing world.

Interpreting the Chart

Page 13 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization The pictorial unit chart created through this demonstration shows a brief overview of select energy source consumption by region in the year 2018. The data showed that the Asia Pacific region consumes considerably more of these three chosen energy sources than the two other regions chosen for comparison, North America and Europe. This can likely be accounted for by the considerable differences in population in these regions. Interestingly, however, the region also uses the most coal as a proportion of its total consumption, while North America and Europe seem primarily reliant on oil. Natural gas—as a proportion of total consumption—seems to be favored more in these two other regions as well but makes up only a relatively small portion of the Asia Pacific energy source consumption. It is overall apparent at a glance which regions consume the most or least of any individual energy source, as well as visually comparing the number of individual units between the different sets.

As is common in this type of summary chart, the geographical groupings can be a source of ambiguity. The reader cannot know exactly which countries are included in which group, as there are different ways of dividing countries by continent. If a publication includes this type of grouping, it is helpful to provide a or showing how the countries are classified.

The pictorial unit chart is generally useful for these types of simple comparisons, or for pointing out anomalies within the dataset. This chart in itself, however, tells primarily of the vast quantities involved in the consumption of certain sources of energy, rather than any other particular insights, however. The same information presented as per capita figures would be an interesting comparison, or a breakdown of individual countries within these regions by their energy source preferences, or even the inclusion of renewable energy sources within the general comparison scope. We invite you to experiment with this code to bring out other facets of the dataset.

Page 14 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018) SAGE SAGE Research Methods: Data 2021 SAGE Publications, Ltd. All Rights Reserved. Visualization

Review This dataset example has demonstrated the pictogram chart, also known as a pictorial unit chart, how it can be used, and how it compares to other visualization types for use with similar data. A subset of global energy consumption data from Our World in Data dataset was visualized.

You should know:

• What are pictorial unit charts? • What kind of data can a pictorial unit chart encode? • When is a pictorial unit chart an appropriate visualization choice? • What are the best practices for composing pictorial unit charts? • What are the main weaknesses and limitations of this visualization method?

Your Turn You may now proceed to download the sample dataset and walkthrough guide on how to carry out the visualization with the R statistical software. The sample dataset includes a number of interesting variables that can be used to augment the example pictured above. You may, for example, experiment with visualizing different continents or areas, more unit charts at once, or different energy sources.

Page 15 of 15 Learn to Create a Pictorial Unit Chart in R With Data From Our World in Data (2018)