Data Visualization
Data visualization encodes information as visual elements — position, length, color, and shape — so that patterns, trends, and outliers become perceptible at a glance. It bridges raw numbers and human cognition, turning tables into charts, maps, and dashboards that support faster, more accurate interpretation.
itData engineering and analytics | OpenSkills.info
Intro
Data Visualization
Data visualization maps data values to visible marks such as bars, points, lines, shapes, and color. The chart is not decoration added after analysis. It is an interface between data and a question.
A useful visualization helps you compare values, find a pattern, or communicate a result. It can also mislead you when the chart type, scale, aggregation, or labels hide what the data actually say.
The central habit is simple: start with the comparison the reader needs to make. Then choose the clearest visual form for that comparison.
Why visualization exists
A table preserves exact values. A chart exposes relationships among those values. Position, length, direction, and grouping let you notice patterns that are slow to find row by row.
Visualization supports two different jobs:
- Exploration helps you inspect data, test questions, and discover patterns.
- Communication helps you guide an audience toward a finding they need to understand.
An exploratory chart can be dense, provisional, and built for one analyst. A communicative chart needs a clear purpose, enough context, and an honest path from evidence to conclusion. The same dataset may need different charts for those jobs.
Start with a question and a comparison
Do not begin with a chart gallery. Write the question first. Identify the audience, the decision, and the comparison that would answer the question.
Common relationships include:
- Magnitude: How large is each value?
- Ranking: Which values are highest or lowest?
- Change over time: How does a measure move across time?
- Distribution: Where do observations cluster, and how much do they vary?
- Relationship: How do two quantitative variables move together?
- Part to whole: How much does each component contribute to a total?
- Deviation: How far is each value from a target or reference?
- Geography: How does a measure vary by location?
One dataset can support several relationships. Choose the one that serves the question. If you need two comparisons, two simple charts often work better than one overloaded chart.
The grammar of a chart
Most charts combine five parts:
- Data contains observations and fields.
- Transformations filter, aggregate, calculate, bin, or reshape those observations.
- Marks are visible objects such as bars, points, and lines.
- Encoding channels map fields to position, length, color, size, shape, or another visual property.
- Scales and guides translate data values into visual values and explain the translation through axes or legends.
For example, a scatter plot uses one point mark per observation. It maps one quantitative field to horizontal position and another to vertical position. A color channel may identify a category. The axes reveal the position scales, while a legend explains the color scale.
This model separates meaning from appearance. A blue point means nothing until you know which field and scale produced blue.
Match the chart to the relationship
Use a bar chart for comparisons among discrete categories. A shared zero baseline makes bar lengths comparable. Sort bars when rank matters. Keep a meaningful order when categories already have one.
Use a line chart for change across continuous time. The line connects observations and suggests continuity between them, so do not use it for unrelated categories.
Use a scatter plot for the relationship between two quantitative variables. Each point represents an observation. A pattern can show association, clusters, gaps, or unusual observations. It does not prove that one variable causes the other.
Use a histogram to show a distribution. Bins divide a continuous field into intervals, and bar height shows the count or proportion in each interval. Changing bin width can change the visible pattern, so inspect more than one defensible choice.
Use a box plot when you need a compact comparison of distributions. It summarizes location and spread but hides the distribution's detailed shape. Pair it with points or another distribution view when that shape matters.
Use a stacked bar chart when the total and broad composition matter more than precise comparison among every segment. Only the segments sharing a baseline are easy to compare.
Use a map only when spatial pattern is part of the question. In a choropleth map, color encodes a value for each area. Counts often reflect area population or size, so rates or normalized measures are usually the relevant comparison when exposure differs.
Preserve the meaning of the data
Before drawing, confirm what one row represents. Check units, time periods, missing values, category definitions, and the denominator behind every rate.
Aggregation changes the question. A monthly mean is not a daily distribution. A national total can hide regional differences. A chart can calculate correctly and still answer the wrong question.
Treat missing data as unknown unless the domain gives you a justified replacement rule. Turning missing values into zero invents observations. Connecting across gaps in a line can imply continuity that the source does not establish.
Show uncertainty when it could change the interpretation. Confidence or prediction intervals can prevent readers from treating estimates as exact. State what an interval represents, because different intervals answer different questions.
Use scales honestly
A scale maps a data domain to a visual range. The domain contains source values. The range contains positions, lengths, colors, or sizes on the chart.
Bar length is measured from a baseline, so a bar chart should start at zero. Cutting the axis exaggerates small differences in length. A line chart does not encode value through filled length, so a nonzero baseline can be defensible when it is clearly labeled and needed to show variation.
Use the same scale across small multiples when you want direct comparison. Different scales can make unequal patterns look similar.
Linear scales are the default for additive differences. A logarithmic scale can make multiplicative change easier to compare across a wide range. It also demands explicit labeling and an audience that can interpret it. Never use a log scale to rescue a chart without explaining what distance means.
Write the chart, not just the picture
A chart needs enough text to stand on its own:
- a title that states the finding or question;
- a subtitle with measure, population, place, and time when needed;
- clear axis labels and units;
- direct labels or a compact legend;
- annotations for relevant events or thresholds;
- the data source and necessary notes.
Use annotations to add context, not to repeat every value. Put the annotation close to the evidence it explains.
Remove visual elements that do not support reading. Decoration, heavy borders, redundant legends, dense gridlines, and unnecessary three-dimensional effects compete with the data.
Design for access
Do not use color as the only way to distinguish information. Add labels, shapes, line styles, or position. Check contrast between meaningful graphical objects and adjacent colors.
Give a complex chart a short text alternative that identifies it and a longer description that conveys its essential information. Provide the underlying data as a table or download when practical. Interactive charts also need keyboard operation, visible focus, and instructions that do not depend on hover.
Accessibility improves the analytical design. A chart that still works without color alone usually has clearer grouping and labeling for everyone.
Know the limits
A chart shows only the fields, records, transformations, and ranges you include. It does not repair poor data quality. It does not establish causation. It cannot tell the reader which definitions were omitted.
Interactivity can help a reader filter or inspect details, but it adds state and testing work. Start with a useful default view. Do not hide the main finding behind a required click or hover.
A dashboard is useful for monitoring a set of recurring indicators. It is less useful when the audience needs a specific explanation. More charts do not create more insight.
A repeatable workflow
Use this sequence for most visualization work:
- State the audience, question, and intended comparison.
- Audit grain, field types, units, missingness, and definitions.
- Transform only what the question requires.
- Sketch more than one chart type.
- Choose marks and encodings that make the comparison direct.
- Set honest scales, labels, ordering, and color.
- Add context, source notes, uncertainty, and accessible alternatives.
- Test with someone who did not build the chart.
- Check the rendered chart across its real display sizes.
- Preserve the data and transformation steps so the result can be reproduced.
Tools change, but this reasoning transfers. Once you can explain the data, mark, encoding, scale, and comparison, you can evaluate a chart in a spreadsheet, a business intelligence tool, a programming library, or a declarative grammar.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://service-manual.ons.gov.uk/data-visualisation/guidance/principles
Supports
- Data visualization as the use of visual elements to show data
- Exploratory visualization for finding insights and communicative visualization for sharing findings
- Starting from the important comparison and keeping charts focused on needed data
- https://service-manual.ons.gov.uk/data-visualisation/chart-types/choosing-a-chart-type
Supports
- Choosing chart types from the relationship or trend to communicate
- Correlation, deviation, distribution, geography, magnitude, parts of a whole, ranking, and time as common relationships
- Benefits of simple charts, common baselines, and separate views for separate relationships
- https://service-manual.ons.gov.uk/data-visualisation/chart-types
Supports
- Official use guidance for bar, column, line, stacked, map, and small-multiple charts
- Matching chart types to data and the intended trend
- https://service-manual.ons.gov.uk/data-visualisation/chart-types/choropleth-maps
Supports
- Choropleth maps as area shading for geographic values
- Using maps when the intended pattern is geographic
- Standardized rates instead of absolute values when area size or population would distort comparison
- https://service-manual.ons.gov.uk/data-visualisation/guidance/axes-and-gridlines
Supports
- Zero baselines for bars and filled areas
- Consistent scales for comparable charts and explicit care with nonlinear scales
- Axis orientation, bounds, labels, and restrained gridline use
- https://service-manual.ons.gov.uk/data-visualisation/guidance/chart-text
Supports
- Titles, subtitles, units, labels, data sources, footnotes, and alternative text
- Concise chart text and consistent wording between chart and surrounding content
- https://service-manual.ons.gov.uk/data-visualisation/guidance/annotations
Supports
- Annotations for relevant context and specific data points
- Concise annotation text placed near the related evidence
- https://service-manual.ons.gov.uk/data-visualisation/guidance/showing-uncertainty-in-charts
Supports
- Showing uncertainty ranges when they materially affect interpretation
- Confidence and prediction intervals as examples of uncertainty ranges
- Complexity tradeoffs when displaying uncertainty
- https://service-manual.ons.gov.uk/data-visualisation/colours/using-colours-in-charts
Supports
- Color for categories, quantitative values, and emphasis
- Contrast, distinguishability, consistency, and ordered color choices
- https://service-manual.ons.gov.uk/data-visualisation/guidance/interactive-charts-and-animations
Supports
- Filters, controls, tooltips, and other forms of chart interaction
- Starting interactive views with a useful message or orientation
- Keeping interaction focused on important audience needs
- https://service-manual.ons.gov.uk/data-visualisation/guidance/dashboards
Supports
- Dashboards as multiple data views for monitoring a topic
- Suitability for high-level, frequently updated indicators
- Maintenance and audience tradeoffs of dashboard use
- https://www.w3.org/WAI/WCAG22/Understanding/use-of-color
Supports
- Requirement not to use color as the only visual means of conveying information
- Shape or text as additional ways to communicate meaning
- https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast
Supports
- Contrast evaluation for graphical objects required to understand content
- Comparison of meaningful graphical objects with adjacent colors
- https://www.w3.org/WAI/tutorials/images/complex/
Supports
- Charts and graphs as complex images
- Short identification plus a long textual representation of essential information
- https://www.w3.org/TR/WCAG22/
Supports
- Keyboard access, visible focus, text alternatives, and programmatic status requirements for web content
- Accessibility requirements that apply across responsive variations of a page
- https://www.gov.uk/government/publications/the-government-data-quality-framework/the-government-data-quality-framework
Supports
- Data quality as fitness for the intended purpose
- Completeness, uniqueness, consistency, timeliness, validity, and accuracy as quality dimensions
- Documentation, metadata, user needs, quality checks, and transparent communication across the data lifecycle
- https://vega.github.io/vega-lite/docs/spec.html
Supports
- Single-view specifications built from marks and encoding mappings
- Automatic axes, legends, and scales for encoded fields
- Filtering, aggregation, binning, time conversion, and sorting transformations
- https://vega.github.io/vega-lite/docs/encoding.html
Supports
- Encodings as mappings between fields or values and visual channels
- Position, color, size, shape, text, and other encoding channels
- https://vega.github.io/vega-lite/docs/scale.html
Supports
- Scales as mappings from data domains to visual ranges
- Continuous, discrete, and discretizing scale categories
- Automatic and customized scale creation for encoded fields
- https://vega.github.io/vega-lite/docs/bin.html
Supports
- Binning quantitative values into discrete groups
- Bin parameters that control histogram intervals
- https://itl.nist.gov/div898/handbook/eda/section3/histogra.htm
Supports
- Histograms as summaries of a univariate distribution
- Bins, counts, center, spread, skewness, outliers, and multiple modes
- https://itl.nist.gov/div898/handbook/eda/section3/boxplot.htm
Supports
- Box plots as compact summaries of location and variation
- Medians, quartiles, the middle half of observations, and group comparisons
- https://www.itl.nist.gov/div898/handbook/eda/section3/scatterp.htm
Supports
- Scatter plots for revealing relationships between paired variables
- Patterns involving direction, form, strength, and unusual points
- Association as distinct from proof of a causal mechanism
