An Introduction
Data Visualization
What it is, why it works, where it came from, and how to judge it
1What is visualization?
Information visualization is the use of computer-supported, interactive, visual representations of data to amplify cognition.
That one sentence packs in a lot. A visualization is not decoration: it is a tool that helps people think. Computer-based visualization systems provide visual representations of datasets designed to help people carry out tasks more effectively, whether that task is spotting a trend, comparing options, or deciding what to do next.
Put another way, visualization is a process. It transforms abstract data into interactive graphical representations for the purpose of exploration, confirmation, or presentation. The word abstract matters here: the data has no built-in physical shape, as a table of sales figures or a network of friendships does not, so someone has to choose how to draw it. That choice is the heart of the subject, and most of what follows is about making it well.
2Why visualize data?
People turn data into pictures for two broad reasons, and it helps to keep them apart.
Exploration
Take new perspectives on data, analyze complex patterns, and reveal unseen relationships. Exploration helps you:
- expand memory
- find and reveal patterns
- generate and confirm hypotheses
- inspire new questions
- see data in context
Explanation
Communicate insights, inspire new thinking about a problem, and inform decisions. Explanation helps you:
- analyze data to support reasoning
- answer questions
- communicate ideas to others
- make decisions
- record information
- support computational analysis
- tell a story
Exploratory graphics are quick, numerous, and disposable; the analyst does not yet know what to look for. Explanatory graphics are polished, annotated, and edited down to a message, because the audience should not have to rediscover it. Most real projects need both, in that order.
A famous example: 120,000 numbers in four minutes
Few presentations show both purposes at once better than Hans Rosling’s 200 Countries, 200 Years, 4 Minutes, from the BBC documentary The Joy of Stats (2010). An animated bubble chart plots income against life expectancy for every country, with bubble size showing population and color showing world region. As the years tick by, the bubbles move, and viewers watch nations grow richer and live longer. About 120,000 numbers are encoded in motion, and an audience can follow them without a spreadsheet in sight. (Watch the clip.)
3A field built from many fields
Visualization has no single home. It borrows from cartography (how to draw space and place), statistics (how to summarize, model, and reason about uncertainty), perceptual psychology (what the eye and brain can read quickly and accurately), computer graphics (how to render and animate efficiently), human-computer interaction (how people explore and operate on data), and graphic design (how layout, type, and color shape understanding). In industry this breadth spreads across roles, from analysts and data journalists to information designers and visualization engineers, and good work is usually collaborative.
Where it fits in data science
Visualization is not a last step bolted onto an analysis. In the data science process described by Rachel Schutt and Cathy O’Neil, data moves from the real world into collection, processing, and cleaning, then into exploratory data analysis, modeling, and finally communication and decisions. Pictures help at the exploratory stage, where they reveal problems and possibilities in the data, and again at the end, where they carry the results to other people.
When visualization is the right tool
Visualization is suitable when the goal is to augment human capability rather than replace people with automatic decision-making. That is the case when a human in the loop needs the details and no trusted automatic solution exists; when the analyst does not know in advance exactly which questions to ask; when exploratory analysis can be sped up by keeping a person in the loop; and when known results must be presented to others.
It is also a steppingstone toward automation. Before a model is built, charts provide understanding of the data. While an algorithm is being created, they help refine it, debug it, and set parameters. Before and during deployment, they build trust and monitor behavior: class-balance plots guide model choice, confusion matrices guide debugging, and dashboards flag drift once a system is live.
4Why it works: perception
External representations replace cognition with perception
Holding a table of numbers in your head and computing comparisons is slow, effortful thinking. Looking at a picture of the same numbers lets the visual system do much of that work automatically. Cognitive scientists call this offloading: the display becomes an extension of memory and computation. It is why a good chart, such as the interactive graphics published by The New York Times’ Upshot, can make a policy question graspable in seconds. The effect depends on the design, though; a diagram helps only when it makes the needed inferences easy to see.
Why depend on vision?
Vision is the sense best suited to this job. The human visual system is a high-bandwidth channel to the brain. Overview is possible because of background processing, which gives us the experience of seeing everything at once, and much of that processing happens in parallel and pre-attentively: features such as color, orientation, size, and motion pop out in a fraction of a second, before we consciously look for them. Sound has lower bandwidth and different semantics; it cannot offer an overview, and we experience it as a sequential stream. Touch has an impoverished capacity to record and replay. Sonification and tactile graphics are valuable complements, and essential for accessibility, but vision remains the best channel for seeing a lot of data at once.
Try it yourself
Which number appears most often in this list?
15 19 60 33 11 75 57 34 79 18 51 92 73 22 13 71 60 22 17 10 68 73 18 55 65 46 29 60 73 22 46 92 97 10 58 46 57 17 83 26 99 33 88 92 60 91 29 57 96 12 47
Scanning one value at a time is slow and error-prone. Now look at the same values as stacked dots, one dot per occurrence.
The answer, 60, appears four times, and it jumps out at once. (The values 22, 46, 57, 73, and 92 each appear three times.) That is the power of perception: the picture turned a counting task into a looking task.
5Why show all the data?
If pictures are so useful, why not show only a summary such as a mean or a trend line? Because summaries lose information, and details matter. Seeing every data point lets you confirm the patterns you expected, find the ones you did not, and check whether a statistical model is valid at all.
Anscombe’s Quartet
In 1973 the statistician Francis Anscombe made the point unforgettable by building four small datasets that are identical by almost every common summary statistic:
| Statistic | Value for all four series |
|---|---|
| Mean of x, mean of y | 9, 7.50 |
| Variance of x, variance of y | 11, 4.122 |
| Correlation between x and y | 0.816 |
| Linear regression | y = 3.00 + 0.500x |
By the numbers, the four datasets are the same. Plotted, they are nothing alike.
The lesson has been repeated since. The “Datasaurus Dozen” (Matejka and Fitzmaurice, 2017) goes further, with a dozen datasets, including a dinosaur and a star, sharing the same means, standard deviations, and correlation to two decimal places. Always plot the data before trusting the numbers.
6Effectiveness: matching picture to task
Showing the data is necessary but not sufficient. Visualization systems are meant to help people carry out tasks more effectively, and effectiveness requires a match between the data and task on one side and the representation on the other. The set of possible representations is huge, and many are a poor fit for any given combination. Knowing the full space of possibilities raises your odds of finding a good one.
What counts as effective? A design can be novel, enabling an entirely new kind of analysis, or faster, speeding up an existing workflow. How you check depends on the context, and there are many validation methods, from lab experiments and usability studies to case studies with domain experts and observation of real-world use. A useful habit, from Tamara Munzner’s nested model of design, is to validate at every level, from the problem you are solving down to the algorithm you implemented, since a flawless implementation of the wrong idea is still the wrong idea.
The same data, two encodings
Suppose the question is: which gender and income level shows a different effect of age on triglyceride levels? Here is the data as a table.
Answering means comparing eight numbers across rows and columns. Now see the same data as a line chart.
The odd one out is now obvious: it is the line with a different slope. This works because people judge position and angle well. Research by William Cleveland and Robert McGill (1984) ranked visual channels by how accurately we decode them, with position along a common scale at the top, followed by length, angle and slope, and then area; color saturation and volume are among the least accurate for quantities. Good designs put the most important comparisons on the most accurate channels.
Choropleths: a familiar encoding with caveats
A choropleth shades geographic regions in proportion to a statistic, as in this crime map from the Austin Police Department, where darker areas have higher counts.
Choropleths are everywhere, and they are easy to get wrong. Raw counts mostly reproduce population size, so rates per capita or per area are usually the better choice. And because the shading is tied to boundaries, the apparent pattern depends on how the lines were drawn, while large, sparsely populated regions dominate the eye.
Designing within limits
Every design also works within three kinds of limits: those of computers, of humans, and of displays. Computers are limited by processing time and memory. People are limited in attention, cognition, and memory. Displays are limited by pixels, the most constrained resource of all, so designers care about information density, the ratio of space used to encode information versus unused whitespace. The limits interact. Plotting millions of points taxes the computer and the screen and overwhelms the viewer too, which is why techniques like aggregation, sampling, and Ben Shneiderman’s mantra of “overview first, zoom and filter, then details on demand” help on several fronts at once.
7A short history of visualization
With the basic principles in hand, we can look at how people have actually drawn data. Studying existing visualizations does several useful things: it imposes structure on a huge design space, gives you a scaffold for thinking systematically about design choices, and makes analyzing past work a steppingstone to designing new work. Because most possibilities are ineffective for any particular task and dataset, knowing why some designs succeeded and others failed saves time.
One scaffold is Munzner’s three questions for analyzing any design: what data is shown, why the user is looking at it (the task), and how it is encoded and manipulated.
From cave walls to interactive screens
People have made pictures to record and share knowledge for a very long time, and each technological leap widened what a picture could do. Static images go back more than 64,000 years, to Neanderthal cave art. Animated images are thousands of years old; an Egyptian series of figures showing successive poses, about 4,000 years old, is an early example of motion on a wall. Interactive graphics that respond to the viewer arrived more than 50 years ago and are now routine.
Milestones
Michael Friendly’s “A Brief History of Data Visualization” (2008) catalogs the milestones of the field. Plotting their dates as a density shows uneven growth: a slow accumulation of early maps and diagrams, then bursts of activity as measurement and theory developed and new graphic forms appeared, a golden age of statistical graphics in the late nineteenth century, a quieter stretch Friendly calls the modern dark ages, when formal statistical modeling overshadowed pictures, and a re-birth from the mid-twentieth century that continues today into high-dimensional, interactive visualization.
What follows is a tour of landmark examples, roughly in order. As you read, notice how often each one solves a problem that the principles above would predict: showing all the data, choosing a good encoding, matching the picture to a task.
Early plots: the planets, the sun, and lifetimes
One of the earliest known plots of a quantity against time is a chart of planetary movements by an unknown astronomer, made around or before the 10th century.
Seven centuries later, Christopher Scheiner recorded the changing positions of sunspots from 23 October to 10 December 1611. By repeating the same view day after day, his drawings make change comparable at a glance, the idea we now call small multiples.
In the eighteenth century, Joseph Priestley turned the timeline into a standard tool. His Chart of Biography (1765) draws each person’s life as a horizontal line on a shared time axis, so overlaps between lifespans are immediately visible. His New Chart of History (1769) extends the idea from people to nations and empires.
Playfair and the statistical graphic
William Playfair is credited with inventing several of the charts we use daily, including the line chart and the bar chart (the pie chart followed later). In his 1786 chart of exports and imports between England and Denmark and Norway from 1700 to 1780, the gap between two lines is shaded to show the balance of trade, labeled as “against” or “in favour of” England.
Pictures that changed minds
Two mid-nineteenth-century graphics show visualization changing what people believed and did. In 1854, during a cholera outbreak in London’s Soho, John Snow marked deaths on a street map. The deaths clustered around the Broad Street water pump, supporting his hypothesis that cholera spread through contaminated water rather than “bad air.” The map is the classic case of visualization used to generate and confirm a hypothesis.
A few years later, Florence Nightingale used a polar-area diagram (often called a “coxcomb”), derived from the pie chart, to show the causes of mortality in the army in the East in 1858. Each wedge is a month, and its color-coded sections separate deaths from preventable diseases, from wounds, and from all other causes. The message was stark: most deaths were due to poor sanitation rather than battle. It was designed to persuade officials and the public to pay for sanitary reform, and it did.
Minard: flows and the best graphic ever drawn?
Charles Joseph Minard pioneered the flow map, in which the width of each band is proportional to the quantity moved. His 1864 map of French wine exports fans bands out from France to destinations around the world.
His 1869 map of Napoleon’s march on Moscow is his masterpiece. Edward Tufte says it “may well be the best statistical graphic ever drawn,” and uses it as a prime example in The Visual Display of Quantitative Information. A single image encodes the size of the army (band width), its position (latitude and longitude), its direction (tan for the advance, black for the retreat), the date, and, in a chart beneath the map, the temperature during the retreat. The story is one of attrition: roughly 422,000 soldiers crossed the Niemen in 1812, and only on the order of 10,000 returned. Six variables share one flat surface, without clutter.
Schedules and motion
Time-and-place data got its own form in the late nineteenth century. This Paris-to-Lyon train schedule from 1885, credited to E. J. Marey, puts stations on the vertical axis, spaced by distance, and time on the horizontal axis. Each train is a diagonal: steeper lines are faster trains, and the places where lines cross show where trains pass.
Marey also turned to motion itself. Using white tape on a performer dressed in black velvet, he invented time-series images in 1895, recording the positions of the limbs across a single photographic plate. Tufte reproduces this work in The Visual Display of Quantitative Information (1983).
Mapping society
Maps also carried social data. In 1892, Charles Booth’s survey of London colored each street by the general condition of its inhabitants, from black for the lowest class (vicious, semi-criminal), through dark blue (very poor) and light blue, purple, and red (fairly comfortable), to yellow for the wealthy. The poverty maps were an early example of thematic mapping used for social research and policy.
When accuracy gets in the way
The London Underground offers a lesson in matching a picture to a task. The 1927 map is tied closely to geography. The modern map from 2019 is a schematic diagram that gives up geographic accuracy to make connections and interchanges easy to read, an approach introduced by Harry Beck in 1931 with straight lines, 45-degree angles, and evenly spaced stations. A rider choosing a route needs topology, not distance, so the distortion makes the map more effective. The most literal representation is not always the best one.
Visualizing ideas
Visualization is not limited to numbers. The cover of the 1936 catalog for the Museum of Modern Art’s Cubism and Abstract Art exhibition, by Alfred H. Barr Jr., diagrams how art movements influenced one another over time.
For more landmark examples, explore the interactive timeline of the most iconic infographics.
At a glance
| Date | Creator or work | Contribution |
|---|---|---|
| c. 10th century | Unknown astronomer | Planetary positions plotted against time |
| 1611 | Christopher Scheiner | Day-by-day sunspot drawings; early small multiples |
| 1765, 1769 | Joseph Priestley | Timelines of people and of nations |
| 1786 | William Playfair | Line and area charts of the balance of trade |
| 1854 | John Snow | Mapping cholera deaths to find the source |
| 1858 | Florence Nightingale | Polar-area diagram of preventable deaths |
| 1864, 1869 | Charles Joseph Minard | Flow maps; the multivariate march of Napoleon’s army |
| 1885, 1895 | E. J. Marey | Train-schedule graph; time-series images of motion |
| 1892 | Charles Booth | Thematic maps of poverty in London |
| 1927, 2019 | London Underground | From geographic map to schematic diagram |
| 1936 | Alfred H. Barr Jr. | A diagram of relationships among art movements |
8How to critique a visualization
History supplies the examples; critique supplies the method. Once you can say what a design is doing and why, you can judge it, and a good critique turns “I like it” into an argument. Consider this familiar image: is it data visualization, or just modern art?
Six questions give a structure for the answer.
| Question | What to look for |
|---|---|
| What is the purpose of the visualization? Does it serve its purpose well? | Identify the audience and the task, exploration or explanation, and judge the design against that task, not against taste. |
| Does it convey the data honestly? | Check for truncated baselines, inconsistent scales, distorted areas, cherry-picked ranges, missing units or sources, and misleading color scales. Tufte’s “lie factor” compares the size of an effect shown in the graphic with its size in the data. |
| Does it show the appropriate amount of data? | Too little hides context, as Anscombe’s quartet showed; too much causes clutter and overplotting. Look for aggregation, filtering, or layering that fits the task. |
| Are effective visual encodings used? | Prefer accurate channels such as position and length for the most important quantities, and use color carefully, with distinguishable hues, ordered lightness for sequential data, and accessibility for color-vision deficiency. |
| Is interaction used to enable effective exploration or examination of the data? | Look for tooltips, filtering, zooming, linked views, and details on demand, and ask whether each interaction is needed or merely decorative. |
| Does it address an important topic? Is it innovative? | Consider the stakes and the audience, and whether the design is novel, making new analyses possible, or faster, making existing work easier. |
Try these questions on the examples in this guide. Snow’s map, Nightingale’s diagram, and Minard’s march each answer them well in different ways, and the 1927 and 2019 Tube maps show how the same subject can earn different answers depending on the task. Then pick a visualization of your own, from a book, a news site, or a report, note its source, and see what you would change.
9Further reading
- Anscombe, F. J. (1973). Graphs in statistical analysis. The American Statistician, 27(1), 17–21.
- Card, S. K., Mackinlay, J. D., & Shneiderman, B. (1999). Readings in Information Visualization: Using Vision to Think. Morgan Kaufmann.
- Cleveland, W. S., & McGill, R. (1984). Graphical perception: Theory, experimentation, and application to the development of graphical methods. Journal of the American Statistical Association, 79(387), 531–554.
- Friendly, M. (2008). A brief history of data visualization. In Handbook of Data Visualization (pp. 15–56). Springer.
- Matejka, J., & Fitzmaurice, G. (2017). Same stats, different graphs. Proceedings of CHI 2017.
- Munzner, T. (2014). Visualization Analysis and Design. CRC Press.
- Schutt, R., & O’Neil, C. (2014). Doing Data Science. O’Reilly Media.
- Shneiderman, B. (1996). The eyes have it: A task by data type taxonomy for information visualizations. Proceedings of the IEEE Symposium on Visual Languages.
- Tufte, E. R. (1983). The Visual Display of Quantitative Information. Graphics Press.