How unit 3 is examined
This unit covers the chart types and the tools used to draw them; the marks sit in geospatial maps, network diagrams and a Matplotlib line-chart program, while charts, interactivity, Tableau and R are unasked.
Basic and advanced charts and graphs
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. <mark>A chart encodes data values as visual marks such as bars, lines, points or colour cells, so that comparisons, trends and patterns can be seen at a glance.</mark>
Key points.
- A bar chart compares a numeric value across categories using bar length, and its baseline must start at zero.
- A line chart joins points in time order, so it shows trends over time such as runs per over.
- A scatter plot places each record as a point on two numeric axes, so it shows correlation, clusters and outliers.
- A histogram splits a numeric range into bins and shows the frequency in each, so it shows the distribution of one variable.
- A heat map colours the cells of a matrix by value, so it shows intensity, for example a correlation matrix.
Pitfall: A bar chart is for categories and a histogram for continuous bins, so do not confuse them.
Geospatial visualization: maps, choropleth maps, geospatial heat maps
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. <mark>Geospatial visualization displays data that has a geographic location on a map, so that spatial patterns, such as where values are high or clustered, become visible.</mark>
Key points.
- Need: tables of place names hide location, whereas a map shows distance, neighbourhood and regional patterns instantly.
- A choropleth map shades predefined regions (states, districts) by a value, for example population density by state.
- A geospatial heat map colours point density over a map, so hotspots such as accident spots appear without region boundaries.
- A symbol or point map places a marker at each coordinate (latitude, longitude).
- Applications with examples: (i) weather forecasting, rainfall maps; (ii) disease spread, health cases by district; (iii) transport and logistics, delivery routes; (iv) crime analysis, crime hotspots; (v) urban planning, land use and population density.
Answer frame. Open with the definition; state the need (location and spatial patterns); name the three map types; list the five applications each with one example; close with a line on better decisions.
Asked: [7 marks] (Dec 2024) Explain the need for Geospatial visualization. List five application where Geospatial visualization is required.
Network visualization: node-link diagrams, force-directed graphs
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. <mark>A node-link diagram draws entities as nodes and their relationships as links (edges); a force-directed graph is a node-link layout that positions nodes by simulating physical forces.</mark>
Diagram. <figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u3-01" viewBox="0 0 338 252" width="338" height="252" role="img" aria-label="Node-link diagram: circles are nodes, lines are links"><style>#dsfig-u3-01 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u3-01 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u3-01 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u3-01 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u3-01 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u3-01 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u3-01 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u3-01 .t{fill:#16181D;font-weight:500}#dsfig-u3-01 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u3-01 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u3-01 .dot{fill:#16181D}#dsfig-u3-01 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u3-01 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u3-01 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u3-01 .ah{fill:#454C5A}#dsfig-u3-01 .ah.hi{fill:#2340B8}#dsfig-u3-01 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u3-01 .wl .t{font-size:12px;font-weight:700}#dsfig-u3-01 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u3-01 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u3-01 .e{stroke:#B1B7C3}html.dark #dsfig-u3-01 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u3-01 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u3-01 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u3-01 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u3-01 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u3-01 .t{fill:#E6E8ED}html.dark #dsfig-u3-01 .t.inv{fill:#0F1115}html.dark #dsfig-u3-01 .kd{stroke:#E6E8ED}html.dark #dsfig-u3-01 .dot{fill:#E6E8ED}html.dark #dsfig-u3-01 .ann{fill:#8FA3FF}html.dark #dsfig-u3-01 .lbl{fill:#858D9C}html.dark #dsfig-u3-01 .ptr{fill:#8FA3FF}html.dark #dsfig-u3-01 .ah{fill:#B1B7C3}html.dark #dsfig-u3-01 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u3-01 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u3-01 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u3-01 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah2" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh2" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M55.8,115.5 L153.2,50.5"/><path class="e" d="M55.8,136.5 L153.2,201.5"/><path class="e" d="M184.8,50.5 L282.2,115.5"/><path class="e" d="M184.8,201.5 L282.2,136.5"/><path class="e hi" d="M169,59 L169,193"/><circle class="n" cx="40" cy="126" r="18"/><text class="t" x="40" y="126" dy=".35em" text-anchor="middle">A</text><circle class="n" cx="169" cy="40" r="18"/><text class="t" x="169" y="40" dy=".35em" text-anchor="middle">B</text><circle class="n" cx="169" cy="212" r="18"/><text class="t" x="169" y="212" dy=".35em" text-anchor="middle">C</text><circle class="n" cx="298" cy="126" r="18"/><text class="t" x="298" y="126" dy=".35em" text-anchor="middle">D</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">Node-link diagram: circles are nodes, lines are links</figcaption></figure>
Key points.
- Nodes represent entities (people, computers) and links represent relations (friendship, connection), and links may be directed or weighted.
- Force-directed layout treats links as springs that pull connected nodes together and nodes as charged particles that repel each other.
- Working: start with random positions, compute attraction and repulsion forces, move nodes, and repeat until the layout settles at minimum energy.
- Example: in a social network, friend groups appear as tight clusters and influential people sit in the centre.
- Advantages: it needs no manual placement, shows clusters and structure, and looks balanced with few crossings.
- Limitations: it becomes cluttered ("hairball") for large networks, is slow, and the layout differs on each run.
Answer frame. Open with the two definitions; draw the node-link diagram; explain the spring and repulsion working with the social-network example; close with advantages and limitations.
Asked: [7 marks] (Dec 2024) Explain node-link diagram and force-directed graphs for network visualization.
Interactive visualization: interactivity and user engagement techniques
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. <mark>Interactive visualization lets the user manipulate the display, by filtering, zooming or hovering, to explore the data instead of only viewing a fixed picture.</mark>
Key points.
- Tooltips and hover show exact values on demand without cluttering the chart.
- Zoom, pan and filtering let the user drill from an overview to detail.
- Linked views and brushing highlight the same records across several charts.
- These techniques raise user engagement and support exploration; Plotly and D3.js are common tools.
Introduction to programming libraries for data visualization
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>
Definition. <mark>Matplotlib is the basic Python plotting library, Seaborn is built on it for statistical plots, and Plotly makes interactive web charts.</mark>
Key points.
- Matplotlib gives full control over line, bar, scatter and histogram plots through
matplotlib.pyplot. - Seaborn gives attractive default themes and statistical plots such as heat maps, box plots and pair plots, working directly on pandas data.
- Plotly produces interactive charts with hover, zoom and export, viewable in a browser.
- Program steps: import pyplot, define the data lists, call
plt.plot, label the axes, add a title and grid, thenplt.show().
import matplotlib.pyplot as plt
overs = [5, 10, 15, 20]
runs = [50, 90, 130, 180]
plt.plot(overs, runs, marker='o')
plt.xlabel('Overs')
plt.ylabel('Runs')
plt.title('Run rate of a cricket match')
plt.grid(True)
plt.show() # line rising from 50 at over 5 to 180 at over 20
Answer frame. Import first, then the lists, plt.plot, labels, title, grid and plt.show(); add a note that the average run rate is 9 runs per over at over 20.
Asked: [7 marks] (Dec 2024) Write code to plot a line chart to depict the run rate of a cricket match from given data using Matplotlib.
Introduction to data visualization tools: Tableau
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. <mark>Tableau is a business intelligence tool that builds interactive charts and dashboards by drag and drop, with no coding needed.</mark>
Key points.
- It connects to Excel, CSV, SQL databases and cloud sources.
- Fields are dragged to rows, columns and the Marks card to build a view.
- Several sheets combine into a dashboard with filters and actions.
- Dashboards can be published for sharing on Tableau Server or Public.
Visualization using R
<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>
Definition. <mark>R is a statistical programming language whose ggplot2 package draws charts by layering data, aesthetics and geometric objects (a grammar of graphics).</mark>
Key points.
- Base R functions such as
plot(),hist()andbarplot()give quick charts. - ggplot2 builds a chart as
ggplot(data, aes(x, y)) + geom_point(), adding layers with+. - Themes, facets and labels refine the chart.
- Shiny turns R charts into interactive web apps.
Last-minute revision
- A chart maps data values to visual marks: bar for categories, line for trends, scatter for correlation, histogram for distribution, heat map for intensity.
- A choropleth map shades regions by value; a geospatial heat map shows point density.
- Five geospatial applications: weather, disease spread, transport, crime, urban planning.
- A node-link diagram shows nodes (entities) and links (relations).
- Force-directed layout: links act as springs, nodes repel, and iteration settles at minimum energy.
- Force-directed limitation: hairball clutter on large networks.
- Matplotlib is the base library, Seaborn is statistical, Plotly is interactive.
- Matplotlib line chart: import, lists,
plt.plot,xlabel,ylabel,title,grid,show. - Cricket data: overs 5, 10, 15, 20 with runs 50, 90, 130, 180.
- Tableau is drag-and-drop BI; R uses ggplot2 layers and Shiny for interactivity.
Memory hooks
- Choropleth = "choose regions, paint by value".
- Force-directed = springs pull, charges push.
- Matplotlib order: I-D-P-L-T-G-S (import, data, plot, label, title, grid, show).
- Bar = categories, histogram = bins.
Coverage checklist
- Basic and advanced charts and graphs: bar charts, line charts, scatter plots, histograms, and heat maps: no past questions.
- Geospatial visualization: maps, choropleth maps, geospatial heat maps: Dec 2024 7 marks, need and five applications.
- Network visualization: node-link diagrams, force-directed graphs: Dec 2024 7 marks.
- Interactive visualization: interactivity and user engagement techniques: no past questions.
- Introduction to programming libraries for data visualization: Matplotlib, Seaborn, Plotly: Dec 2024 7 marks, Matplotlib line chart.
- Introduction to data visualization tools- Tableau: no past questions.
- Visualization using R: no past questions.