Unit 6 · Analysis and Communication
6-3 Data Visualization and Communication
A table of numbers can hide the very thing you most need to see. Turn it into the right picture and the pattern jumps out — the busiest hours, the strongest link, the odd outlier. Visualization does two jobs: it helps you understand your own data, and it helps you explain it to others. When one or two variables are involved, a bar, line or scatter plot is enough; when three or more variables must be shown at once, heatmaps and mosaic plots are used instead. And a chart alone is not a message: telling a clear data story is what makes an audience actually understand.
Guiding question
How do we choose a visualization that reveals a pattern honestly, and how do we turn a chart into a message others understand?
Learning outcome. Explain the role of data visualization and select suitable graphs including for multiple variables, and apply data storytelling to communicate a clear and honest message from data.
1 · What it is
Data visualization is representing data as graphs or figures so that features that are hard to read from numbers alone can be grasped visually.
2 · Its two roles
| Role | Description | Example |
|---|---|---|
| Deepen the analyst’s own understanding | Visually grasp the distribution, trends and outliers of data, and gain insight | Training records or study time shown as a line graph make changes and trends easy to notice that a table hides |
| Communicate data to others | Convey analysis results or claims to others in an easy-to-understand way | Average test scores per class as a bar graph let even a first-time reader compare classes at a glance |
3 · And in either role, choose carefully
It is important to choose a graph that fits the content to be conveyed, and to use representations that do not invite misunderstanding. The appropriate method differs depending on the number and type of variables and the purpose of the analysis. When information that cannot be handled by familiar graphs needs to be shown, more advanced visualization techniques are used.
1 · When the familiar graphs run out
Common graphs — bar, line and scatter plots — are suited to representing the relationship between one or two variables. But situations often arise in which three or more variables, or many combinations of information, need to be handled at once. Heatmaps and mosaic plots are the advanced methods used for such cases.
2 · Heatmap
A heatmap is a graph in which items are arranged on two axes, and the size of a third value — a numerical value — corresponding to each combination is represented by the gradation of colour or differences in hue. For example: grasp the number of customers visiting at a glance by day of week × time slot; compare trends in average temperature for city × month.
The same forty-two numbers, twice
Customers visiting a shop, counted for every day × time slot. Forty-two numbers, all of them present from the start.
| Time | Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|---|
| 10:00 | 12 | 10 | 14 | 11 | 13 | 42 | 38 |
| 12:00 | 45 | 42 | 46 | 44 | 58 | 95 | 88 |
| 14:00 | 25 | 22 | 23 | 24 | 28 | 72 | 68 |
| 16:00 | 28 | 26 | 30 | 27 | 42 | 75 | 62 |
| 18:00 | 52 | 48 | 55 | 50 | 78 | 110 | 75 |
| 20:00 | 18 | 15 | 20 | 17 | 45 | 68 | 35 |
Look for the busiest time to add staff. You can find it — read all forty-two numbers and compare them. Try it for a few seconds, then press the button.
3 · And why not just use a scatter plot
In a scatter plot the relationship between two quantitative variables is represented by points, so when the number of points becomes large they overlap and the density of the data becomes hard to see — this is overplotting. Scatter plots are also not suited to handling combinations of categorical variables. In such cases a heatmap has the advantage of allowing the density and patterns of the data to be grasped at a glance.
4 · Mosaic plot
A mosaic plot represents the relationship between two categorical variables by the size of rectangular areas. For example: compare the distribution of gender × subject preference; grasp differences in purchase ratios for age group × product category.
The widths of row and column divisions correspond to the proportions of frequencies, and the area of each rectangle represents the proportion of frequency for that combination of categories. Even when the overall picture is hard to grasp from a numerical table (a cross-tabulation), a mosaic plot shows differences in proportions as areas, making relationships between categories easier to grasp intuitively.
Proportions you can see without reading
Gender against favourite subject. The width of each column is that group’s share of everyone; the height of each block is that subject’s share within the group. So every rectangle’s area is the proportion of that combination.
Tap or hover any block. Even without doing that, the pattern is already visible as shape: males lean towards Math, females towards Japanese. You did not read a single number to see it.
1 · What it is
Data storytelling is using data and visualization to convey the message you want to convey, structured like a story.
2 · Three basic elements
| Element | Description | Example |
|---|---|---|
| Clarification of the message | Make it possible to express in one sentence what you want to convey through the graph | Make the title of a graph contain the claim, such as “the class scored highly overall on the math test” |
| Selection of elements | Remove elements unrelated to the message and emphasise the parts you want to draw attention to | Make only the elements you want to draw attention to stand out in colour, keeping other elements in faded colours |
| Provision of supporting information | Properly arrange the title, axis labels, units and notes | Clearly indicate units and item names, such as “points” on the vertical axis and “class” on the horizontal axis |
Build the story one element at a time
Data
All three off. Every number is present and nothing is missing — but the chart is titled “Data”, no bar is more important than any other, and nothing says what the heights even mean. This chart is not wrong. It simply says nothing.
3 · And then check it landed
The depth of an audience’s understanding can change greatly with how the same analysis result is conveyed. After visualizing data, it is important to put yourself in the audience’s position and verify whether the message is conveyed.
The book says a good data story uses honest labels. That raises a question worth answering: what does a dishonest chart look like? Most people expect made-up numbers. The commonest trick uses numbers that are all completely true.
Below are two charts of the same three figures: 100, 102 and 104 sales. Nothing has been changed except where the bottom of the scale is drawn.
🧮 Why the right-hand chart fools people
- 1
Look at the real change: from 100 to 104 is 4 more sales, which is a rise of 4%.
Why this step: Start from the numbers themselves, before looking at any picture. This is the fact the chart is supposed to communicate.
- 2
On the honest chart, the last bar is about 4% taller than the first. It looks like a small rise — which it is.
Why this step: When the axis starts at zero, the HEIGHT of a bar is proportional to the value. Twice the value means twice the height, so your eye can compare bars directly and be right.
- 3
On the second chart the axis starts at 99, so the first bar shows 100 − 99 = 1 unit and the last shows 104 − 99 = 5 units.
Why this step: This is the whole trick. The bars no longer show the values — they show how far each value sits above 99, an amount nobody asked about.
Most people slip here: Nothing here is a lie. The bars are drawn accurately for the scale printed beside them, and the numbers are right. That is exactly what makes it effective.
- 4
Compare what the eye is told: 5 units against 1 unit looks like five times more, for a real rise of 4%.
Why this step: People read charts by comparing sizes, not by reading axis labels. A chart that needs its axis read carefully to avoid being misunderstood has already failed at its job.
- 5
The rule: for BAR charts, start the axis at zero.
Why this step: A bar communicates by its length, so the length has to mean something. Line graphs are the accepted exception — they show change over time, and a truncated axis is normal there provided the axis is clearly labelled.
Where the comparison breaks down: A photograph has no axis to check, so you cannot catch it. A chart always tells you what it did — the scale is printed right there. That is why the fix is so simple: look at the axis before you look at the bars.
Worth noticing for the exam: the correction is almost never that the numbers were wrong — they were right. What was wrong was the impression. That is why the book treats storytelling and honesty as one topic: a chart is an argument, and an argument made of true facts arranged to mislead is still a dishonest argument.
Broadcast and published charts that drew complaints and were later reissued.
How the real paper is built
The ministry sets half multiple choice and half written answer in every subject. The two halves are not the same skill. In the multiple-choice half you have to spot the wrong options quickly — and the wrong options are built out of the mistakes students really make. In the written half nobody gives you the answer to recognise; you have to produce it, in your own words, with a reason.
Practise both. Being good at one half and weak at the other costs you exactly half the paper.
- data visualization
- — showing data as graphs or figures to grasp features visually.
- heatmap
- — a colour grid on two axes for a third, numerical value.
- third value
- — the number a heatmap’s colour represents.
- overplotting
- — points overlapping so density is hidden.
- mosaic plot
- — rectangle areas for two categorical variables.
- cross-tabulation
- — a table of counts for category combinations.
- data storytelling
- — structuring a data message like a story.
Worked Example
(1) Mark each statement with ○ if it is true or × if it is false.
A Data visualization has both the role of deepening the analyst’s own understanding and the role of communicating data to others.
B A heatmap represents the size of a third value corresponding to combinations on two axes by the gradation of colour or differences in hue.
C A mosaic plot represents the relationship between two categorical variables by the size of rectangular areas.
D In data storytelling, it is important to include as many elements related to the graph as possible.
(2) Match each description with a graph: A Scatter plot, B Heatmap, C Mosaic plot.
a Represents the size of a numerical value corresponding to combinations on two axes by the gradation of colour or differences in hue
b Represents the relationship between two categorical variables by the size of rectangular areas
c Represents the relationship between two quantitative variables by the position of points
1 · Answer the following questions.
2(1) · Choose the most appropriate graph for each situation.
Match each description with the choice that fits it.
You want to grasp the pattern of customer visits by day of week × time slot at a glance.
You want to intuitively show differences in proportions for gender × subject preference using areas.
2(2) · Which most appropriately describes a situation in which a heatmap is used?
Mark ○ for the situation that calls for a heatmap, and × for the ones that do not.
A situation in which one wants to simply compare a representative value for one variable.
A situation in which the relationship between two quantitative variables can be sufficiently grasped with a scatter plot because the number of points is small.
A situation in which one wants to grasp the distribution and patterns of numerical data over combinations on two axes at a glance.
A situation in which one wants to show only one composition ratio of a categorical variable.
2(3) · Which most appropriately describes a situation in which a mosaic plot is used?
Mark ○ for the situation that calls for a mosaic plot, and × for the others.
A situation in which one wants to follow the time-series changes of one quantitative variable.
A situation in which one wants to intuitively grasp the proportions of frequencies for combinations of two categorical variables using areas.
A situation in which one wants to represent the correlation between two quantitative variables by points.
A situation in which one wants to show the composition ratio of categories at a particular time using sectors.
2(4) · Which most appropriately describes data storytelling?
Mark ○ for the correct description, and × for the ones that confuse decoration with communication.
Even if the message you want to convey is unclear, it will be communicated to the audience as long as the graph is beautiful.
Clarification of the message, selection of elements, and provision of supporting information are the basic elements.
It is better to include as many related elements as possible in a graph.
Titles and axis labels detract from the appearance of a graph and should preferably be omitted.
Think as an Engineer — Investigate & Decide
Your class collected data on students’ home governorate and their favourite sport, and also monthly rainfall for several Egyptian cities across the year. You must present each dataset clearly.
1 · Choose a graph for each.
For the governorate × favourite-sport data and for the city × month rainfall data, name the graph you would use. For at least one of them, justify your choice — could the other graph type also work here, and why is yours better?2 · Guard against misleading.
Name one design choice that could make your chosen chart mislead the reader (for example a colour scale with no legend, or truncated categories), and say how you would prevent it — a judgment the lesson’s examples do not hand you.3 · Tell the story.
For one of the two charts, write the one-sentence message you want the audience to take away, and name the single element you would emphasise to carry it. In pairs, compare messages and agree on the clearer one.
In a New Context
A researcher plots study time against test score for every student in a large school as a scatter plot, but so many points overlap into a solid blob that the density cannot be read. Name a visualization that would reveal where most students actually fall, and explain why it works better here than the crowded scatter plot.
Lesson Question — Answered
Data visualization serves two roles — deepening the analyst’s own understanding, and communicating to others — and the right method depends on the number and type of variables. Bar, line and scatter plots suit one or two variables; when a scatter plot’s points overlap (overplotting) or categories must be combined, a heatmap shows a value across two axes by colour, and a mosaic plot shows two categorical variables by rectangular area.
Turning a chart into a message is data storytelling, built from three elements: clarify the message in one sentence, select only the elements that serve it (emphasising the key part and fading the rest), and provide honest supporting information — title, axis labels, units, notes.
Because the same result can land very differently depending on how it is shown, the final step is to stand in the audience’s position and check that the message truly arrives.
2 · Read the passage and fill in the blanks (a)–(e).
Data visualization has both the role of deepening the analyst’s own understanding and the role of ( a ) data to others. When information cannot be handled by common graphs such as bar graphs and line graphs, advanced visualization techniques are used. The graph that represents the size of a third value corresponding to combinations on two axes by the gradation of colour or differences in hue is called ( b ), and the graph that represents the relationship between two categorical variables by the size of rectangular areas is called ( c ). When communicating data, the concept of ( d ), in which the message is structured like a story, is important; the basic elements are clarification of the message, selection of elements, and provision of ( e ).
3(1) · Which most appropriately describes a heatmap?
Mark ○ for the description of a heatmap, and × for the other three graphs.
A graph that represents the relationship between two quantitative variables by the position of points.
A graph that represents the size of a third value corresponding to combinations on two axes by the gradation of colour or differences in hue.
A graph that represents the composition ratio of categories by the area of sectors.
A graph that represents the changes in time-series data by lines.
3(2) · Which is NOT an appropriate basic element of data storytelling?
Mark ○ for the three real elements, and × for the one that is not.
Make it possible to express in one sentence what you want to convey through the graph.
Remove elements unrelated to the message and emphasise the parts you want to draw attention to.
Properly arrange the title, axis labels, units and notes.
Include as many elements unrelated to the message as possible to increase the amount of information.
3(3) · Choose the most appropriate graph for each purpose.
Match each description with the choice that fits it.
You want to grasp the monthly average temperatures of multiple cities together at a glance.
You want to show differences in purchase ratios for age group × product category using areas.
You want to see the relationship between two quantitative variables where the number of points is small enough that the density can also be read.
Key takeaway
Match the graph to the data: heatmap for a value across two axes; mosaic plot for two categories by area; scatter, bar or line for one or two variables. Then tell a data story — one message, only the elements that serve it, honest labels — and check it lands with the audience.
Turn the heatmap’s colour off and ask each other, out loud and quickly: when should the shop add staff? Time how long it takes. Then turn the colour on and ask again. The difference between those two times is the entire argument of this lesson.
Sign In to Keep Going
You've reached the end of the free preview. Sign in — and upgrade to Plus or Pro — to keep going with Programming and Artificial Intelligence.
Full Access
Unlock all 30 lessons