DATA SCIENCE · CYCLE 1 · L3 · TEXTBOOK CHAPTER
Choosing the Right Chart
Every chart is a tool with a job. A line’s job is showing change. A bar’s job is putting groups side by side. Start with the job. The picture comes second.
After this chapter, you can
- Read a claim and name the job before naming a chart.
- Pick a chart that does the job and defend it in one sentence.
- Run the move backward: from a chart to its job.
- Show with arithmetic what a pie and a bar of an average throw away.
Why It Matters
Pick a picture first and force the numbers into it, and you usually delete the exact thing you were trying to say. The charts you use most were each invented to do one job.
In 1786 William Playfair, a Scottish engineer, printed a book of charts about trade. Chart after chart follows England’s trade with one place, year after year. For those he drew lines across time.
Then he came to Scotland. His chart of Scotland’s trade covers one year only, from Christmas 1780 to Christmas 1781, with 17 places. One year has no change to show, so a line had no job to do. Playfair drew bars: two for each place, one for the goods coming in and one for the goods going out. It was his first bar chart. He wrote that it “does not comprehend any portion of time.” In today’s words, it covers no stretch of time.
In 1801 he had a third job. The Turkish Empire had land in three parts of the world: Europe, Asia and Africa. To show each part as a share of the whole, he cut a circle into slices. Friendly and Wainer call it the first pie chart.
| What a reader had to see | The job, in the poster’s words | What Playfair drew |
| How England’s trade with one place changed, year after year | Data Over Time | a line |
| How Scotland’s trade with 17 places compared, in one year | Comparisons | bars |
| What share of one empire was in each of three parts of the world | Proportions | a circle cut into slices |
Three things to show, three jobs, three pictures. Each time the job came first.
The Idea
The job comes first
Start with the job. The picture comes second. The job is the one thing the claim needs a reader to see. The poster calls the jobs functions.
| Function | The claim asks | A chart that does the job |
| Comparisons | Which group is bigger, by how much? | bar chart |
| Proportions | What share of one whole is each? | pie or stacked bar |
| Data Over Time | How did one thing change, in order? | line chart |
| Relationships | Do two measurements move together? | scatter plot |
| Distribution | Where do the values pile up? | histogram or dot plot |
| Range | How far apart are the two ends? | box plot or dot plot |
A defense is one sentence that names the job and ties it to the claim.
A claim is a sentence that says what the data shows. You find the job by reading the claim. The data table comes after.
The wall poster and the chart chooser list 41 charts against 13 functions: Comparisons, Proportions, Relationships, Hierarchy, Location, Distribution, Patterns, Range, Data Over Time, Analyzing Text, Movement/Flow, Financial and Uncertainty/Error. The six in the table cover nearly every claim in this course. A claim about where things are needs Location. A claim that a number could be off by a lot needs Uncertainty/Error. You do not have to know all 41 charts. Start from the job, and the poster or the chooser gives you the charts that do it.
Two checks pick a chart. The variable type rules some charts out: no line through categories, no mean of a nominal variable. The job picks among what is left. L4 names the variable types.
A dot plot is on no poster row. It is a chart of one number, like a histogram or a box plot. A dot plot does the Histogram’s jobs, Distribution and Range, and keeps every value.
A Defense Names the Job
| A sentence about the chart | Is it a defense? |
| “A bar chart, because it is clear and easy to read.” | No. Every chart is easy to read when it fits. Which job? |
| “A pie chart, because there are five categories.” | No. A count of categories is no job. |
| “The claim is about how one number changed month to month, so the job is Data Over Time, and a line chart keeps the months in order.” | Yes. It names the job and ties it to the claim. |
Many claims have more than one good chart. A dot plot does Distribution and Range. A line chart does Data Over Time and Patterns. So a pick is judged by its defense.
A Real Comparison
Five colleges, one scale. The eye ranks the bars without reading a number: UVA 16.9%, George Mason 88.8%. Source: US Department of Education, IPEDS survey ADM2023. Mr. Case computed each rate: admitted divided by applied.
The figure’s claim is that UVA admitted the smallest share of its applicants of these five colleges. The claim asks which group is bigger, so the job is Comparisons. A bar chart lines the five groups up on one scale.
Read a Chart Type Backward
Knowing a chart’s job lets you spot the misuse. Every chart has a job it does well and a job people wrongly give it.
| Chart | Job it does well | Job people wrongly give it |
| Pie chart | Proportions: parts of one whole | Data Over Time, or Comparisons among many slices of similar size |
| Line chart | Data Over Time, and Patterns | Comparisons across categories that are not a sequence. The line claims the space between two points means something. |
| Scatter plot | Relationships: whether two measurements move together | Proof of cause. Moving together is no proof that one caused the other. |
Five countries, twelve years each: 60 dots. The job is Relationships, so each dot stands on its own and no line joins them. Source: Our World in Data, Life expectancy vs. GDP per capita, 2000 to 2011, the L5 dataset.
In a scatter plot each dot is one case. The reader looks for whether the dots rise or fall together. Here the dots rise: more income per person, longer lives. The dots show that two measurements move together. They do not show that one made the other happen.
Worked Examples
Example 1 · Same six numbers, two charts. Claim: “My screen time climbed all fall and peaked over winter break.” Average daily screen time, in hours: Sep 3.1, Oct 3.4, Nov 3.8, Dec 4.6, Jan 4.2, Feb 3.9. The phone’s Screen Time app shows a donut, so a donut is what most people picture. Pick the chart. Then show with arithmetic what the other chart hides.
Same six numbers. The line does the job the claim asked for. The pie does a different job, Proportions, and the claim never asked for it. The numbers are made up for this lesson.
Create a strategyRead the claim for the job before you think about any chart. Then test the other chart with arithmetic: a pie turns each month into a share of the total, its hours ÷ the total.
Apply the idea
The claim is about a sequence: six months in order, and a peak. The job is Data Over Time, so the chart is a line chart, time across.
Now the pie. The six add to 23.0 hours. December’s slice is 4.6 ÷ 23.0 = 0.200, so 20.0%. September’s slice is 3.1 ÷ 23.0 = 0.135, so 13.5%.
| Month | Hours | Slice |
| Sep | 3.1 | 13.5% |
| Oct | 3.4 | 14.8% |
| Nov | 3.8 | 16.5% |
| Dec | 4.6 | 20.0% |
| Jan | 4.2 | 18.3% |
| Feb | 3.9 | 17.0% |
| Add | 23.0 | 100.1% |
The slices add to 100.1% because each one was rounded. The biggest slice and the smallest are 20.0 − 13.5 = 6.5 points apart. December and January are 20.0 − 18.3 = 1.7 points apart. Nobody can see that gap on a pie.
The line shows the climb right away: 4.6 ÷ 3.1 = 1.48, so December was 48% higher than September.
Reflect and checkSix slices between 13.5% and 20.0% all look about the same size. The pie has no way to say that December was the peak, and no way to show that the months are in order. Six months form a sequence, and a sequence has no whole to be part of. The picture threw away the only thing the claim was about.
Defense: “The claim is about a climb and a peak, so the job is Data Over Time, and a line chart keeps the months in order.”
When you build the line chart in Sheets, title it with what the numbers did, and keep the who and the when in it: My average daily screen time peaked in December, September to February.
Pies are right for some claims. Take this one: “Of everything my household threw away last week, food scraps were the biggest single share.” It is about parts of one whole. There are few categories, and one slice is clearly the biggest. That job is Proportions, and a pie chart does it.
Example 2 · A bar of an average. Claim: “The 4:15 bus is unpredictable. Most days I wait about four minutes. Every couple of weeks I wait almost twenty.” Ten mornings of waits, in minutes: 2, 3, 3, 4, 4, 5, 6, 14, 16, 18. Most students answer “a bar chart of the average.” Do the arithmetic before you agree.
Left, the bar of the average. Right, every morning. The dashed line is the mean at 7.5, and no dot sits on it. The numbers are made up for this lesson.
Create a strategyFind the three numbers that could stand for the ten mornings: the mean, the median and the range. Then count the mornings that match the bar.
Apply the idea
The mean is the sum divided by the count: 2 + 3 + 3 + 4 + 4 + 5 + 6 + 14 + 16 + 18 = 75, and 75 ÷ 10 = 7.5 minutes.
The median is the middle of the sorted list, or halfway between the middle two. With ten values the middle two are 4 and 5: (4 + 5) ÷ 2 = 4.5 minutes.
The range is the biggest value minus the smallest: 18 − 2 = 16 minutes.
Seven mornings were at or under 6 minutes. Three were 14 or more. On how many mornings was the wait 7.5 minutes? Zero.
Reflect and checkThe mean sits in the empty gap between the two groups. A bar at 7.5 shows a number that never happened, and it hides what the claim said: the wait is unpredictable.
The claim’s job is Range, or Distribution. The poster lists both. A dot plot of all ten mornings shows the pile at 2 to 6, the three bad mornings, and the gap between them. The mean and the median describe the center. The range describes the spread.
Check it in Sheets: type the ten waits in A1 to A10, then =AVERAGE(A1:A10) in C1 and =MEDIAN(A1:A10) in C2. They show 7.5 and 4.5.
Example 3 · Find what is wrong with a chart. Claim: “In our class, students who sleep more hours tend to report lower stress.” A pair sorts eight students by hours of sleep and draws a line through them. Say what is wrong, and what chart does the job.
Eight students, each with hours of sleep and stress from 1 to 10: (5, 8), (6, 7), (6, 9), (7, 5), (7, 6), (8, 4), (8, 5), (9, 3). The numbers are made up for this lesson.
Create a strategyAsk two questions. First, what job does the claim need? Second, what does the chart’s shape claim on its own? A line claims that the points are a sequence, and that the space between two points means something.
Apply the idea
Each point is a different person. A line from a 6-hour student to a 7-hour student claims something about a student who sleeps 6.5 hours, and no such student exists.
The claim asks whether two measurements move together. The job is Relationships, and the chart is a scatter plot: eight dots, hours across, stress up, no line joining them.
Reflect and checkCheck the other common wrong answer: two bars of means. One bar is for the students who sleep more, and one is for the students who sleep less. Two bars keep 2 numbers of the 8 students. They turn a relationship into a comparison the claim never made.
Then check the scatter plot for its own misuse. Dots falling from left to right show that sleep and stress move together. They do not show that sleeping more lowers stress. Stressed students may sleep less.
Try It: The Chart Chooser
The chart chooser is the wall poster as a web page. It asks what you are trying to show, then lists the charts that do that job.
- Open the chart chooser.
- Click Data Over Time. It lists 8 charts. Find Line Graph.
- Click Comparisons too. Now it lists the 4 charts that do both jobs.
- Click Data Over Time again to clear it.
- Click Comparisons again to clear it.
- Click Proportions. Find Pie Chart. Proportions is the only job it has.
- Scroll down to The whole matrix. The functions run along the top as columns, and the charts run down the side as rows. Find a function’s column, run down to each ×, then read left to the chart’s name.
The chooser uses the poster’s names. Under each name it says where you can build the chart: in Sheets, in Python, or in both. L5 teaches the steps in Sheets.
| This chapter says | The poster and the chooser say | Chart type in Sheets |
| line chart | Line Graph | Line chart |
| bar chart | Bar or Stacked Bar Graph | Column chart (bars standing up), Bar chart (bars lying on their side) |
| scatter plot | Scatterplot | Scatter chart |
| pie chart | Pie Chart | Pie chart |
| histogram | Histogram | Histogram chart |
| box plot | Box and Whisker Plot | none; Python |
Sheets has no dot plot and no box plot on its list.
The Same in Python
Python comes in L19b, in Cycle 2. Once you have read it, come back and run Example 2’s ten mornings here.
In Sheets this is: =AVERAGE(A1:A10) and =MEDIAN(A1:A10).
In English:
- Get the pandas toolbox and call it pd.
- Make a column of the ten numbers, and call it waits.
- Print the mean of waits.
- Print the median of waits.
Predict: Example 2 found both by hand. What will lines 3 and 4 print? Then change the 18 to 48, say which line will change more, and run it again.
Can’t run it here? Show what it prints
7.5
4.5
With 48 in place of 18 it prints 10.5 and 4.5. One long wait moved the mean by 3 minutes. The median stayed.
In your project
Your Cycle 1 project is a month of your own data in one Google Sheet, with RAW, CLEAN, CLEANING LOG and ABOUT tabs. Its charts go into a one-page Google Doc that tells the story.
Every chart in that Doc starts from a claim. Read the claim, name the job, then pick the chart. THE SHAPE of your question points to the job.
| THE SHAPE | Job (function) | In Sheets |
| A trend over time | Data Over Time | Line chart |
| A comparison between groups | Comparisons | Column chart, or Bar chart when the names are long |
| Two numbers together | Relationships | Scatter chart |
| A single number | Data Over Time, for now | A Line chart of your days in order |
A label or a 1 to 5 rating gets a Column chart of counts: one bar for each label, and no line through the ratings.
The Data Cycle Rubric asks that every chart’s type fits the job. Be ready to defend each chart in one sentence that names the job.
Check Yourself
Answer each one before you look. The first two are from L1 and L2, so you keep them.
A student asks: “Over four weeks, do I sleep more hours on weekend nights than on school nights?” What is THE SHAPE of the answer? L1
The question sets two groups of nights side by side: weekend nights and school nights. That is a comparison between groups. “Over four weeks” says when the data is collected, and it makes no trend. A single number cannot answer “more than”. In this chapter THE SHAPE points to the job: a comparison between groups is Comparisons.
A library lent 480 books in September and 600 in October. Find the percent change. L2
New minus old: 600 − 480 = 120. Divide by old: 120 ÷ 480 = 0.25. Times 100: 25%, an increase. Dividing by 600 gives 20%. That puts the new value on the bottom, and the bottom is always the starting value.
Claim: “Rent takes the biggest share of my family’s spending each month.” Which function does the claim need?
The claim is about one share of one whole: a month of spending. That is Proportions, and a pie chart or one stacked bar does the job. Comparisons sets separate groups side by side, and here the pieces are parts of one total. Relationships needs two measurements for each case, and this claim has one.
Claim: “My daily steps climbed all spring and peaked in June.” Average daily steps, in thousands: Mar 7.0, Apr 7.5, May 8.0, Jun 9.5, Jul 9.0, Aug 9.0. The six add to 50.0. As a pie, what percent is June’s slice?
9.5 ÷ 50.0 = 0.19, so 19%. March’s slice is 7.0 ÷ 50.0 = 0.14, so 14%. Six slices between 14% and 19% look about the same size, and a pie has no order. The job is Data Over Time, so the chart is a line chart. The line shows the climb: 9.5 ÷ 7.0 = 1.36, so June was 36% higher than March.
Eight pizza deliveries took 18, 20, 21, 22, 24, 25, 48 and 54 minutes. Someone draws one bar at the mean. At how many minutes does the bar stand?
18 + 20 + 21 + 22 + 24 + 25 + 48 + 54 = 232, and 232 ÷ 8 = 29 minutes. No delivery took 29 minutes. Six took 25 minutes or less, and two took 48 or more. The bar shows a number that never happened.
The same eight deliveries. Claim: “Delivery is usually quick, but some nights it takes twice as long.” Which chart does the job?
The claim is about how far apart the deliveries are, so the job is Range, or Distribution. A dot plot shows the pile at 18 to 25, the two long nights, and the gap between them. The median is (22 + 24) ÷ 2 = 23 minutes, and the range is 54 − 18 = 36 minutes. One bar at 29 hides all of that. A pie does Proportions, and this claim has no whole to cut into slices.
Each sentence gives a chart a job. Which sentence gives the chart a job it cannot do?
A pie chart does Proportions: parts of one whole. It has no order, so it cannot show a climb, a fall or a peak. People wrongly give it Data Over Time. A line chart does Data Over Time. A scatter plot does Relationships: whether two measurements move together.
Claim: “The price of a school lunch rose every year from 2019 to 2026.” Which sentence is a defense of the chart?
A defense is one sentence that names the job and ties it to the claim. Only one of these names a job: Data Over Time, with the years in order. “Easy to read” names no job, because every chart is easy to read when it fits. Eight rows is a fact about the table, and it names no job.
Open the chart chooser. Click Distribution, then click Range too. How many charts do both jobs?
Two: Box and Whisker Plot, and Histogram. Picking two functions finds the charts that do both jobs at once. A dot plot is on no poster row. It does the Histogram’s jobs and keeps every value, so it is a third chart for a claim like the bus in Example 2.
Read More
UK Government Analysis Function, Data visualisation: charts. A free guide for people in the UK government who design and publish charts. Read the part called Choosing the right chart. It starts where this chapter starts: decide the message, then pick the chart. Its table matches nine jobs to charts. It calls the jobs statistical relationships, and some of its names differ from the poster’s: Time series is Data Over Time, Correlation is Relationships, and Part-to-whole is Proportions. Then read Using pie charts, which gives three rules for when a pie is right.
Stuck on any of this? Ask Mr. Case in class or send him a message in Canvas. Name the example or the question number, and say which step lost you.