Why Charts? — Data Visualization

A chart is a picture made from numbers. A table is good for looking up one exact number, and a chart is good for seeing a pattern, for example which month had…

Hannah and her younger brother, Owen, run Leafy Corner, a small coffee shop that sells in the shop and by delivery. Six months of its orders are already tidy in a spreadsheet and a database. This category teaches the next step: turning numbers into a chart (a picture made from numbers) that answers a question, and then putting several charts together into a dashboard.

You do not need to code in this category. The site draws the charts on this page from the shop's data, and every chart has a Show the table button for the numbers behind it.

A table or a chart?

This is Leafy Corner's revenue per month. Try to answer from the table: which month is the lowest, and how far below the other months is it?

Month Revenue
January $2,024.54
February $2,216.22
March $1,598.60
April $2,062.10
May $2,531.85
June $2,425.35

Now the same numbers as a bar chart, one bar per month:

(chart picture)

March is the shortest bar at a glance. In the table, you have to read six numbers one by one and compare them in your head. In the chart, your eyes compare the lengths of the bars, and that is much faster.

The table is still useful. When you need the exact number, for example March's revenue of $1,598.60, the table is the better tool. So a table is for looking up one number, and a chart is for seeing a pattern.

Anscombe's quartet

In 1973 the statistician Francis Anscombe made four small sets of data. Each set holds 11 pairs of numbers, x and y. The summary numbers of all four are the same, to two decimal places:

Summary number Value
Mean of x 9
Mean of y 7.50
Correlation of x and y 0.82
Regression line y = 3.00 + 0.50x

The statistics category covers correlation and the regression line. In short, a correlation of 0.82 means y tends to rise when x rises, and the regression line is the straight line that lies closest to the points.

From those numbers, the four sets sound the same. But when each pair is drawn as one point, the shapes are very different:

The lesson: the same summary numbers can come from very different shapes of data. Draw the data first, then summarise it.

One average, two groups

Leafy Corner has a case like this of its own. The shop's survey asks customers how many minutes they waited for their order. Across 488 answers, the mean is 22.7 minutes and the median is 24 minutes. From those two numbers, it is easy to picture most customers waiting about 20 minutes.

The chart below is a histogram: a chart that counts how many answers fall into each 10-minute range and draws each count as a bar.

(chart picture)

The histogram has two piles:

The mean of 22.7 minutes mixes two groups of customers, so it describes neither of them. The median for customers in the shop is 5.5 minutes, and for delivery customers it is 29 minutes. Without the chart, you would not know there are two groups. The lesson Histograms and Box Plots covers histograms in more depth.

What a chart is for

A good chart always starts from a question. The next lesson covers how to pick a chart from its question.

⚠️ Common mistakes

TL;DR: A chart is a picture made from numbers. A table is good for looking up one exact number, and a chart is good for seeing a pattern, for example which month had the lowest revenue. Anscombe's quartet is four sets of data with the same mean, correlation and regression line that look very different when drawn. Leafy Corner has its own example: the mean wait is 22.7 minutes, yet a histogram (a chart that counts how many answers fall into each range of minutes) shows two piles, under 10 minutes and from 20 to 40 minutes. So draw the data first, then summarise it, and start every chart from its question.

⚡ A table or a chart

Guess first: Hannah has six months of revenue in a table and wants to know which month is the lowest. Which answers faster: the table of numbers or a bar chart of them?

The bar chart. Your eyes compare the lengths of bars faster than they read six numbers one by one. In the chart of Leafy Corner's revenue, the March bar is clearly the shortest.

Meaning: A table is for looking up one exact number, for example March's revenue of $1,598.60. A chart is for seeing a pattern, for example which month is the lowest.

⚡ Anscombe's quartet

Guess first: four sets of data have exactly the same mean, correlation and regression line. Do their pictures have to look alike?

No. Anscombe's quartet is four sets like that. Drawn as points, one spreads around a straight line, one curves, one is a straight line with one point far above it, and one is stacked at a single value of x with one point on its own.

Meaning: The same summary numbers can come from very different shapes of data. Draw the data before you summarise it.

⚡ An average that misleads

Guess first: the mean wait across 488 answers to Leafy Corner's survey is 22.7 minutes. Do most customers wait about 20 minutes?

No. The histogram, a chart that counts the answers in each 10-minute range, has two piles: 164 answers under 10 minutes (customers in the shop) and 240 from 20 to under 40 minutes (almost all delivery). From 10 to under 20 minutes there are only 34 answers.

Meaning: The mean mixes two groups of customers. A chart shows the shape of the data, so you know when one summary number misleads.

What you will learn