Analytical Charts and Multivariate VisualizationIntroductionData visualization is the disciplined transformation of data into visual forms that support comparison, pattern recognition, explanation, and decision-making. In data wrangling, visualization is not merely a final presentation activity. It is also an analytical method for detecting errors, examining distributions, identifying relationships, and communicating evidence. This chapter focuses on analytical charts and multivariate visualization. An analytical chart is designed to help a viewer answer a question, such as: Which category is largest? How variable are the observations? Are two measures associated? How has performance changed over time? Where are values concentrated geographically? Multivariate visualization extends these questions to datasets containing several variables. A technically correct chart can still be ineffective. Visual form must match the analytical task, scales must be honest, labels must be interpretable, and uncertainty must not be hidden. The best visualization makes the important structure visible without distorting the evidence. Learning ObjectivesBy the end of this chapter, you should be able to: - select suitable charts for comparison, distribution, relationship, composition, temporal, and spatial questions;
- interpret multivariate displays using position, length, colour, shape, size, and faceting;
- calculate and display reference values and uncertainty appropriately;
- use small multiples to compare groups without excessive visual complexity;
- identify misleading scales, aggregation problems, and overplotting;
- create a defensible visualization workflow for professional reporting; and
- evaluate ethical and practical issues in visual communication.
1. The Analytical Task Comes FirstA chart should be selected after identifying the question, the data structure, and the audience. A useful decision framework is shown below. | Analytical purpose | Typical question | Suitable charts |
|---|
| Comparison | Which groups differ? | Ordered bar chart, dot plot, slope chart | | Distribution | What is the spread and shape? | Histogram, density plot, box plot, violin plot | | Relationship | Do variables move together? | Scatter plot, line plot, heat map | | Composition | What makes up a total? | Stacked bar, 100% stacked bar, treemap | | Temporal change | How does a measure change over time? | Line chart, area chart, calendar heat map | | Spatial pattern | Where do values occur? | Choropleth, proportional-symbol map, point map |
Chart selection is not determined solely by the number of variables. It also depends on whether variables are categorical, ordinal, discrete numerical, continuous numerical, temporal, or spatial. For example, a bar chart is appropriate for comparing values across categories because the lengths of bars can be compared. A pie chart requires comparison of angles and areas, which is generally less precise. A line chart implies an ordered sequence and is therefore suitable for time or another meaningful continuous progression, but usually inappropriate for unrelated categories. 2. Visual Encodings and Perceptual AccuracyA visual encoding maps a data value to a visible property. Common encodings include: - position on a common scale;
- length, as in bars;
- angle, as in pie sectors;
- area, as in circles or bubbles;
- colour hue for categories;
- colour intensity for ordered magnitude;
- shape for categories; and
- size for magnitude.
Position along a common axis is usually interpreted more accurately than area, angle, or colour intensity. Consequently, dot plots and aligned bar charts often outperform bubble charts when precise comparison is important. Colour should be selected according to the variable. Use distinct hues for nominal categories, a sequential light-to-dark scale for ordered values, and a diverging scale when a meaningful midpoint exists, such as zero or a target. A diverging scale should not be used merely because it looks attractive: it implies two directions relative to a centre. Accessibility is part of accuracy. Avoid relying only on red and green, use adequate contrast, provide direct labels or legends, and use patterns or shapes where colour discrimination may be difficult. 3. Comparison Visualizations3.1 Bar charts and dot plotsA bar chart represents category values with bars that normally begin at zero. The zero baseline matters because bar length is used to represent magnitude. If a non-zero baseline is used, small differences can appear much larger than they are. A dot plot places one marker per category on a common quantitative scale. It is compact, precise, and especially useful when categories have long names or when many groups must be compared. Ordering categories by value generally improves interpretation, unless a natural order, such as age group or education level, is analytically important. 3.2 Reference valuesA reference line provides context. It may show a target, overall mean, median, policy threshold, or previous benchmark. A reference line should be labelled explicitly and calculated using a stated population or sample. For observations x₁, x₂, …, xₙ, the arithmetic mean is: x̄ = (1/n) ∑ᵢ₌₁ⁿ xᵢ Here, x̄ is the sample mean, xᵢ is observation i, and n is the number of observations. The mean is appropriate when values are measured on a scale for which averaging is meaningful and when extreme values do not make the mean misleading. For skewed data, the median may be a more representative reference. A reference line must not be confused with a target. The mean describes observed data; a target expresses a desired condition. Their visual styles and labels should communicate this difference. 3.3 Slope chartsA slope chart connects two points for each entity, such as revenue in two years. It is effective for showing direction and magnitude of change, but becomes difficult to read with many crossing lines. Direct labelling and filtering to important entities can reduce clutter. 4. Distribution VisualizationsA distribution describes how values are concentrated, dispersed, and shaped. 4.1 HistogramsA histogram divides a numerical variable into adjacent intervals called bins. The height represents the number of observations in each bin, or density when the vertical scale is normalized. Bin width strongly affects interpretation: very wide bins conceal structure, whereas very narrow bins create visual noise. For unequal bin widths, frequency should not be represented simply by height. If frequency is nⱼ and bin width is wⱼ, density is proportional to: Densityⱼ = nⱼ / (N × wⱼ) where N is the total number of observations. This makes the area of each rectangle proportional to frequency. The formula assumes that observations are assigned to non-overlapping bins and that the vertical axis is intended to represent density. 4.2 Box plotsA box plot summarizes a distribution using the first quartile Q₁, median Q₂, and third quartile Q₃. The interquartile range is: IQR = Q₃ − Q₁ The IQR measures the spread of the middle 50% of observations and is resistant to extreme values. A common rule identifies potential outliers below Q₁ − 1.5 × IQR or above Q₃ + 1.5 × IQR. These are screening rules, not proof that an observation is erroneous. Box plots are useful for comparing distributions across groups, but they may hide multimodality and sample size differences. Overlaying jittered points or using a violin plot can reveal additional structure. 4.3 Density and empirical distributionsA density plot gives a smoothed representation of distribution shape. The smoothing parameter influences the result: excessive smoothing hides peaks, while insufficient smoothing produces an unstable curve. Density plots should be accompanied by sample sizes and should not be interpreted as showing actual individual observations. 5. Relationship Visualizations5.1 Scatter plotsA scatter plot displays paired observations for two numerical variables. It can reveal direction, form, strength, clusters, and unusual observations. Add a third variable using colour or shape only when the grouping has analytical meaning. Association does not establish causation. A positive relationship between two variables may arise from a common cause, reverse causality, selection effects, or coincidence. The Pearson correlation coefficient is: r = [∑ᵢ₌₁ⁿ (xᵢ − x̄)(yᵢ − ȳ)] / √[∑ᵢ₌₁ⁿ (xᵢ − x̄)² × ∑ᵢ₌₁ⁿ (yᵢ − ȳ)²] Here, xᵢ and yᵢ are paired observations, x̄ and ȳ are their means, and n is the number of pairs. The coefficient ranges from −1 to +1 when both variables have non-zero variance. It measures linear association, not general dependence, and can be strongly affected by outliers or nonlinear patterns. A scatter plot should therefore be examined before relying on r. A curved relationship may have a correlation near zero despite strong dependence. 5.2 Trend lines and fitted modelsA fitted line can summarize a relationship but may create an impression of certainty. The simple linear model is: yᵢ = β₀ + β₁xᵢ + εᵢ where yᵢ is the response, xᵢ is the predictor, β₀ is the intercept, β₁ is the expected change in y for a one-unit increase in x, and εᵢ is the residual. Interpretation requires attention to units, the observed range of x, influential observations, and model assumptions. A line should not be extrapolated beyond the data without strong justification. 6. Composition VisualizationsComposition charts show how parts form a total. A stacked bar chart is appropriate when both totals and components matter. A 100% stacked bar chart compares proportions while removing differences in total size. For component i in group g, its proportion is: pᵢg = vᵢg / ∑ⱼ₌₁ᵏ vⱼg where vᵢg is the value of component i in group g, k is the number of components, and the denominator is the group total. The values must be compatible and the denominator must be meaningful. Percentages should not be added across groups unless the groups are mutually exclusive and the aggregation is justified. Stacked charts make the baseline component easy to compare, while interior components are harder to compare because their baselines vary. If component-to-component comparison is primary, use grouped bars, aligned dot plots, or separate panels. Pie charts are acceptable for a small number of clearly distinct parts forming one complete total, but they are generally weak for precise comparison or many categories. A treemap can display hierarchical composition, but area comparisons are less precise and labels may become difficult. 7. Temporal VisualizationTime is ordered, and temporal charts should preserve that order. Line charts are effective for continuous measurements or regularly observed series. Points can be added when the number of observations is small or when missingness matters. Important design questions include: - Is the time interval regular?
- Are values counts, rates, stock measures, or flow measures?
- Does seasonality influence interpretation?
- Are dates aligned across groups?
- Is a moving average hiding meaningful variation?
A moving average over m observations can be written as: MAₜ = (1/m) ∑ⱼ₌₀ᵐ⁻¹ xₜ₋ⱼ where xₜ is the observation at time t and m is the chosen window length. This formula assumes equally weighted observations and a sufficiently complete time sequence. Smoothing reduces short-term noise but can conceal sudden changes and creates missing or less reliable values near the series boundaries. Dual-axis charts should be used cautiously. Two scales can make unrelated series appear related or can exaggerate alignment. Separate aligned panels often provide clearer evidence. 8. Spatial VisualizationSpatial displays connect measurements to geographic locations. A choropleth map colours areas according to a value, such as unemployment rate. It is usually unsuitable for raw counts when areas have different populations, because large or densely populated regions may dominate perception. Rates, proportions, or standardized values are often more appropriate. A rate can be expressed as: Rate = (Number of events / Population at risk) × K where K is a reporting constant such as 100, 1,000, or 100,000. The population at risk must match the event definition and time period. Proportional-symbol maps use symbol size to represent magnitude and are useful for counts at points or locations. They can suffer from overlap and area-perception problems. Point maps show individual events or sampled locations but may expose confidential information. Spatial comparisons require attention to projection, geographic unit, missing areas, and the modifiable areal unit problem: conclusions may change when boundaries or spatial scales change. Maps should include a clear legend, units, date, source, and explanation of missing or suppressed values. 9. Multivariate VisualizationMultivariate visualization represents more than two variables. The goal is not to display every available field, but to expose a meaningful analytical structure. 9.1 Encoding additional variablesA scatter plot may encode a third variable with colour, a fourth with shape, and a fifth with size. This can be effective for a small number of well-defined groups, but too many encodings increase cognitive load. Quantitative variables should generally use position or a carefully ordered colour scale; categorical variables can use shape or hue. Parallel coordinate plots represent each variable as a vertical axis and each record as a line. They are useful for detecting profiles and clusters after variables have been placed on comparable scales. However, many lines produce overplotting, and variables with different units can mislead unless standardized or otherwise interpreted carefully. A correlation heat map summarizes pairwise relationships. It is useful for screening, but correlation does not establish causality and may be inappropriate for categorical or strongly nonlinear variables unless a suitable association measure is selected. 9.2 Small multiplesSmall multiples repeat the same chart structure across groups, time periods, or locations. Consistent axes, ordering, and encodings allow the viewer to compare panels efficiently. Small multiples are often preferable to one crowded chart with many colours. They are especially valuable when the question is whether a pattern is consistent across groups. However, independent axes can exaggerate differences; shared axes improve comparability but may make small groups visually compressed. The choice should be disclosed. 9.3 Faceting and aggregationFaceting divides a dataset into panels based on one or more variables. Before faceting, decide whether each panel should show raw observations, totals, rates, or model estimates. Aggregation can simplify a display but may conceal within-group variation. A chart should state the unit of analysis and aggregation method. 10. Uncertainty and Statistical CommunicationUncertainty is an essential part of analytical visualization. A point estimate without an indication of precision may be interpreted as exact. For a sample mean, the standard error is: SE(x̄) = s / √n where s is the sample standard deviation and n is the sample size. Under appropriate conditions, an approximate 95% confidence interval for a mean is: x̄ ± t* × SE(x̄) where t* is the relevant critical value from a t distribution with n − 1 degrees of freedom. This interval is appropriate when observations are reasonably independent and the sampling or modelling assumptions support the method. It represents uncertainty in an estimation procedure; it is not a statement that 95% of individual observations lie inside the interval. Error bars must be labelled. They may represent standard deviation, standard error, confidence intervals, prediction intervals, or another quantity, and these have different meanings. For counts and proportions, uncertainty methods should reflect the data-generating process; a symmetric normal approximation may be poor for small counts or proportions near zero or one. When comparing groups, overlapping confidence intervals do not provide a complete test of equality, and non-overlap is not a universal decision rule. The visual should support, not replace, an appropriate statistical analysis. 11. A Professional Visualization WorkflowA reliable workflow is iterative: - Define the decision or question.
- Identify the observational unit and relevant variables.
- Validate data types, missing values, duplicates, units, and time zones.
- Inspect raw distributions and outliers.
- Choose an encoding that matches the task.
- Establish scales, reference values, uncertainty displays, and ordering.
- Test the chart with representative users or colleagues.
- Check accessibility, reproducibility, and source documentation.
- Revise labels, annotations, and visual hierarchy.
- Preserve the code, data preparation steps, and version information.
A chart title should communicate the main finding or question rather than merely repeat the variable name. Subtitles can state population, period, units, and method. Direct labels are often preferable to distant legends. Unnecessary gridlines, three-dimensional effects, decorative icons, and excessive colours should be removed. 12. Illustrative Case: Monitoring Community Health ServicesBackgroundA regional health authority monitors four clinics. Its dataset contains clinic, month, population served, appointments requested, appointments completed, waiting time, and service type. ProblemManagers need to know whether access is improving, whether clinics differ, which service types contribute to demand, and whether apparent differences are large relative to uncertainty. Analysis and approachThe analyst first validates that months are complete, clinic names are standardized, and waiting time is measured in the same unit. Because clinics serve different populations, raw appointment counts are not sufficient for fair comparison. Completion rate is calculated as: Completion rate = (Appointments completed / Appointments requested) × 100% A line chart with one panel per clinic shows monthly completion rates. Shared vertical axes permit comparison. A horizontal target line is labelled separately from the overall mean. Box plots compare the distribution of waiting times by clinic, with individual points added for sample-size context. A 100% stacked bar chart shows service-type composition by clinic, while a map displays rates by district only after checking that denominators and geographic boundaries are consistent. For monthly clinic estimates, 95% confidence intervals for a proportion can be obtained using an appropriate binomial method rather than automatically applying a symmetric normal approximation, particularly when the number of requests is small or the rate is close to 0% or 100%. OutcomeThe visualization reveals that Clinic A has the highest completion rate overall but substantial seasonal variation. Clinic C has a lower median waiting time but a small number of observations in some months. Clinic D appears to have high demand because it serves a larger population; its rate-based comparison is less extreme than its raw count. Managers therefore avoid ranking clinics by a single measure and investigate capacity, case mix, and seasonal staffing. Learning points- Denominators determine whether comparisons are fair.
- A small multiple can reveal variation hidden by an overall average.
- Uncertainty and sample size affect interpretation.
- Composition, outcome, and workload are different analytical questions.
- Visualization supports managerial inquiry but does not by itself establish causes.
13. Challenges, Ethics, and GovernanceVisualizations can mislead through truncated axes, selective time periods, inappropriate aggregation, unlabelled transformations, unequal denominators, or omitted uncertainty. The ethical issue is not limited to intentional deception: a technically valid chart can produce a misleading impression when context is missing. Privacy is especially important for maps and small multiples. Small groups may be re-identifiable even when names are removed. Suppress or aggregate sensitive values according to institutional policy and applicable data-protection law. Document data sources, transformations, exclusions, and suppression rules. Fairness requires checking whether a chart compares groups using measures that are equally meaningful. A rate may be appropriate for one population but unstable for a small subgroup. Colour scales and labels should not stigmatize communities or imply causal deficiency without evidence. AI-assisted chart generation can accelerate exploration, but generated charts must be checked for incorrect aggregations, hidden filtering, unsuitable scales, hallucinated interpretations, and privacy leakage. Human review, reproducible code, and provenance remain necessary. 14. Best-Practice ChecklistBefore publishing an analytical chart, ask: - What question does the chart answer?
- Is the chart type appropriate for the variable types and task?
- Are units, denominators, dates, and sources clear?
- Are categories ordered meaningfully?
- Is the baseline or scale honest?
- Are uncertainty and sample size relevant and visible?
- Could aggregation or smoothing hide important variation?
- Is the colour palette accessible and semantically appropriate?
- Are missing values, suppressed values, and exclusions explained?
- Can another analyst reproduce the result?
Chapter SummaryAnalytical visualization begins with a question, not a chart type. Comparison displays are strongest when values share a common scale; distribution displays reveal spread and shape; relationship charts show association but do not prove causation; composition charts require meaningful totals and denominators; temporal displays preserve order; and spatial displays require careful attention to rates, boundaries, and projections. Multivariate displays should add variables selectively through colour, shape, size, faceting, or coordinated panels. Small multiples reduce clutter when scales and encodings are consistent. Reference values provide context, while uncertainty communicates the limits of estimates. Professional visualization also requires accessibility, reproducibility, privacy protection, and honest visual design. Key TermsAnalytical chart: A visualization designed to answer a specific analytical question. Bar chart: A chart using bar length to compare categorical values. Box plot: A distribution summary based on quartiles, median, and selected whiskers. Choropleth: A map that shades geographic areas according to a value. Composition: The parts that make up a total. Correlation: A numerical measure of association, commonly focused on linear association. Density plot: A smoothed representation of a numerical distribution. Faceting: Dividing a visualization into panels according to one or more variables. Histogram: A chart of numerical values grouped into adjacent intervals. Interquartile range: The difference between the third and first quartiles. Multivariate visualization: A display representing more than two variables. Overplotting: Visual overlap that hides individual observations. Reference value: A benchmark, target, mean, median, or threshold used for context. Scatter plot: A display of paired numerical observations. Small multiples: Repeated, consistently designed charts for different subsets. Spatial visualization: A display that represents geographic location or area. Standard error: An estimate of the sampling variability of an estimator. Temporal visualization: A display that represents ordered observations over time. Uncertainty interval: A visual or numerical range communicating estimation uncertainty. Visual encoding: The mapping of data values to graphical properties. Review QuestionsShort Answer Questions- Why is a common quantitative scale important when comparing categories?
- Distinguish a histogram from a bar chart.
- What does the interquartile range measure?
- Why can raw counts be misleading on a choropleth map?
- What is the purpose of a reference line?
Long Answer Questions- Explain how chart selection should depend on analytical purpose and variable type.
- Compare scatter plots, correlation coefficients, and fitted lines, including their limitations.
- Explain how small multiples can improve multivariate analysis and identify situations in which they may fail.
- Discuss the role of uncertainty intervals in communicating estimates.
- Describe a professional workflow for developing a reproducible analytical visualization.
Analytical / Application Questions- A manager wants to compare appointment completion across clinics serving different population sizes. Design a visualization set and justify the denominator, chart types, reference values, and uncertainty display.
- A scatter plot shows a near-zero correlation, but the points form a clear U-shaped pattern. Explain how this can occur and propose better analytical displays or measures.
- A map shows disease counts by district, with one very large district appearing dominant. Diagnose the visualization problem and recommend a revised spatial analysis.
Multiple Choice Questions with AnswersQuestion 1Which chart is generally most suitable for comparing values across many categories on a common quantitative scale? A. Dot plot B. Pie chart C. Treemap D. Area map Correct Answer: A. Dot plot Question 2The interquartile range is calculated as: A. Q₁ + Q₃ B. Q₃ − Q₁ C. Mean − median D. Maximum − minimum Correct Answer: B. Q₃ − Q₁ Question 3What does a Pearson correlation coefficient primarily measure? A. Causal influence B. Linear association C. Distributional skewness D. Sampling size Correct Answer: B. Linear association Question 4Which display is most appropriate for showing how components form 100% of each group? A. 100% stacked bar chart B. Scatter plot C. Box plot D. Slope chart Correct Answer: A. 100% stacked bar chart Question 5Why are rates often preferred to raw counts on a choropleth map? A. Rates remove all uncertainty B. Rates account for differences in population denominators C. Rates require no geographic boundaries D. Rates always show causation Correct Answer: B. Rates account for differences in population denominators Question 6In the formula SE(x̄) = s/√n, what does n represent? A. The sample size B. The population mean C. The standard deviation D. The confidence level Correct Answer: A. The sample size Question 7What is a major advantage of small multiples? A. They allow unrelated scales in every panel without explanation B. They reduce the need for data validation C. They support comparison across consistently designed panels D. They guarantee causal conclusions Correct Answer: C. They support comparison across consistently designed panels Question 8A reference line labelled 'target' differs from a line showing the overall mean because the target: A. Is always calculated from the sample median B. Represents a desired benchmark rather than an observed summary C. Cannot be displayed on a chart D. Must equal zero Correct Answer: B. Represents a desired benchmark rather than an observed summary Question 9Which issue is most directly associated with a histogram's bin width? A. It changes the geographic projection B. It can conceal or exaggerate distribution structure C. It determines the sample's population denominator D. It proves whether variables are causal Correct Answer: B. It can conceal or exaggerate distribution structure Question 10Why should a fitted line not normally be extrapolated far beyond the observed data? A. The line has no intercept B. Predictions outside the observed range may not be supported by the data C. Scatter plots cannot contain numerical values D. Correlation is always exactly zero outside the range Correct Answer: B. Predictions outside the observed range may not be supported by the data
|