Source note: The course outline and its five units were supplied manually by the user. They have not been independently verified against a Tribhuvan University document. This guide explains that outline; it does not certify it as an official syllabus. All explanations are original study material written to expand the user-supplied topics.
Course overview
Data visualization turns data into visual forms that help people inspect patterns, compare values, understand structure, and make decisions. Good visualization starts with a question and a data model, chooses visual encodings that match the data, and checks whether the result is accurate and readable. A chart can clarify evidence, but a poor scale, unsuitable color, clutter, or missing context can mislead. This course moves from perception and visual design to non-spatial and spatial data, then applies the ideas to common datasets and tools. Each topic below is expanded with a definition, theory, a worked example, a realistic use case, comparisons where concepts are easily confused, common mistakes and limitations, exam-ready answer points, and self-check questions with answers.
Learning outcomes
Derived only from the supplied outline. After studying the listed topics, students should be able to:
- Explain the concept of visualization in the processing and analysis of data.
- Develop visualization methods and visualization systems using software applications.
- Perform creative work in the field of visualization.
Unit 1: Introduction to Visualization — 6 hours
1.1 Visual perception
Definition and why it matters. Visual perception is how the visual system detects and interprets light, shape, position, and difference. Some features are noticed rapidly, before conscious reading of each mark: a red item among gray items, a long bar among short bars, or a point far from a cluster. These preattentive features support fast visual search and grouping. Perception matters because a visualization only works if a viewer can see the intended comparison quickly and accurately.
Core theory. Preattentive attributes include color, orientation, length, size, and position. Position along a common scale is usually easier to compare precisely than area, angle, or color intensity. Designers should encode the most important quantitative comparison using position or length where practical. Perception is affected by context, contrast, viewing size, color vision, and prior expectations; the same mark can look different against different backgrounds. Test a chart at its actual display size and ask viewers to perform the intended task.
Worked example. A store compares daily sales for five products: A = 120, B = 95, C = 140, D = 80, E = 110. Two encodings are compared:
- Bar chart: product on the y-axis, sales as bar length along a shared x-axis from 0. Reader compares lengths against a common baseline; longest bar (C = 140) is identified in under a second.
- Pie chart: each product as a slice angle. Reader must compare angles without a baseline; identifying C as largest takes longer and is less accurate. Intermediate step: convert values to lengths (pixels per unit = 2) → A = 240 px, B = 190 px, C = 280 px, D = 160 px, E = 220 px. Position/length encoding wins on speed and accuracy.
Realistic use case. A warehouse dashboard flags out-of-stock items in red among gray in-stock items. The red color pops out preattentively, so a worker scans hundreds of rows and spots exceptions immediately.
Comparison.
| Channel | Best for | Weakness |
|---|---|---|
| Position / length | Quantitative comparison, ranking | Needs a common baseline |
| Area | Rough magnitude | Less precise than length |
| Angle | Part-to-whole (few slices) | Hard to compare multiple slices |
| Hue | Categorical labels | Not ordered; limited distinct hues |
Common mistakes and limitations. Truncated bar axes exaggerate differences because bar length implies a zero baseline. Relying on red-versus-green alone excludes readers with color-vision deficiencies. Asking only whether a chart "looks good" instead of testing a concrete task (e.g., "find the largest category") misses real errors.
Exam-ready answer points. Define preattentive processing; name position and length as the most precise quantitative channels; explain why a common baseline and actual-size task testing matter; list contextual factors (contrast, size, color vision, expectation).
Self-check questions.
- Which channel is usually the most precise for comparing quantities? A: Position along a common scale.
- Name one preattentive feature. A: Color, orientation, length, size, or position (any one).
- Why test a chart at actual size with a task? A: Perception depends on viewing size and context; only task performance reveals real errors.
1.2 Visual representation of data
Definition and why it matters. A visual representation maps data values to visible marks such as points, lines, bars, cells, or regions. The representation is not the data itself: aggregation, filtering, scales, and missing-value rules change what readers see. Choosing a chart requires knowing the observational unit, the variables, and the task (compare, locate, rank, find a trend, inspect a relationship).
Core theory. Marks encode records (points in scatter plots, bars for categories, lines for trends). Channels carry values (position, length, color). Before choosing a chart, state units, labels, time period, and transformations. A representation should preserve the properties needed to answer the question: a scatter plot reveals association, clusters, and outliers; a bar chart supports category comparison; a map adds location when it matters.
Worked example. Table of monthly sales:
| Month | Sales |
|---|---|
| Jan | 12000 |
| Feb | 15000 |
| Mar | 11000 |
| Mapping month → horizontal position, sales → vertical position, mark = point/line. Trace row (Feb, 15000): x-position at "Feb", y-position at 15000 on a 0–20000 linear scale. Inverse reading: a mark above "Mar" at height 11000 reads back as approximately 11000. Missing February would leave a gap or a dropped mark, which must be disclosed. |
Realistic use case. A support team charts weekly ticket counts by priority. Each ticket is the observational unit; priority and week are variables; the task is to track volume over time, so a line chart is suitable.
Comparison.
| Chart | Best for | Avoid when |
|---|---|---|
| Bar | Comparing categories | Showing continuous trends |
| Scatter | Relationship between two quantities | Lookup of exact values |
| Map | Location-dependent patterns | Location is irrelevant |
Common mistakes and limitations. Treating the chart as the data (forgetting aggregation/filtering changed it); unlabeled axes and missing units; treating missing values as zero without disclosure; connecting unordered categories with a line, which falsely implies continuity.
Exam-ready answer points. Define visual representation; distinguish mark vs channel; list pre-choice questions (unit, variables, task); state what must accompany every chart (units, labels, time, transformations).
Self-check questions.
- Is a chart the data itself? A: No; it is a representation shaped by aggregation, filters, scales, and missing-value rules.
- Name three things to identify before choosing a chart. A: Observational unit, variables, and analysis task.
- What should every axis show? A: Label, units, and scale.
1.3 Data abstraction
Definition and why it matters. Data abstraction describes a dataset in visualization-relevant terms: data types, structure, domain, and which attributes are relevant. Correct abstraction prevents unsuitable charts, such as treating unordered categories as continuous measurements.
Core theory. Data types: categorical (names groups), ordinal (ordered), quantitative (measures magnitude), temporal (time), spatial (location/geometry). Structure: tables (records/attributes), trees (parent-child), graphs (nodes/edges), fields (values across space). Distinguish domain (what a value means) from data type (how it can be compared). Decide which attributes are relevant, which records are entities, and whether the task needs raw or aggregated values.
Worked example. Dataset of districts:
| District | Population | Survey date |
|---|---|---|
| A | 500000 | 2024-03-10 |
| B | 320000 | 2024-03-12 |
| Abstraction: district name = categorical; population = quantitative; survey date = temporal. Domain of population = number of residents; type = quantitative (can add/average). Raw vs aggregated: raw population vs per-capita density (population ÷ area) answers a different question. |
Realistic use case. A city dashboard chooses per-capita rather than raw counts when comparing districts of different sizes, because raw counts would favor large districts regardless of intensity.
Comparison.
| Type | Example | Suitable channels | Not suitable |
|---|---|---|---|
| Categorical | District name | Hue, shape, position | Ordered scale |
| Ordinal | Satisfaction (low/med/high) | Ordered lightness, position | Unordered hue |
| Quantitative | Population | Position, length, area | Hue alone for magnitude |
| Temporal | Survey date | Position on time axis | Categorical spacing |
| Spatial | District boundary | Position on map, region | Bar length |
Swipe to see all columns
Common mistakes and limitations. Treating unordered categories as continuous; confusing domain with data type; aggregating when raw values are needed (or vice versa) without stating the rule.
Exam-ready answer points. List the five data types with examples; distinguish domain vs data type; name table/tree/graph/field structures; explain why abstraction precedes chart choice.
Self-check questions.
- Difference between domain and data type? A: Domain is what a value means; data type is how it can be compared.
- Is "district name" categorical or quantitative? A: Categorical.
- When might raw values mislead? A: When group sizes differ; aggregated (e.g., per-capita) may be fairer.
1.4 Visual encodings
Definition and why it matters. Visual encoding maps attributes to channels such as x/y position, length, area, shape, hue, saturation, and line style. Channels must match perceptual strength and data type, because a poor encoding makes comparison difficult or wrong.
Core theory. Use position and length for quantitative comparison. Hue separates categories; ordered lightness represents ordered magnitude. Shape distinguishes a small number of categories but becomes hard to read when symbols overlap. Area is useful for rough magnitude but is compared less precisely than length. A scale converts data values into channel values: a linear position scale preserves equal differences; a logarithmic scale represents multiplicative change and needs explicit explanation. Keep encodings consistent across panels and legends. Do not use a color gradient for nominal groups or a rainbow palette for a single ordered quantity.
Worked example. City populations: Smalltown = 1 000, Midville = 10 000, Bigcity = 100 000. Linear bar scale 0–100 000: bars are 1, 10, 100 units — Smalltown is invisible next to Bigcity. Log scale: log10(1000) = 3, log10(10000) = 4, log10(100000) = 5, so the three bars are equally spaced and each city is visible. The axis must be labeled "log scale" so readers interpret equal distances as tenfold changes, not equal differences.
Realistic use case. A national dashboard maps city populations spanning three orders of magnitude; a log-scaled bar chart shows small and large cities together, with a note explaining the log scale.
Comparison.
| Scale | Meaning of equal distance | Use when |
|---|---|---|
| Linear | Equal difference | Additive comparisons, values near zero |
| Logarithmic | Equal ratio (multiplicative) | Wide range, orders of magnitude |
Common mistakes and limitations. Rainbow palette for one ordered quantity implies false structure; gradient for nominal groups implies order where none exists; inconsistent legends across panels confuse readers; log scale without explanation misleads about differences.
Exam-ready answer points. Match channels to data types; contrast linear vs log scales; explain why hue suits categories and lightness suits order; state the rainbow/gradient prohibitions.
Self-check questions.
- Which scale preserves equal differences? A: Linear scale.
- When is a log scale appropriate? A: Wide-ranging, multiplicative data (with explanation).
- Should a rainbow palette encode one ordered quantity? A: No; it implies false structure.
1.5 Use of color
Definition and why it matters. Color labels categories, shows ordered intensity, or emphasizes a selected value. Used well it guides attention; used poorly it excludes readers or creates false impressions.
Core theory. For categories, choose visually distinct hues and limit the number of groups. For sequential data, vary lightness monotonically from low to high. For values diverging around a meaningful midpoint, use two hues that meet at a neutral center. Check contrast against the background and keep labels readable. Do not rely on red-versus-green alone (color-vision deficiency; monochrome printing removes it). Pair color with labels, shapes, or patterns when category identity is essential. Use emphasis sparingly: if every mark is bright, none is prominent. A legend shows the mapping; a color bar communicates numeric order and endpoints.
Worked example. Temperature map (°C): sequential scale from light blue (−10) to dark blue (40). Steps: low = light, mid = medium, high = dark, monotonic in lightness. Diverging profit/loss map around 0: negative = shades of red, positive = shades of green, zero = neutral gray, with a color bar labeled −100 to +100 and midpoint 0. Accessibility check: simulate deuteranopia; red/green pairs fail, so add hatching or labels.
Realistic use case. A server-load heatmap uses a color-blind-safe sequential palette (dark = high load) with numeric labels in each cell, so operators can act even if color is misread.
Comparison.
| Color scheme | Data type | Example |
|---|---|---|
| Distinct hues | Categorical | Product categories |
| Sequential lightness | Ordered magnitude | Temperature, density |
| Diverging two hues | Values around midpoint | Profit/loss, deviation from average |
Common mistakes and limitations. Red-versus-green as the only distinction; making every mark bright so nothing stands out; missing legend or color bar; low contrast against background; assuming screen colors survive printing.
Exam-ready answer points. Name sequential, diverging, and categorical schemes with examples; explain accessibility (color-vision deficiency, printing); state when to pair color with labels/patterns.
Self-check questions.
- Which scheme fits profit/loss around zero? A: Diverging scheme with a neutral midpoint.
- Why not red-versus-green alone? A: Color-vision deficiency and monochrome printing.
- What does a color bar communicate? A: Numeric order and endpoints.
1.6 Perceptual issues
Definition and why it matters. Perceptual issues arise when visual choices make values hard to compare or create an impression unsupported by the data. Recognizing them lets a designer prevent misleading charts before publication.
Core theory. Truncated bar-chart axes exaggerate differences because bar length implies a zero baseline. Unequal bins distort histograms. Overplotting hides dense points; remedies are transparency, jitter for discrete values, hexagonal bins, or density contours. Perspective and 3D effects obscure relative size. Small text, low contrast, similar hues, and crowded labels reduce access. Use common baselines for comparisons, disclose transformations, and check whether area/volume encoding exaggerates values. Ask a reviewer to complete a concrete task (e.g., "identify the largest category") and observe errors rather than asking only whether the chart looks good.
Worked example. Same data (A = 98, B = 100, C = 102) drawn twice: (1) y-axis 0–110 → bars nearly equal, difference looks small; (2) y-axis 95–105 → A tiny, C large, difference looks dramatic. The truthful view uses the 0 baseline; the difference is (102−98)/98 ≈ 4.1%, not the visual doubling implied by truncation. Overplotting: 500 overlapping points → hexbin with color density reveals the true cluster.
Realistic use case. An executive chart of quarterly profit uses a truncated axis (90–110) to make a 2% rise look large; a reviewer re-draws from zero and the change is modest.
Comparison.
| Axis | Visual effect | Truthful reading |
|---|---|---|
| 0 baseline | Bars reflect true ratios | Difference = 4.1% |
| Truncated (95–105) | C looks twice A | Exaggerated, misleading |
Common mistakes and limitations. Cutting the baseline on bar charts; 3D pie charts distorting slice size; not disclosing smoothing or binning; area/volume encoding exaggerating differences; relying on subjective appeal instead of task testing.
Exam-ready answer points. Explain why bar charts need a zero baseline; list overplotting remedies; name 3D/perspective problems; describe a task-based review.
Self-check questions.
- Why should bar charts start at zero? A: Bar length encodes magnitude; truncation exaggerates differences.
- Name one overplotting remedy. A: Transparency, jitter, hex bins, or density contours.
- What is better than asking "does it look good"? A: Observing a reviewer complete a concrete task.
1.7 Information overloads
Definition and why it matters. Information overload occurs when a display presents more marks, labels, controls, or dimensions than readers can interpret. Reducing overload keeps the answer to the user's question visible.
Core theory. Overload comes from too many categories, excessive detail, dense annotation, or interfaces that make users remember earlier states. Reduce it by prioritizing one question, grouping related information, filtering carefully, and exposing detail progressively. Aggregation summarizes large datasets, but keep a path to inspect underlying records. Small multiples often compare more clearly than one crowded chart. Interaction should serve a task, not add purposeless controls. Preserve context when filtering and show how many records remain. Never hide important exclusions or imply a sample is the complete population.
Worked example. A bar chart of 50 product categories is unreadable. Redesign: show the top 10 categories in one bar chart, group the rest into "Others," and offer a second small multiple for the remaining 40 when a user drills down. A footer states "40 of 50 categories shown as Others; total n = 1,200 records."
Realistic use case. A dashboard with 20 KPIs overwhelms users; progressive disclosure shows 4 primary KPIs first, with detail panels opened on demand.
Comparison.
| Approach | When to use | Trade-off |
|---|---|---|
| One crowded chart | Few categories | Becomes unreadable as categories grow |
| Small multiples | Many categories/series | More space, clearer per-panel comparison |
Common mistakes and limitations. Hiding sample size after filtering; implying a filtered sample is the whole population; unlabeled filters that change state invisibly; adding controls without a task.
Exam-ready answer points. List causes of overload; explain small multiples vs one crowded chart; state why context and record counts must remain visible when filtering; warn against sample = population.
Self-check questions.
- When are small multiples preferable? A: When many categories or series would crowd one chart.
- What should remain visible during filtering? A: Context, active filters, and number of records remaining.
- Why not imply a sample is the population? A: It overstates the scope of conclusions.
Unit 1 key terms: mark, channel, encoding, scale, domain, attribute, preattentive feature, aggregation, overplotting, visual hierarchy.
Unit 1 summary: Start with data meaning and task. Choose marks and channels that fit the variables. Check perception, color, scales, accessibility, and density.
Unit 2: Creating Visual Representations — 7 hours
2.1 Visualization reference model
Definition and why it matters. A reference model treats visualization as a sequence of transformations: raw data is selected and cleaned, transformed or summarized, mapped to marks and channels, rendered, and perceived and interpreted by a viewer. Interaction can change a selection, transformation, or view, then repeat the process. Each stage can introduce error, so the model doubles as a diagnostic tool.
Core theory. Stages and possible errors: (1) select and clean — missing-value rules may remove records; (2) transform and summarize — aggregation may conceal variation; (3) map values to marks and channels — an encoding may make comparison difficult; (4) render display — labels may be clipped; (5) perceive and interpret — the viewer may misread. Keep transformations reproducible and inspect intermediate data. When a visualization looks wrong, ask whether the problem lies in the source, transformation, mapping, display, or interpretation.
flowchart LR A[Raw data] --> B[Select and clean] B --> C[Transform and summarize] C --> D[Map values to marks and channels] D --> E[Render display] E --> F[Perceive and interpret] F -->|interaction or new question| B
The arrows show a data-to-display pipeline. Interaction can trigger a new selection or transformation, producing an updated view.
Worked example. Trace one record: source row (Mar, Widget, 8500). Stage 1: cleaning removes rows with missing sales — this record survives. Stage 2: monthly aggregation sums Widget sales to 8500. Stage 3: mapping sends month→x, sales→y, product→color. Stage 4: rendering clips the y-axis label "Sales" at the edge. Stage 5: a viewer reads the bar as "about 8000" because the label is clipped. Error located at stage 4 (rendering), fixed by expanding the margin; re-render and confirm the label reads fully.
Realistic use case. A dashboard's monthly totals do not match the source database; tracing the pipeline reveals an aggregation stage that accidentally dropped nulls instead of treating them as zero.
Comparison.
| Pipeline stage | Typical error | Check |
|---|---|---|
| Select and clean | Records dropped by missing-value rule | Row counts before/after cleaning |
| Transform and summarize | Aggregation hides variation | Compare raw vs aggregated spread |
| Map values | Unsuitable channel for the data type | Type–channel match |
| Render | Clipped labels, wrong scale | View at actual size |
| Perceive and interpret | Viewer misreads the mark | Task-based review |
Common mistakes and limitations. Non-reproducible transformations; never inspecting intermediate data; assuming the rendering is neutral; skipping the inverse read (mark back to approximate value).
Exam-ready answer points. Name the five pipeline stages; give two error examples (incorrect aggregation, unsuitable scale); explain how to use the model diagnostically.
Self-check questions.
- Name the five stages of the reference model. A: Select and clean, transform and summarize, map values to marks/channels, render display, perceive and interpret.
- How is the model used when a chart looks wrong? A: Check each stage (source, transformation, mapping, display, interpretation) to locate the error.
- Why inspect intermediate data? A: Errors can be introduced at any stage and may not be visible in the final chart.
2.2 Visual mapping
Definition and why it matters. Visual mapping assigns data attributes to visual channels and defines scales, marks, and legends. A mapping specification records the decisions so the visualization can be understood, audited, and reproduced.
Core theory. Example: a table with month, product, and sales. A line chart maps month → horizontal position, sales → vertical position, product → color. The mapping preserves time order, uses a quantitative vertical scale, and keeps product colors stable across views. Each field's type must match its channel: connecting unordered categories with a line suggests continuity that may not exist. A mapping specification documents filters, aggregation, units, missing values, and scale behavior. Validate by tracing a known row from source value to displayed mark and by checking inverse reading (mark → approximate value).
Worked example. Mapping table for month/product/sales:
| Attribute | Channel | Scale |
|---|---|---|
| Month | x position | Time, ordered |
| Sales | y position | Linear, 0-based |
| Product | color | Categorical, distinct hues |
| Trace row (March, Widget, 8500): x at "March", y at 8500 on a 0–20000 axis, color = Widget's assigned hue. Inverse reading: a viewer sees the Widget bar at March and estimates ≈ 8500, confirming the mapping is readable. |
Realistic use case. A business-intelligence tool uses field wells (rows/columns/color/size); an analyst maps fields and saves the specification so colleagues can reproduce the view.
Comparison.
| Data structure | Suitable mapping | Why |
|---|---|---|
| Ordered time | Line, time axis | Preserves sequence and gaps |
| Unordered categories | Bar, dot | No false continuity implied |
Common mistakes and limitations. Connecting unordered categories with a line; an undocumented scale; unstable colors across views; missing units in legends.
Exam-ready answer points. Define visual mapping; list mapping-specification contents; describe validation by trace and inverse reading; warn against lines for unordered categories.
Self-check questions.
- What should a mapping specification document? A: Filters, aggregation, units, missing values, and scale behavior.
- How do you validate a mapping? A: Trace a known row source → mark; check inverse reading mark → value.
- Why avoid lines between unordered categories? A: It suggests continuity that may not exist.
2.3 Visual analytics
Definition and why it matters. Visual analytics combines interactive visualization with analytical methods to support reasoning over complex data. It lets a user filter records, compare subsets, inspect trends, and examine surprising points while computation ranks, clusters, or summarizes.
Core theory. The analyst remains responsible for data quality, assumptions, and uncertainty. A useful workflow links overview → zoom/filter → details-on-demand: first see broad patterns, then focus on a subset, then inspect records. Keep actions reversible, show active filters, and communicate whether a computed result is approximate. A chart supports a specific analytic task; visual inspection alone does not prove causation.
Worked example. An analyst opens a sales dashboard (overview), sees a spike in the North region, filters to North (zoom/filter), then drills into individual transactions (details-on-demand) and finds a data-entry error: one order was keyed as 10,000 instead of 1,000. Computation had clustered North as high-performing; visualization revealed the error.
Realistic use case. A fraud-detection system highlights anomalous transactions; an analyst filters by amount and time, inspects the flagged records, and confirms or rejects each case.
Comparison.
| Stage | Purpose | Example action |
|---|---|---|
| Overview | See broad patterns | Full time-series line |
| Zoom/filter | Focus on a subset | Filter to one region |
| Details-on-demand | Inspect records | Show individual transactions |
Common mistakes and limitations. Claiming causation from a visual pattern; hidden filters changing results; treating approximate computation as exact; no way to undo an action.
Exam-ready answer points. Define visual analytics; describe overview–zoom/filter–details-on-demand; list analyst responsibilities (quality, assumptions, uncertainty); state that visual inspection does not prove causation.
Self-check questions.
- What is the purpose of details-on-demand? A: Inspect individual records after focusing on a subset.
- Does a visual pattern prove causation? A: No; it suggests a relationship to investigate.
- What should always be shown during filtering? A: The active filter state.
2.4 Design of visualization applications
Definition and why it matters. Design begins with users, decisions, and tasks: define what a reader needs to know, what data supports it, and what uncertainty remains. Good design makes the primary finding obvious and supports the reader's task.
Core theory. Sketch alternative views before implementing. Establish a visual hierarchy: title and key finding first, primary chart next, supporting detail and source notes nearby. Use readable labels, consistent units, meaningful defaults, and responsive layouts. Interaction needs clear controls, feedback, keyboard access, and a reset option. Test with representative data including empty, extreme, and missing values. Evaluate by task completion, correctness, time, and user feedback. Document the data source, refresh date, definitions, and caveats. Avoid decorative effects that compete with the information.
Worked example. Redesign a cluttered sales dashboard: (1) title states the key finding ("North region sales fell 12% in Q3"); (2) primary chart shows the trend; (3) supporting table lists regions; (4) source note cites the database and refresh date. A reset button clears all filters; a test with an empty month shows a "no data" message instead of a blank chart.
Realistic use case. A public-health dashboard leads with the headline metric (new cases), shows the trend chart, then exposes age-group detail and source notes below.
Comparison.
| Element | Functional | Decorative (avoid) |
|---|---|---|
| Title | States key finding | Stylized text with no information |
| Color | Encodes data or emphasis | Gradient background |
| Chart | Answers a task | 3D effect with no data value |
Common mistakes and limitations. Missing reset control; undocumented source or definitions; decorations competing with information; no test with empty/extreme values; evaluation based only on aesthetics.
Exam-ready answer points. State the visual hierarchy order; list evaluation metrics (task completion, correctness, time, feedback); name what to document (source, refresh date, definitions, caveats).
Self-check questions.
- What comes first in visual hierarchy? A: Title and key finding.
- Name three evaluation metrics. A: Task completion, correctness, time (or user feedback).
- Why include a reset control? A: So users can undo interaction and return to the base view.
Unit 2 key terms: transformation, visual mapping, rendering, interaction, visual analytics, overview, filter, details-on-demand, reproducibility.
Unit 2 summary: Trace the complete pipeline. Make every transformation and mapping explicit. Design around user tasks and test with realistic cases.
Unit 3: Non-spatial Data Visualization — 15 hours
3.1 One-, two-, and multidimensional data
Definition and why it matters. One-dimensional data has one variable of interest; two-dimensional observations have two variables; multidimensional records contain several attributes. The chart structure must match the data structure, and not every field should be encoded at once.
Core theory. One variable (e.g., exam scores): dot plot, histogram, or box plot shows the distribution. Two variables (e.g., height and weight): scatter plot exposes association and outliers. Several attributes: begin with the main relationship, then add variables through facets, small multiples, linked views, or carefully chosen color and size. Standardize units before comparing unlike measurements. Correlation in a two-dimensional plot does not establish cause; a third variable may explain an apparent relationship. State what each axis and channel represents.
Worked example. Exam scores for 8 students: 55, 60, 68, 72, 75, 80, 85, 88. Histogram bins of width 10: 50–59 = 1, 60–69 = 2, 70–79 = 2, 80–89 = 3. Intermediate step: count per bin then draw bar heights. Two variables: height (cm) vs weight (kg) for 6 students plotted as a scatter; a third variable (gender) is added by color in a small multiple, not by crowding all into one glyph.
Realistic use case. A teacher reviews score distribution (histogram), then height vs weight (scatter), then adds gender by color in side-by-side panels.
Comparison.
| Dimensionality | Example | Typical chart |
|---|---|---|
| One variable | Exam scores | Histogram, box plot, dot plot |
| Two variables | Height vs weight | Scatter plot |
| Multiple variables | Height, weight, gender, age | Scatter + color + small multiples |
Common mistakes and limitations. Encoding every field at once (clutter); correlation = causation; comparing variables in different units without standardization; ignoring the third variable that explains a pattern.
Exam-ready answer points. Name charts for one/two/multiple variables; state why correlation does not imply causation; explain standardization before comparing unlike units.
Self-check questions.
- Which chart shows one-variable distribution? A: Histogram, dot plot, or box plot.
- Does scatter correlation prove causation? A: No; a third variable may explain it.
- Why standardize units? A: Unlike measurements cannot be compared directly.
3.2 Tabular data
Definition and why it matters. Tables are effective when users need exact values, lookup, or comparison across a modest number of rows and columns. They complement charts: charts show patterns, tables show precision.
Core theory. Sort rows to reveal ranking; group related columns; align numbers by decimal point; include units in headers. Use visual emphasis for exceptions rather than coloring every cell. For many rows, add search, filtering, pagination, or a summary chart while keeping column headings visible. A heatmap reveals patterns across a matrix but makes precise value retrieval harder; include a scale and optionally numeric values. Check that missing data is distinguishable from zero. Explain whether totals are sums, averages, or another aggregation.
Worked example. Small product table:
| Product | Revenue | Units |
|---|---|---|
| A | 12000.50 | 240 |
| B | 8500.00 | 170 |
| C | 15000.75 | 300 |
| Sorted by revenue descending: C, A, B. Numbers right-aligned by decimal; header "Revenue (USD)". Missing units for product D shown as "—", not 0. Total revenue row labeled "Sum = 35501.25", not just "Total". |
Realistic use case. A finance clerk looks up last month's revenue for a specific product; a sorted, aligned table with units gives the exact value faster than a chart.
Comparison.
| Table | Heatmap |
|---|---|
| Exact lookup and ranking | Pattern across many cells |
| Precise values | Harder to read exact numbers |
Common mistakes and limitations. Treating missing as zero; undisclosed aggregation for totals; missing units in headers; coloring every cell so exceptions vanish; too many rows without search or pagination.
Exam-ready answer points. List table best practices (sort, align decimals, units in headers); distinguish missing vs zero; state when to prefer a table over a chart; explain heatmap trade-off.
Self-check questions.
- When is a table better than a chart? A: For exact values, lookup, or modest row/column comparison.
- How should missing data appear? A: Distinct from zero (e.g., "—"), with a rule stated.
- What must a total row state? A: The aggregation rule (sum, average, count).
3.3 Quantitative values and scatter plots
Definition and why it matters. Quantitative values represent measurable amounts. A scatter plot places each observation at coordinates (x, y) for two quantitative variables and reveals clusters, direction, spread, nonlinear patterns, and unusual points.
Core theory. Use consistent axis scales and state units. A point above the overall trend may be an outlier; verify data quality before removing it. When many points overlap, use transparency, jitter for discrete values, hexagonal bins, or density surfaces. A trend line summarizes association; report its method and avoid implying causation. Example: plot study hours against exam score, then inspect whether a few high-hour observations dominate the relationship.
Worked example. Data (hours, score): (1, 55), (2, 60), (3, 68), (4, 72), (5, 75), (6, 80), (7, 85), (8, 88). Plot x = hours 1–8, y = score 55–88 on linear axes. Intermediate observation: points rise together → positive association. Point (8, 88) sits near the trend; a hypothetical point (2, 90) would be an outlier to verify before removal. Trend line computed by least squares (method stated: ordinary least squares); report slope ≈ 4.7 points per hour but do not claim studying causes higher scores.
Realistic use case. A marketing team plots ad spend vs conversions; the scatter shows a positive association, but they do not conclude ad spend causes conversions without ruling out seasonality.
Comparison.
| Scatter plot | Line chart |
|---|---|
| Relationship of two quantities | Change over ordered time |
| No connection between points | Connects ordered observations |
Common mistakes and limitations. Removing an outlier without verifying data quality; implying causation from association; inconsistent axis scales; overplotting with many points.
Exam-ready answer points. Define scatter plot and what it reveals; state outlier handling (verify before removing); name overplotting remedies; warn correlation ≠ causation; give the study-hours example.
Self-check questions.
- What does a scatter plot reveal? A: Clusters, direction, spread, nonlinear patterns, outliers.
- What to do before removing an outlier? A: Verify data quality.
- Name one overplotting remedy. A: Transparency, jitter, hex bins, or density contours.
3.4 Separate, order, and align: bar, stacked bar, dot, and line charts
Definition and why it matters. Separate categories with position, order them by value or a meaningful sequence, and align comparable marks to a common baseline. Each chart serves a different comparison task.
Core theory. Bar chart: compare categories; begin at zero when bar length encodes magnitude. Stacked bar: shows a total and parts, but only the bottom segment shares a common baseline, so middle segments are harder to compare. Dot plot: uses position and is compact for ranked values. Line chart: connects ordered observations, usually over time; do not connect unrelated categories as if continuous. Example: line for monthly sales, bars for sales by product. Label series clearly, keep color consistent, and consider small multiples when many lines overlap.
Worked example. Product sales: A = 12000, B = 8500, C = 15000, D = 6000. Bar chart ranked descending (C, A, B, D) from zero → immediate ranking. Stacked bar of two regions per product: only the bottom region shares the baseline; comparing the top region across products is harder. Dot plot of the same values ranked compactly. Line chart of monthly sales (Jan–Jun) connects points in time order; connecting products A–D with a line would falsely imply continuity.
Realistic use case. A regional sales report uses ranked bars for product comparison and a line for monthly trend; each chart matches its task.
Comparison.
| Chart | Best for | Key constraint |
|---|---|---|
| Bar | Category comparison | Zero baseline for magnitude |
| Stacked bar | Total and parts | Only bottom segment has common baseline |
| Dot plot | Ranked values, compact | Position-based reading |
| Line | Ordered series, usually time | Do not connect unordered categories |
Common mistakes and limitations. Truncated baseline exaggerates bar differences; stacking many segments makes middle segments unreadable; connecting unrelated categories with a line; too many overlapping lines without small multiples.
Exam-ready answer points. State when to use each chart; explain the zero-baseline rule; describe the stacked-bar baseline limitation; contrast line (time) vs bar (category).
Self-check questions.
- Why start bar charts at zero? A: Bar length encodes magnitude; truncation exaggerates differences.
- Which segment of a stacked bar shares the baseline with all others? A: Only the bottom segment.
- When is a line chart appropriate? A: For ordered observations, usually over time.
3.5 Tree data and displaying hierarchical structures
Definition and why it matters. Tree data represents parent–child relationships without cycles; each child has one parent except the root. Examples: folder structures, organization charts, nested categories. The layout should match the task (find a path, compare siblings, inspect composition).
Core theory. Indented lists and node-link trees make ancestry explicit. Treemaps use nested rectangles to show hierarchy and part-to-whole magnitude, but small rectangles are difficult to label and compare. Sunburst layouts show levels as rings, though angle and area are hard to estimate. Maintain a clear root, readable labels, and a consistent rule for parent values. Do not imply a parent total equals the sum of children unless it does.
Worked example. Organization tree: CEO → [Engineering, Sales]; Engineering → [Frontend, Backend] with employees (Frontend = 8, Backend = 12). Treemap rectangle area proportional to employees; Engineering = 20 (sum), but label explicitly states "Engineering = Frontend + Backend". Sunburst: inner ring = departments, outer ring = teams; compare angle sizes carefully because small slices are hard to judge.
Realistic use case. A file explorer shows folders (tree) and disk usage per folder (treemap area = size) so a user finds large folders quickly.
Comparison.
| Layout | Strength | Weakness |
|---|---|---|
| Node-link tree | Clear paths and ancestry | Becomes cluttered for large trees |
| Treemap | Part-to-whole, compact | Small rectangles hard to label/compare |
| Sunburst | Multiple levels as rings | Angle and area hard to estimate |
Common mistakes and limitations. Implying parent = sum when it is not true; unlabeled small treemap rectangles; deep nesting that exceeds label space; cycles mistakenly allowed in a tree.
Exam-ready answer points. Define tree (no cycles, one parent except root); compare node-link, treemap, sunburst; state parent-value rule; choose layout by task.
Self-check questions.
- What defines a tree? A: Parent–child links, no cycles, one parent except the root.
- What is a treemap weakness? A: Small rectangles are hard to label and compare.
- When may a parent equal the sum of children? A: Only when that rule is true and stated.
3.6 Graph data, graph drawing, and labeling rules
Definition and why it matters. Graph data contains nodes and edges representing entities and relationships. Unlike trees, graphs can contain cycles and nodes with several connections. Layout choices affect readability but are not evidence of geography or causality.
Core theory. A node-link diagram shows connectivity; adjacency matrices are often better for dense graphs because cells encode edge presence or weight. Layout algorithms position nodes to reduce crossings or reveal clusters, but layout is not evidence of geographic position or causal direction. Define whether edges are directed, weighted, or duplicated. Label important nodes and provide a legend. Avoid labeling every edge in a dense graph; use filtering or focus-plus-context. Explain isolates and missing links. Compare network measures only after defining the graph and the measure, since degree or centrality depends on construction choices.
Worked example. Small graph: nodes {A, B, C, D}, edges {A–B, B–C, C–A, C–D}. Adjacency matrix (undirected, unweighted):
| A | B | C | D | |
|---|---|---|---|---|
| A | 0 | 1 | 1 | 0 |
| B | 1 | 0 | 1 | 0 |
| C | 1 | 1 | 0 | 1 |
| D | 0 | 0 | 1 | 0 |
| Degree centrality: A = 2, B = 2, C = 3, D = 1. C is most connected here, but centrality depends on how the graph was built; a different edge set changes the ranking. |
Swipe to see all columns
Realistic use case. An airport route map (graph) shows cities as nodes and flights as edges; an adjacency matrix helps compare route density across many airports.
Comparison.
| Representation | Best for | Weakness |
|---|---|---|
| Node-link | Sparse graphs, paths | Clutters when dense |
| Adjacency matrix | Dense graphs, edge weights | Loses spatial intuition |
Common mistakes and limitations. Treating node positions as geographic positions; comparing centrality across differently constructed graphs; labeling every edge in a dense graph; ignoring isolates.
Exam-ready answer points. Define node and edge; contrast node-link vs adjacency matrix; state layout limitations; name degree centrality and its dependency on graph construction.
Self-check questions.
- How does a graph differ from a tree? A: Graphs may have cycles and multi-connected nodes; trees cannot.
- When is an adjacency matrix preferable? A: For dense graphs.
- What does degree centrality depend on? A: The graph and how edges were defined.
3.7 Text and document data; levels of text representation
Definition and why it matters. Text can be treated at several levels: characters, tokens/words, sentences, documents, and collections of documents. Each level supports different questions, and preprocessing changes results, so it must be documented.
Core theory. Character frequencies reveal encoding or language patterns. Token counts compare vocabulary. Document-level features show topic or length. Preprocessing — lowercasing, stemming, removing stop words, splitting tokens — changes results and must be documented. Preserve context: term frequency does not show sentiment or meaning by itself. When comparing documents, normalize counts by document length or use a clearly explained weighting. Repeated words are not independent evidence without considering how the text was produced.
Worked example. Two documents: D1 = "The data is good. Data helps." D2 = "Data, data, data! Good data." Tokenize, lowercase, remove stop words (the, is, helps): D1 tokens = [data, data, good], D2 = [data, data, data, good, data]. Raw counts: D1 data=2, D2 data=4. Normalize by length: D1 2/3 ≈ 0.67, D2 4/5 = 0.80; D2 is more data-focused relatively, not just absolutely. Without normalization, D2's larger size would be mistaken for greater focus.
Realistic use case. A support team compares two products' feedback; normalizing word counts by review length prevents longer reviews from dominating.
Comparison.
| Level | Typical question |
|---|---|
| Character | Encoding or language pattern |
| Token/word | Vocabulary comparison |
| Sentence | Tone or topic within a document |
| Document | Topic, length, type |
| Collection | Shared themes across documents |
Common mistakes and limitations. Equating frequency with sentiment or meaning; comparing counts without length normalization; undocumented preprocessing (different stop-word lists change rankings); treating repeated words as independent evidence.
Exam-ready answer points. List the five text levels; explain preprocessing effects; state why normalization by length matters; warn frequency ≠ sentiment.
Self-check questions.
- Name two text levels. A: Tokens/words; documents (any two of five).
- Why normalize token counts by document length? A: Longer documents naturally have more tokens; normalization enables fair comparison.
- Does word frequency show sentiment? A: No; context is needed.
3.8 Single-document visualizations and word clouds
Definition and why it matters. A single document can be visualized through an outline, keyword highlights, sentence map, entity view, or word cloud. Word clouds encode frequency mainly through font size and position. They are quick for recognition but weak for precise comparison.
Core theory. Word area and irregular placement are difficult to estimate, so word clouds are an exploratory supplement, not proof of a document's central argument. Preprocessing determines what appears: punctuation, stop words, and word variants change rankings. For close reading, retain the text and show where each term occurs. A clear legend or counts help readers understand the size encoding.
Worked example. One document (100 words). Count top terms after removing stop words: "data" = 12, "visual" = 7, "chart" = 5. Word cloud draws "data" largest. Beside it, a small table lists counts: data 12, visual 7, chart 5. A reader sees "data" is frequent but cannot tell whether 12 vs 7 is a big difference from area alone; the table gives exact values.
Realistic use case. A résumé screener uses a word cloud to spot frequent skills quickly, then reads the full text to judge context.
Comparison.
| Word cloud | Bar chart of counts |
|---|---|
| Fast recognition of top terms | Precise comparison of counts |
| Weak for exact values | Exact values with axis |
Common mistakes and limitations. Treating the cloud as proof of the document's argument; ignoring stop-word and variant choices; no counts or legend so size is unreadable; using it for close reading instead of the text.
Exam-ready answer points. Define word cloud encoding (font size/position); state strength (recognition) and weakness (precise comparison); explain preprocessing role; recommend counts/table alongside.
Self-check questions.
- What does word-cloud font size encode? A: Frequency.
- What is a word cloud weakness? A: Precise comparison is hard (area/placement difficult to estimate).
- What should accompany a word cloud? A: Counts, a legend, and the source text.
3.9 Flow data
Definition and why it matters. Flow data describes quantities moving between stages, locations, or states. Examples: people moving between districts, electricity through a grid, users progressing through a process. The display must show amounts, direction, and conservation.
Core theory. Sankey diagrams represent flows as links whose width corresponds to quantity; all widths share a common scale and should conserve totals where the system requires it. Flow maps place movement geographically but clutter when many paths overlap. State the period and unit; distinguish inflow, outflow, and net flow. Aggregate small flows only with a disclosed rule. Check that displayed totals reconcile with source records; otherwise apparent losses or gains may be filtering artifacts.
Worked example. Process flow: Start = 1000 users → A = 800 → B = 500 → C = 300. Sankey widths: Start→A = 800 (80%), A→B = 500, B→C = 300. Conservation check at A: inflow 800, outflow to B 500 + drop-off 300 = 800 ✓. Period = one week; unit = users. Net flow into B = 500 − 300 = 200 if measured over the same interval.
Realistic use case. An e-commerce funnel shows visitors → checkout → purchase; Sankey widths reveal where users drop off.
Comparison.
| Sankey | Flow map |
|---|---|
| Stage-to-stage quantities | Geographic movement paths |
| Common width scale | Clutters with many overlapping paths |
Common mistakes and limitations. Undisclosed aggregation of small flows; totals not reconciling with source; confusing inflow, outflow, net; hiding drop-offs.
Exam-ready answer points. Define Sankey link width; state conservation requirement; distinguish inflow/outflow/net; require period, unit, and disclosed aggregation.
Self-check questions.
- What does Sankey link width represent? A: Quantity of the flow.
- What must be conserved in a Sankey (where required)? A: Totals (inflow = outflow + loss).
- Name the three flow quantities. A: Inflow, outflow, net flow.
3.10 Time-series data and its characteristics
Definition and why it matters. A time series is a sequence of observations indexed by time. Its characteristics — trend, seasonality, cycles, abrupt changes, noise, missing intervals, sampling frequency — determine how it should be plotted and interpreted.
Core theory. Time can be regular (daily readings) or irregular (event timestamps). Check timezone, calendar, and interval definitions before plotting. Averages smooth short-term variation but hide spikes. A moving average uses a window of nearby observations and should be described with its window size. Do not interpolate missing periods without marking the assumption. Distinguish a true zero from an absent observation. Compare series only after aligning their time intervals and units.
Worked example. Daily temperature (°C) for 7 days: Mon 20, Tue 22, Wed 21, Thu (missing), Fri 23, Sat 24, Sun 22. Moving average window 3 for Fri = (Thu+Fri+Sat)/3, but Thu is missing, so either skip or mark the assumption; do not silently insert 21. True zero (temperature recorded as 0 °C) differs from absent (no reading). Trend: values rise from Mon to Sun overall; seasonality would need a longer period (weeks/year).
Realistic use case. A utility plots daily demand; missing meter readings are marked, not interpolated, so planners don't invent consumption.
Comparison.
| Characteristic | Meaning | Example |
|---|---|---|
| Trend | Long-term direction | Sales rising over years |
| Seasonality | Repeating fixed period | Higher sales in December |
| Cycle | Non-fixed oscillation | Business cycle |
| Noise | Random short-term variation | Daily meter jitter |
Common mistakes and limitations. Interpolating missing periods unmarked; confusing true zero with absent; comparing series with different intervals/units; using averages that hide spikes.
Exam-ready answer points. List time-series characteristics; distinguish regular vs irregular time; explain moving average window size; state missing-data handling.
Self-check questions.
- Difference between true zero and absent observation? A: Zero is a recorded value; absent means no reading.
- What must a moving average state? A: Its window size.
- Before comparing two time series, what must align? A: Time intervals and units.
3.11 Time-series visualization and time mapping
Definition and why it matters. Line charts are a common choice for time because position along an ordered axis communicates sequence. The axis must preserve elapsed duration, and transformations (indexing, smoothing, aggregation) must be explained.
Core theory. Use an appropriate interval, readable tick marks, and clear labels. A linear time axis preserves elapsed duration; categorical spacing can misrepresent gaps. For multiple series, use small multiples or direct labels when a shared legend is hard to follow. Indexing values to a common starting point helps compare relative change but hides absolute magnitude; show both when needed. Calendar heatmaps reveal recurring patterns by weekday or month but do not make exact values easy to compare. For long series, aggregate to a meaningful interval and allow detail inspection. Explain any smoothing, resampling, or normalization.
Worked example. Monthly sales (Jan–Dec): 100, 110, 105, 120, 130, 125, 140, 135, 150, 145, 160, 155. Line chart with linear time axis (equal month spacing) and indexed version (Jan = 100): Feb = 110, Mar = 105, … Dec = 155. Indexed line shows relative growth (+55%) but hides that absolute sales rose 100→155; show both axes/panels. A calendar heatmap of daily sales reveals weekday patterns but exact values need the table.
Realistic use case. A retailer compares two products' growth since launch using indexing (base = 100), while also showing absolute revenue in a side panel.
Comparison.
| View | Shows | Hides |
|---|---|---|
| Absolute line | Actual magnitudes | Relative growth between different bases |
| Indexed line (base 100) | Relative change | Absolute scale |
| Calendar heatmap | Recurring weekday patterns | Exact values |
Common mistakes and limitations. Categorical time spacing misrepresenting gaps; index hiding absolute magnitude; unexplained smoothing or resampling; too many series in one legend.
Exam-ready answer points. State why a linear time axis preserves duration; explain indexing trade-off; name calendar heatmap use and limit; require disclosure of smoothing/resampling.
Self-check questions.
- What does a linear time axis preserve? A: Elapsed duration (equal time = equal distance).
- What does indexing to a base hide? A: Absolute magnitude.
- When is a calendar heatmap useful? A: Revealing recurring weekday/month patterns.
Unit 3 key terms: distribution, scatter plot, overplotting, hierarchy, node, edge, token, word cloud, flow, seasonality, resampling.
Unit 3 summary: Match chart structure to data structure and task. Preserve ordering, units, and aggregation meaning. Show density and time carefully; disclose transformations.
Unit 4: Spatial Data Visualization — 10 hours
4.1 Scalar fields
Definition and why it matters. A scalar field assigns one numeric value to each point or cell in a spatial domain, such as elevation, temperature, or pressure. Data may be sampled at discrete locations or defined continuously. The representation must show resolution, units, and interpolation method.
Core theory. A raster stores values in a grid; a point sample stores coordinates and values. Resolution affects visible detail: a coarse grid can hide local variation, while an interpolated surface estimates values between samples. Choose a sequential color scale for a quantity that increases, or a diverging scale when a meaningful center exists. Include units, resolution, and any interpolation method. A color patch should not suggest a sharp boundary when the field changes gradually.
Worked example. 3 × 3 temperature raster (°C): | 18 | 20 | 19 | | 21 | 23 | 22 | | 20 | 22 | 21 | Center cell (2,2) = 23 °C. Interpolating between (1,1)=18 and (2,2)=23 gives an estimated midpoint ≈ 20.5 °C, clearly labeled as an estimate. Sequential color scale: low = light yellow, high = dark red, with units °C and resolution (1 km per cell) stated.
Realistic use case. A weather service maps temperature from station samples using interpolation, labeling the surface as estimated between stations.
Comparison.
| Raster | Point sample |
|---|---|
| Grid of values | Coordinates + value per point |
| Regular resolution | Irregular locations possible |
Common mistakes and limitations. Showing a sharp boundary where interpolation is gradual; omitting units or resolution; presenting interpolated values as measurements.
Exam-ready answer points. Define scalar field; contrast raster vs point sample; explain resolution effects; state what metadata to include (units, resolution, interpolation).
Self-check questions.
- What is a scalar field? A: One numeric value per point/cell in space.
- How does resolution affect a raster? A: Coarse grids hide local variation; fine grids show more detail.
- What metadata must a scalar-field map show? A: Units, resolution, interpolation method.
4.2 Isocontours and topographic terrain maps
Definition and why it matters. An isocontour connects locations with the same scalar value, such as a 100-metre elevation contour. Contours reveal gradients, peaks, valleys, and threshold boundaries. The contour interval must fit the data range and map scale.
Core theory. Closely spaced contours indicate a steep change; widely spaced contours indicate a gradual one. A topographic map combines contour lines, labels, and often shaded relief. Select contour intervals that fit the data range and map scale. Too many lines clutter; too few conceal structure. Label units and interval. Interpolated contours depend on the sample grid and method, so avoid presenting them as direct measurements when they are estimates.
Worked example. Elevation grid values around a hill: 90, 100, 110, 120. Draw contours at 100 m and 110 m. Where the 100 and 110 m lines are close together, the slope is steep; where far apart, gradual. Label: "Contour interval = 10 m, units = metres." If points were sparse, the 110 m line is an interpolated estimate, not a surveyed line.
Realistic use case. A hiker uses a topographic map: closely spaced contours warn of a steep climb; widely spaced contours indicate gentle terrain.
Comparison.
| Contour spacing | Meaning |
|---|---|
| Close together | Steep gradient |
| Far apart | Gradual slope |
Common mistakes and limitations. Too many intervals (clutter) or too few (conceal structure); unlabeled interval/units; presenting interpolated contours as measurements.
Exam-ready answer points. Define isocontour; explain spacing → steepness; state topographic map components; warn interpolated contours are estimates.
Self-check questions.
- What do closely spaced contours mean? A: Steep change.
- What is a contour interval? A: The value difference between adjacent contour lines.
- Are interpolated contours direct measurements? A: No; they are estimates from samples.
4.3 Scalar volumes
Definition and why it matters. A scalar volume assigns a value throughout three-dimensional space, often stored as a stack of 2D slices called voxels. Examples: medical CT intensity, atmospheric temperature. Viewing trade-offs exist between slice detail and whole-volume structure.
Core theory. Viewing one slice at a time preserves detail but can miss structures that cross slices. Volume views reveal internal shape, yet occlusion and depth perception make them harder to read than 2D projections. Explain voxel spacing and orientation; anisotropic spacing means distances differ by axis. Inspect multiple slices or orthogonal planes; avoid interpreting a rendering without understanding acquisition and scale.
Worked example. CT volume: voxel spacing x = 1 mm, y = 1 mm, z = 3 mm (anisotropic — z distances are three times larger). Axial slice shows detail in x–y; a structure angled across slices is visible only in coronal/sagittal planes. Measuring a 9 mm structure along z using voxel count (3 voxels × 3 mm) is correct; assuming 1 mm per voxel gives 3 mm, an error.
Realistic use case. A radiologist reviews CT scans in axial, coronal, and sagittal planes to locate a structure missed in one slice.
Comparison.
| Single slice | Volume view |
|---|---|
| High detail in one plane | Internal 3D shape |
| Misses cross-slice structures | Occlusion and depth harder to read |
Common mistakes and limitations. Ignoring anisotropic spacing; diagnosing from one slice; treating a rendering as measurement without acquisition context.
Exam-ready answer points. Define voxel and scalar volume; contrast slice vs volume; explain anisotropy; recommend orthogonal planes.
Self-check questions.
- What is a voxel? A: A 3D volume element (one slice cell in a stack).
- What is anisotropic spacing? A: Distances differ by axis (e.g., z ≠ x/y).
- Why inspect multiple planes? A: A structure crossing slices may be invisible in one plane.
4.4 Direct volume rendering and multidimensional transfer functions
Definition and why it matters. Direct volume rendering maps voxel values to color and opacity, then accumulates contributions along viewing rays. A transfer function controls which values appear and how strongly; the rendering is an explanatory view, not a neutral photograph.
Core theory. A one-dimensional transfer function uses scalar value; a multidimensional function can also use gradient magnitude or another property to distinguish boundaries from uniform regions. Opacity compositing means nearer voxels can obscure deeper ones, so viewing angle, opacity, and lighting affect visibility. Record transfer-function settings and provide slice views for reference. Compare with segmentation or surface extraction only when their assumptions are understood.
Worked example. CT intensity 0–4000 Hounsfield units. 1-D transfer function: air (−1000) = transparent, soft tissue (40) = light gray, bone (1000) = opaque white. Multidimensional addition: gradient magnitude highlights the bone boundary where tissue changes sharply, separating it from uniform soft tissue. Along one viewing ray, nearer bone voxels occlude deeper soft tissue; changing the angle reveals different structures. Settings recorded: "bone threshold 800–1500, opacity 0.9."
Realistic use case. A clinician renders a CT volume to visualize a bone fracture, then checks orthogonal slices to confirm the rendering is not an occlusion artifact.
Comparison.
| 1-D transfer function | Multidimensional transfer function |
|---|---|
| Scalar value only | Scalar + gradient magnitude/property |
| Cannot separate boundary from uniform | Distinguishes edges from homogeneous regions |
Common mistakes and limitations. Treating rendering as a photograph; undisclosed transfer-function settings; comparing with segmentation without understanding assumptions; occlusion hiding deeper structures.
Exam-ready answer points. Explain direct volume rendering and ray accumulation; define transfer function (1-D vs multi-D); describe opacity compositing effects; require recorded settings and slice reference.
Self-check questions.
- What does a transfer function control? A: Which voxel values appear and how strongly.
- What does gradient magnitude add in multi-D transfer functions? A: Boundary/edge distinction from uniform regions.
- Is a volume rendering a neutral photograph? A: No; it is an explanatory view affected by angle, opacity, lighting.
4.5 Dot maps and pixel maps
Definition and why it matters. Dot maps use point symbols to show event locations or counts represented by dots. Pixel maps represent regions using grid cells, sometimes resized or repositioned to make areas comparable. Both need a legend, geographic context, and an explanation of transformations.
Core theory. Clarify whether each dot is an observed event or a fixed quantity (one dot per 100 people). Random placement within an area implies false precision. Pixel maps reduce some geographic area bias but distort shape and distance. Avoid overlapping points that hide density; use clustering, hex bins, or density surfaces when appropriate. Show units and whether dots are events or aggregated quantities.
Worked example. 20 disease cases in a district. Option A: one dot per event → 20 dots placed at actual locations (if known). Option B: one dot per 100 people → 20 dots placed randomly within district boundaries implies false precision about where cases occurred. Legend states "1 dot = 1 case" or "1 dot = 100 people." A pixel map grids the district into cells colored by case density, distorting shape but easing area comparison.
Realistic use case. An epidemiologist maps disease cases by dot; dots are jittered within district polygons to protect privacy, with a note that placement is approximate.
Comparison.
| Dot map | Pixel map |
|---|---|
| Event/point locations | Region grid cells |
| False precision if randomly placed | Distorts shape/distance |
Common mistakes and limitations. Random dot placement implying precision; overlapping dots hiding density; missing legend explaining dot meaning; pixel map interpreted as accurate distance/shape.
Exam-ready answer points. Define dot map and pixel map; explain dot meaning (event vs fixed quantity); state pixel-map trade-off (area bias vs shape distortion); name density remedies for overlap.
Self-check questions.
- What does one dot represent? A: Either an event or a fixed quantity — must be stated in the legend.
- What is a pixel-map trade-off? (Reduces area bias but distorts shape/distance.)
- How to handle overlapping dots? A: Clustering, hex bins, or density surfaces.
4.6 Vector fields
Definition and why it matters. A vector field assigns both magnitude and direction at each spatial location, as with wind velocity or fluid flow. Arrows show direction and length; streamlines trace paths tangent to the field.
Core theory. Arrows can show direction and length, but dense arrows overlap and small arrows become unreadable. Streamlines trace paths tangent to the field and reveal flow direction; they do not represent the motion of a physical particle unless assumptions support that interpretation. Color can encode magnitude if the legend is clear. Use consistent arrow scaling and disclose units. For changing fields, show time or animation with a static reference view so users can inspect states. Do not mix direction and magnitude without explaining the channels.
Worked example. Wind field on a 5 × 5 grid. Each cell: arrow direction = wind direction, length = speed scaled consistently (e.g., 10 mm/s = 1 cm). Color = speed (blue low, red low... use blue→red). Streamlines drawn tangent to arrows show flow swirling around a low-pressure center. Note: a leaf dropped at a point does not necessarily follow a streamline unless steady-flow assumptions hold.
Realistic use case. A weather map shows wind vectors; streamlines reveal circulation around a storm, while arrow length/color shows speed.
Comparison.
| Arrow | Streamline |
|---|---|
| Direction + magnitude at points | Flow path and direction |
| Overlaps when dense | Not a particle path unless assumed |
Common mistakes and limitations. Treating streamlines as physical particle paths; dense overlapping arrows; inconsistent arrow scaling; mixing direction and magnitude channels without explanation.
Exam-ready answer points. Define vector field (magnitude + direction); contrast arrows vs streamlines; state streamline limitation; require units and consistent scaling.
Self-check questions.
- What two quantities does a vector field assign? A: Magnitude and direction.
- Does a streamline show particle motion? A: Not unless assumptions support it; it shows field direction.
- What can color encode in a vector map? A: Magnitude (with a clear legend).
4.7 Defining marks and channels
Definition and why it matters. Spatial data still needs marks and channels. Points show locations, lines show paths or boundaries, polygons show areas. Position encodes geography, while color, size, or pattern encodes an attribute. A projection transforms a curved surface to a plane and necessarily distorts some properties.
Core theory. Select a projection suited to the task and region (area, distance, shape, or direction preservation). Use symbol sizes that remain legible at the intended scale, and prevent labels from colliding with important features. Distinguish a symbol's geographic footprint from its measured value. Provide scale, orientation, attribution, and uncertainty where relevant.
Worked example. City population map: point mark at each city's coordinates; circle size = population (area channel); color = region. Mercator projection distorts area (high-latitude countries look too large); an equal-area projection suits comparing population density. A 10 mm circle at national scale may overlap at city scale; test at the intended display scale. Scale bar and north arrow included; symbol footprint (circle area on map) is not the city's true extent.
Realistic use case. An election map colors districts by winning party (hue) and sizes symbols by votes cast; an equal-area projection prevents large, sparsely populated districts from dominating visually.
Comparison.
| Projection property preserved | Best for | Distorted |
|---|---|---|
| Area | Density comparison | Shape/distance |
| Shape | Local form | Area |
| Distance | Route measurement | Area/shape |
Common mistakes and limitations. Confusing symbol footprint with measured value; missing scale/orientation; using one projection for all tasks; unreadable symbols at the display scale.
Exam-ready answer points. Name mark types (point/line/polygon) and what they encode; explain projection distortion and selection; distinguish footprint vs value; list required map metadata (scale, orientation, attribution).
Self-check questions.
- What do points, lines, polygons encode? A: Locations, paths/boundaries, areas.
- Why does every projection distort something? A: A curved surface cannot be flattened without distorting area, distance, shape, or direction.
- Distinguish symbol footprint from measured value. A: Footprint = map space the symbol occupies; value = the data it represents (e.g., population).
Unit 4 key terms: scalar field, raster, voxel, isocontour, transfer function, vector field, streamline, projection, spatial resolution.
Unit 4 summary: Spatial displays encode location as well as values. Make resolution, projection, interpolation, units, and rendering choices visible to readers.
Unit 5: Software Tools and Data for Visualization — 10 hours
5.1 Iris data set
Definition and why it matters. The Iris data set is a small, widely used collection of flower measurements with species labels. It supports practice with distributions, pairwise relationships, and classification. Because it is small and curated, it is useful for learning but does not represent every real dataset.
Core theory. Iris records include sepal length, sepal width, petal length, petal width, and species (setosa, versicolor, virginica). A scatterplot matrix compares pairs of measurements; color distinguishes species. Check units (centimeters) and distinguish measured attributes from the species class. A visible cluster is not proof that a classifier will generalize to new populations.
Worked example. Five Iris rows:
| Sepal length | Sepal width | Petal length | Petal width | Species |
|---|---|---|---|---|
| 5.1 | 3.5 | 1.4 | 0.2 | setosa |
| 4.9 | 3.0 | 1.4 | 0.2 | setosa |
| 7.0 | 3.2 | 4.7 | 1.4 | versicolor |
| 6.4 | 3.2 | 4.5 | 1.5 | versicolor |
| 6.3 | 3.3 | 6.0 | 2.5 | virginica |
| Scatter petal length vs petal width, color by species: setosa clusters at low values, virginica at high, versicolor in between. Compute mean petal length per species: setosa ≈ 1.47, versicolor ≈ 4.26, virginica ≈ 5.55 (intermediate step: sum ÷ count). This supports separation but a classifier trained only on Iris may fail on other flower populations. |
Swipe to see all columns
Realistic use case. A student practices classification: train on Iris measurements to predict species, then evaluates on a held-out subset, noting the small sample limits generalization claims.
Comparison.
| Scatter plot | Scatterplot matrix |
|---|---|
| One pair of measurements | All pairs at once |
| Simple relationship view | Overview of pairwise structure |
Common mistakes and limitations. Treating a visible cluster as proof of generalization; ignoring units; treating species as quantitative; overclaiming from a small, curated dataset.
Exam-ready answer points. Name Iris attributes and species; describe scatterplot matrix use; distinguish measured attributes from class; state small-dataset limits.
Self-check questions.
- Name two Iris measurements. A: Sepal length and petal width (any two of four).
- What does color encode in an Iris scatter plot? A: Species.
- Does an Iris cluster prove a classifier generalizes? A: No; the dataset is small and curated.
5.2 Detroit data set
Definition and why it matters. The supplied outline names a Detroit data set but does not identify a particular version or schema. Before analysis, establish its source, fields, geographic coverage, time period, units, and missing-data rules. Interpretation stays provisional until the exact source is identified.
Core theory. If the data set contains city measurements, compare geographic or temporal patterns only after checking how locations and periods were sampled. Do not infer a citywide trend from a subset without documenting coverage. Keep provenance notes: who collected it, when, and how. A data set without a verified schema should not be used for firm conclusions.
Worked example. Verification checklist for the Detroit data set:
- Source: which agency or publication?
- Fields: schema and definitions.
- Coverage: which neighborhoods or citywide?
- Time period: which years or dates?
- Units: dollars, counts, rates?
- Missing data: how are gaps represented? Hypothetical: Version A covers 2010–2019 citywide; Version B covers 2015–2020 for three districts. A trend computed from B cannot be called citywide.
Realistic use case. A student building a Detroit indicators dashboard labels the chart "Detroit data set (source and version to be confirmed)" and lists the verification checklist as a limitation.
Comparison.
| Verified data set | Unverified (Detroit as named) |
|---|---|
| Source/schema known | Source/schema not identified |
| Firm conclusions possible | Provisional interpretation only |
Common mistakes and limitations. Inferring citywide trend from a subset; treating the named data set as one fixed object; missing period/units; no provenance record.
Exam-ready answer points. List the six verification items; explain why subset ≠ citywide; state provisional handling until source identified.
Self-check questions.
- Name three things to verify before using the Detroit data set. A: Source, fields/schema, coverage (also period, units, missing-data rules).
- Can a district-level subset show a citywide trend? A: Only if coverage and sampling are documented; otherwise no.
- What status should the analysis have until the source is identified? A: Provisional.
5.3 Breakfast Cereal data set
Definition and why it matters. The Breakfast Cereal data set commonly supports comparisons among product attributes such as nutrition, serving size, or rating, but the exact version should be checked before drawing conclusions.
Core theory. Inspect field definitions, units, and whether values are per serving or per fixed mass. A scatter plot compares two numeric attributes; a ranked dot plot compares products. Missing values and manufacturer categories are handled explicitly. Do not interpret a rating as a health measure unless its definition supports that conclusion.
Worked example. Cereal rows (per serving):
| Cereal | Calories | Serving size | Rating |
|---|---|---|---|
| A | 110 | 30 g | 3.2 |
| B | 120 | 55 g | 2.8 |
| C | 100 | 30 g | 4.1 |
| Compare A vs C on calories per serving directly (same 30 g). Comparing A vs B by raw calories is unfair (different serving sizes); convert to per 100 g: A = 110/30×100 ≈ 367, B = 120/55×100 ≈ 218. Ranked dot plot by rating: C highest, B lowest. Missing rating for cereal D shown as "—", excluded from average with a note. |
Swipe to see all columns
Realistic use case. A nutrition student ranks cereals by rating but first converts all values to a common mass basis so serving-size differences don't distort the comparison.
Comparison.
| Per serving | Per fixed mass (100 g) |
|---|---|
| As consumed | Comparable across products |
| Unfair across sizes | Removes serving-size bias |
Common mistakes and limitations. Rating treated as health measure without definition support; mixing per-serving and per-100-g values; missing values silently dropped; version not checked.
Exam-ready answer points. State checks before use (fields, units, serving basis); explain per-serving vs per-fixed-mass; describe ranked dot plot use; warn rating ≠ health.
Self-check questions.
- Why compare cereals per 100 g rather than per serving? A: Serving sizes differ; per serving is unfair across products.
- Is a cereal rating a health measure? A: Only if its definition supports that conclusion.
- How to show missing ratings? A: Mark as "—" and state the handling rule.
5.4 Dow Jones Industrial Average time-series dataset
Definition and why it matters. The Dow Jones Industrial Average series is a time-indexed market measure. Verify whether values are daily closes, adjusted closes, or another measure, and record dates, currency, and source.
Core theory. Plotting levels shows absolute movement; indexing to a base date shows relative movement. Percentage change can compare growth rates but is not interchangeable with index points. Financial series can be volatile and affected by market composition and corporate actions. A trend in historical values does not guarantee future performance. Use clear axes and avoid truncating a baseline in ways that exaggerate change.
Worked example. Index values: Jan 2 = 38000, Jan 3 = 38500, Jan 4 = 38200. Absolute change Jan 2→4 = +200 points. Percentage change = 200/38000 ≈ 0.53%. Indexed to Jan 2 = 100: Jan 3 = 101.3, Jan 4 = 100.5. Levels panel shows 38000→38200; indexed panel shows +0.5%. Corporate actions (stock splits) can change the index without market movement, so the definition matters.
Realistic use case. An analyst compares the DJIA to another index over a year using indexing to a common base date, while noting corporate-action adjustments.
Comparison.
| Levels | Indexed (base = 100) | Percentage change |
|---|---|---|
| Absolute movement | Relative movement | Growth rate |
| Affected by index level | Hides absolute scale | Not interchangeable with points |
Common mistakes and limitations. Truncated baseline exaggerating change; points vs percentage treated as interchangeable; historical trend read as future guarantee; ignoring adjustments/composition changes.
Exam-ready answer points. List verification items (measure, dates, currency, source); contrast levels vs indexed vs percentage; state historical ≠ future; warn against baseline truncation.
Self-check questions.
- Difference between index points and percentage change? A: Points = absolute index difference; percentage = relative growth (not interchangeable).
- Does a past DJIA trend guarantee future performance? A: No.
- What should be verified before plotting? A: Measure (close/adjusted), dates, currency, source.
5.5 MS Spreadsheet
Definition and why it matters. A spreadsheet is useful for inspecting small tables, cleaning simple values, sorting, filtering, formulas, and building basic charts. It suits small-scale, interactive work but can hide errors as logic grows.
Core theory. Keep one observation per row and one variable per column. Store dates and numbers as typed values, not mixed text. Avoid merged cells in analysis tables. Check formulas, ranges, missing values, and units. Document transformations in separate columns or sheets so results can be reproduced. Spreadsheets are convenient but can hide formula errors and become difficult to audit.
Worked example. Small table: columns Date (typed date), Product (text), Sales (number). Formula in column D: =C2*1.1 to compute tax-inclusive sales, copied down; document the rule in a header note ("D = sales × 1.1 tax"). Sort by Sales descending; filter for missing values (blank cells shown, not filled with 0). Chart: bar of Sales by Product from the table. Missing Sales marked blank; average formula =AVERAGE(C2:C10) ignores blanks — state that rule.
Realistic use case. A small business tracks monthly expenses in a spreadsheet, with one row per expense, typed dates, and a documented tax formula column.
Comparison.
| Spreadsheet | Script (Python/R) |
|---|---|
| Interactive, immediate | Reproducible, versioned |
| Errors hidden in cells | Code auditable |
| Suited to small tables | Suited to large/repeated work |
Common mistakes and limitations. Merged cells in data; numbers stored as text; undocumented formulas; missing values treated as zero; hard to audit as logic grows.
Exam-ready answer points. List spreadsheet best practices (one row/observation, typed values, no merged cells); state documentation approach; compare spreadsheet vs script trade-offs.
Self-check questions.
- What is the row/column rule? A: One observation per row, one variable per column.
- Why avoid merged cells? A: They break sorting, filtering, and formulas.
- How should transformations be documented? A: Separate columns or sheets with notes.
5.6 Python
Definition and why it matters. Python supports data cleaning, analysis, and visualization through libraries. A typical workflow loads data, checks schema and missing values, transforms fields, creates a plot, and saves it with labels and source notes. Python is well suited to repeatable workflows and larger scripted analyses.
Core theory. Keep scripts reproducible and specify library versions for shared work. Use descriptive variable names and verify output against a small known subset. Code examples must match installed libraries and data format; never assume a column exists without inspecting the dataset. Load → inspect → clean → transform → plot → save with labels/source.
import matplotlib.pyplot as plt
# Sample data: monthly sales
months = ["Jan", "Feb", "Mar", "Apr"]
sales = [12000, 15000, 11000, 17000]
plt.figure(figsize=(6, 4))
plt.bar(months, sales, color="steelblue")
plt.title("Monthly sales")
plt.xlabel("Month")
plt.ylabel("Sales (USD)")
plt.tight_layout()
plt.savefig("sales.png")
print("Saved sales.png")
Line by line: import matplotlib.pyplot as plt loads the plotting library; months and sales hold the data (one value per month, aligned by index); plt.figure creates the canvas; plt.bar draws one bar per month with height = sales; title, xlabel, ylabel add labels and units; tight_layout prevents clipping; savefig writes the file; print confirms completion. Requires matplotlib installed.
Realistic use case. A student cleans a CSV, checks missing values with pandas, plots monthly sales with matplotlib, and saves the figure with source notes for a report.
Comparison.
| Python | Spreadsheet |
|---|---|
| Scripted and reproducible | Interactive, less auditable |
| Scales to large data | Suited to small tables |
| Requires library versions | No setup |
Common mistakes and limitations. Assuming a column exists; version mismatch across machines; unverified output; plots without labels/units; hardcoding paths.
Exam-ready answer points. Name the Python workflow steps; state reproducibility practices (versions, names, verification); warn against assuming columns; give the bar-chart example explained.
Self-check questions.
- What is the typical Python visualization workflow? A: Load, inspect schema/missing, transform, plot, save with labels/source.
- Why verify output against a known subset? A: To catch code or data errors before trusting results.
- Should you assume a column exists? A: No; inspect the dataset first.
5.7 MATLAB
Definition and why it matters. MATLAB provides matrix operations, numerical analysis, plotting, and specialized toolboxes. It is useful when data and algorithms are naturally expressed as arrays and vectors.
Core theory. Check matrix dimensions, units, and indexing because a transposed matrix can produce a plausible but incorrect plot. Label axes and legends, and retain the script that generated the figure. Toolbox functions may depend on licensed components, so document dependencies. Verify calculations with a small hand-checkable example before scaling up.
% Sample: plot a small vector of values
values = [10, 25, 18, 40, 33];
figure;
plot(values, '-o', 'LineWidth', 1.5, 'Color', [0 0.45 0.75]);
xlabel('Observation');
ylabel('Value');
title('Simple line plot');
grid on;
Line by line: values holds five numeric observations; figure opens a new window; plot draws values against their index (1–5) with line and markers; xlabel/ylabel add axis labels with quantities; title names the figure; grid on adds a reference grid. Dimensions matter: plotting a column vector vs a row vector changes orientation; check size(values).
Realistic use case. An engineering student plots sensor readings stored as a MATLAB vector, checks the vector length, labels axes with units, and saves the script.
Comparison.
| MATLAB | Python |
|---|---|
| Matrix/array-native | General-purpose, library-based |
| Toolboxes (licensed) | Open libraries |
| Good for numerical coursework | Good for reproducible pipelines |
Common mistakes and limitations. Transposed matrix producing a plausible wrong plot; unlabeled axes; undocumented toolbox dependencies; no hand-check before scaling.
Exam-ready answer points. State MATLAB strengths (arrays, plotting, toolboxes); explain dimension/indexing checks; require labels and retained scripts; name documentation of licensed dependencies.
Self-check questions.
- Why check matrix dimensions? A: A transposed matrix can plot correctly but be wrong.
- What should be retained with a figure? A: The generating script.
- When to verify with a small example? A: Before scaling up calculations.
5.8 Java
Definition and why it matters. Java can build visualization applications with explicit data models, interfaces, and event handling. It suits interactive or integrated software but generally needs more setup than a notebook workflow.
Core theory. Separate data loading, transformation, rendering, and interaction logic. Manage large datasets efficiently and keep the interface responsive. Validate user input and test empty, malformed, and extreme records. A finished visualization communicates its scale, units, and data source, not only renders correctly.
public class SimpleBarChart {
public static void main(String[] args) {
String[] products = {"A", "B", "C"};
int[] sales = {12000, 8500, 15000};
System.out.println("Sales by product (1 * = 1000):");
for (int i = 0; i < products.length; i++) {
StringBuilder bar = new StringBuilder();
for (int j = 0; j < sales[i] / 1000; j++) {
bar.append("*");
}
System.out.printf("%-8s %s %d%n", products[i], bar, sales[i]);
}
}
}
Line by line: declares parallel arrays for products and sales; prints a header; outer loop iterates products; inner loop builds one asterisk per 1000 units (a length channel scaled by 1000); printf prints product, bar, and value. Compile with javac SimpleBarChart.java and run with java SimpleBarChart — no external libraries required. A GUI version would add event handling and a rendering layer separate from the data model.
Realistic use case. A desktop inventory app uses a separate data model (loading), transformation (aggregation), rendering (chart panel), and interaction (filters) so each part can be tested independently.
Comparison.
| Java | Notebook (Python) |
|---|---|
| Interactive applications | Quick exploration |
| More setup, explicit structure | Faster iteration |
| Strong separation of concerns | Logic mixed with output |
Common mistakes and limitations. Unvalidated user input; unresponsive interface with large data; mixing rendering and data logic; not communicating scale/units/source.
Exam-ready answer points. Name Java strengths (interactive apps, event handling); list design separations (load/transform/render/interact); state testing cases (empty, malformed, extreme); give the runnable example explained.
Self-check questions.
- Name one Java strength for visualization. A: Interactive or integrated applications with explicit structure.
- What four concerns should be separated? A: Data loading, transformation, rendering, interaction.
- What test cases matter? A: Empty, malformed, and extreme records.
5.9 Tableau
Definition and why it matters. Tableau is a visual analytics tool for connecting to data, building views, filtering, and assembling dashboards. A worksheet maps fields to visual channels; a dashboard combines views and controls.
Core theory. Verify field roles and aggregation defaults: a sum, average, or count answers different questions. Use filters carefully and show their active state. Test dashboard behavior with different screen sizes and data subsets. Exported dashboards should retain labels, legends, and source context. Tool convenience does not replace checking data definitions or analytical assumptions.
Worked example. Connecting a sales table: fields = Order Date, Category, Sales, Profit. Worksheet: Category → Columns, Sales → Rows (aggregation default = SUM), Region → Color. If the analyst needs average profit per order, change aggregation from SUM to AVG — the same field answers a different question. A filter on Year is added and shown as an active filter card; a dashboard combines the bar chart and a map; export checks that the legend, axis labels, and source note remain.
Realistic use case. A sales manager builds a dashboard with a bar chart (sales by category) and a map (sales by state), with a year filter whose active state is visible; exported to PDF with labels intact.
Comparison.
| Worksheet | Dashboard |
|---|---|
| One view, fields → channels | Multiple views + controls |
| Exploration | Presentation and monitoring |
Common mistakes and limitations. Hidden aggregation defaults; filters not shown; untested screen sizes/subsets; exported view missing source context; trusting the tool over definitions.
Exam-ready answer points. Define worksheet vs dashboard; explain aggregation defaults (SUM/AVG/COUNT); state filter visibility; list export checks (labels, legends, source).
Self-check questions.
- What is the difference between a worksheet and a dashboard? A: Worksheet = one view; dashboard = combined views and controls.
- Why check aggregation defaults? A: SUM, AVG, and COUNT answer different questions.
- What should an exported dashboard retain? A: Labels, legends, and source context.
Unit 5 key terms: schema, unit of observation, missing value, reproducibility, field role, aggregation, dashboard, validation.
Unit 5 summary: Identify exact dataset versions before drawing conclusions. Choose tools that support a reproducible workflow and verify their defaults.
Laboratory and project work
Complete practical work across all listed topics. For a small project, choose one tool and a dataset with a clearly identified source. Define a question, inspect the schema, clean and document data, select suitable encodings, build a first view, test it with representative cases, and revise. Submit the question, source and date, field definitions, cleaning decisions, chart rationale, limitations, and final visualization. Include at least one alternative view considered and explain why it was not chosen. Do not present generated or interpolated values as direct observations.
flowchart TD A[Define question] --> B[Inspect source and fields] B --> C[Clean and document] C --> D[Choose visual form] D --> E[Build and label] E --> F[Test tasks and edge cases] F --> G[Revise and report limits] G -->|new issue found| C
The project loop makes data checks and testing part of design, not final cleanup. A sample project question: "Which product category had the highest monthly sales, and did the pattern hold across regions?" Using the Breakfast Cereal or a verified sales data set, the student submits the question, source and date, field definitions, cleaning decisions, a bar chart (primary) and a line chart (alternative considered and rejected because categories are not time-ordered), limitations (small data set, per-serving basis), and the final visualization.
Practice questions with answer keys
1. Explain why visual encoding depends on data type. Quantitative values need ordered channels such as position or length; categories need distinct labels such as hue or shape. A mismatch invents order (e.g., a line across unordered categories) or hides magnitude (e.g., hue for sales volume). Match channel strength to the task: position/length for precise quantity, hue for category identity.
2. Compare bar and stacked-bar charts. Bars support category comparison from a common zero baseline. Stacked bars show a total and its parts, but only the bottom segment shares the baseline, so middle segments are harder to compare. Use bars for ranking categories; use stacked bars only when part-to-whole composition matters and segments are few.
3. Describe a visualization pipeline and locate two possible sources of error. Trace: select and clean → transform and summarize → map values to marks and channels → render → perceive and interpret. Error example 1: a missing-value rule drops records at the cleaning stage. Error example 2: aggregation conceals variation at the transform stage. Use the pipeline to locate where a problem originates.
4. How would you reduce overplotting in a large scatter plot? Use transparency, jitter for discrete values, hexagonal bins, or density contours. State the method and preserve access to detail (e.g., tooltips or drill-down) when individual records matter.
5. When is a word cloud insufficient? When exact counts, context, order, sentiment, or arguments matter. Use counts, a table, text excerpts, or document-aware analysis instead; treat the cloud as exploratory only.
6. Distinguish scalar and vector fields. A scalar field gives one value per location (e.g., temperature); a vector field gives magnitude and direction (e.g., wind). Use a sequential scale for scalar magnitude; arrows or streamlines for vector direction, noting streamlines are not particle paths unless assumed.
7. What must be checked before plotting the Dow Jones series? Measure definition (close vs adjusted close), date range, source, currency, adjustment method, units, missing dates, and whether the question concerns levels or relative change. Do not treat a historical trend as a future guarantee.
8. How can a dashboard mislead even when its charts render correctly? Hidden aggregation, active filters, mismatched scales, missing context, or unsupported causal interpretation can mislead. Verify definitions, show active selections, and document source and caveats.
9. Design a small project for one Unit 5 tool. Choose Python or Tableau and a verified data set. Submit: question, source and date, field definitions, cleaning decisions, chart rationale, limitations, final visualization, plus one alternative considered and rejected with justification. Do not present interpolated values as observations.
10. List five revision-checklist items and explain why each matters. (1) Observational unit, data types, task — anchors every design decision. (2) Justified mark/channel/scale/color — prevents misleading encodings. (3) Units, interval, aggregation, missing values, transformations — enables accurate interpretation. (4) Accurate comparison at actual size — catches baseline/truncation problems. (5) Reproducibility — another person can rebuild the result from documented steps.
References listed in the supplied outline
- Fry, Visualizing Data. O’Reilly Media, 2008. ISBN 0596514557.
- Ware, Information Visualization: Perception for Design, 3rd ed. Morgan Kaufmann, 2012.
- Telea, Data Visualization: Principles and Practice. A. K. Peters, Ltd., 2007. ISBN 1568813066.
These references are transcribed from the user-supplied outline. They have not been independently checked here.