Session 6: Data Visualization II — Communication and Deception
Monday, 2 November 2026, 09:00–11:15 · Room MAD 099
Business or leisure? Where do weekends cost extra? Individual, pass/fail, required for exam admission. Handed in through Classroom 50. Due Sunday 8 November, 23:59 — one week. Summary and the assignment link at the bottom of this page.
What this session is about
Last week you built charts to answer your own questions. You made one, looked at it, learned something, made the next. That is exploring, and most of those charts are never seen by anybody else.
This week the chart has a different job: carry one message to somebody else — the board, a client, the reader of your report — who looks at it for ten seconds and has never seen your data. That is explaining, and it takes a few more moves.
The session has two parts, kept apart on purpose:
- Part A — Communication. A title that states the finding. Emphasis on the one thing that matters, with the new
gghighlightpackage. Annotation. Colour that carries meaning. A house style you write once, as a function. - Part B — Deception. Five ways honest data can mislead — a truncated axis, a cherry-picked time window, two y axes, a hidden
n, a bubble that grows twice. We build each one ourselves, and end with a checklist you can run over any chart.
The checklist is also what your Report 2 charts are read against — and in session 7 we run it over charts that an AI made.
One new one:
install.packages("gghighlight")Plus tidyverse, scales and here from earlier sessions.
Learning goals
- Tell an exploratory chart from an explanatory one, and know which you are making
- Write the finding first, then a title, subtitle and caption that carry it
- Emphasise one group and keep the rest as context with
gghighlight() - Add a note or a reference line with
annotate()andgeom_vline() - Choose a categorical, sequential or diverging palette for the job colour has to do — and one that survives colour blindness
- Write a small function — your own house theme — and reuse it
- Recognise five common ways charts mislead, and fix each
- Run an eight-question checklist over any chart, your own included
Slides
Materials
| File | Description |
|---|---|
| Exercise sheet | The in-session exercise |
| hotels-europe_price.csv | Prices: one row per hotel and date — as in session 5 |
| hotels-europe_features.csv | Features: one row per hotel — as in session 5 |
| Slides | Online after the session |
| Live coding document | Online after the session |
| Exemplary solution | Online after the session |
Data
The same Hotels in Europe data as in session 5 — deliberately. Today’s work is on the chart, not on the data, and Report 2 uses it too.
Békés and Kézdi (2021), licensed CC BY-NC-SA 4.0. Unmodified.
The question we answer
Not a question about hotels — a question about charts:
How do you make a chart that says one thing clearly — and how do you tell when a chart is saying something the data does not?
The best tool turns out to be a sentence. Write down what the chart should say before you build it, and most decisions make themselves: the title is the sentence, the colour goes to the thing the sentence is about, everything else goes grey.
The misleading charts are more uncomfortable. None of them contains a false number. Each one is one design choice away from the honest version — and some of those choices, like picking the two months that tell your story, you will be tempted to make yourself.
Take-home until session 7
Report 2 — and nothing else. It is due in a week. Do the first render from a fresh clone of your repository early, not on Sunday evening.
Session 7 is about working with AI. We ask an AI assistant to build charts for us — and run today’s checklist over what it produces.
Report 2
| Task | Business or leisure? Where do weekends cost extra? |
| Task sheet | in your Classroom 50 repository, with a hints document — accept the link below |
| Issued | end of this session, 2 November |
| Due | Sunday 8 November, 23:59 |
| Form | individual, pass/fail — required for exam admission |
| Submit | through Classroom 50: push to your repository — how |
| Debrief | session 8 |
The same hotels, priced on a weekday and on a weekend night in the same month. In some European cities a weekend night costs more than a weekday; in others it costs less. Which cities are which, by how much — and what might the pattern tell a hotel group deciding where to open next?
The Reports page carries the rules that apply to all three reports. Moodle remains the fallback if GitHub misbehaves.
Because the analysis is short, and the data is the one you already know. What Report 2 adds is what sessions 4 to 6 taught: a repository that renders from a fresh clone, and charts a reader can trust. Spend the week on those.
Going further
- Healy (2018), ch. 1 “Look at data” and ch. 8 “Refine your plots”
- Wilke (2019) — especially the chapters on colour and on proportional ink
- Wickham et al. (2023), ch. 11 “Communication”
gghighlightdocumentation
Before you trust a chart — yours or anybody else’s:
- Claim — what does the title say, and does the chart show it?
- Baseline — do bars start at zero?
- Window — why does the time range start and end where it does?
- Axes — one scale per axis? Anything reversed or logged without saying so?
n— how many observations is each bar, box or point based on?- Summary — mean or median, and is it the right one?
- Encoding — amounts by position or length, not by area or colour?
- Source — where the data comes from, and what was left out?
Accept Report 2
Accept the assignment here — manual, step 1:
The link works from the end of this session on. Before that, Classroom 50 says This assignment is locked. The repository it creates for you holds the task sheet and the hints (TASK.md / TASK.pdf, HINTS.md / HINTS.pdf), the data and a starter document.