Before the questions, make sure you can: compute great-circle distances and explain why degrees are not distances; choose a projection for a map and explain what Mercator distorts; choose between choropleths, proportional symbols, dot maps, heat maps and flow maps; normalize and classify values for a choropleth and see how the classification changes the map; compute basic network metrics and choose between a node-link diagram and an adjacency matrix; compute a slice-and-dice treemap and explain why squarified layouts are preferred; and recognize the misleading patterns typical of maps and network drawings.
Maps, networks and trees are the datasets where position is already taken: on a map, position must show geography; in a network, it should show structure; in a tree, hierarchy. The design problem is to encode everything else — counts, rates, flows, importance — with the remaining, weaker channels, without letting the geometry lie (big districts look important, central nodes look connected). These are also the charts AI generators produce most carelessly: raw-count maps, Mercator everywhere, and hairball networks.
Geography basics
- Coordinates: latitude (north–south, −90…90) and longitude (east–west, −180…180) in degrees (WGS 84, EPSG:4326). GeoJSON stores them as
[longitude, latitude]— a frequent source of maps drawn in the ocean. - Distance on a sphere: the haversine (great-circle) formula with Earth radius ≈ 6,371 km. One degree of latitude is ≈ 111.2 km everywhere, but one degree of longitude shrinks with latitude (≈ 98.2 km at Wenzhou's 28° N, 0 at the poles) — so "distance = √(Δlat² + Δlon²)" in degrees is wrong (Lab V10.1). Beijing–Shanghai is about 1,067 km along the great circle.
- Projections map the sphere to a plane and must distort something. Mercator preserves angles (good for navigation) but inflates areas toward the poles — Greenland looks as large as Africa, which is about 14 times bigger. Web Mercator (EPSG:3857) is used by tile maps (OpenStreetMap, Google Maps). For maps that compare areas or densities (choropleths), prefer equal-area projections (Albers, Equal Earth, Mollweide). For a city, distortion is small, but the choice still matters for world and country maps.
- Boundaries come as GeoJSON or TopoJSON (which stores shared borders once — smaller files). In Python, GeoPandas handles shapes, projections and spatial joins.
Thematic maps
| Idiom | Encodes | Use for | Pitfall |
|---|---|---|---|
| Choropleth | colour of regions | rates/densities per area (per capita, per km²) | large regions dominate visually; raw counts mislead |
| Proportional symbols | size of circles at locations | counts/totals at points or regions | overlap; area perception (n ≈ 0.7) |
| Dot density / point map | one dot per item | distribution of individual events (sensor sites, thefts) | overplotting in dense areas |
| Heat map / density | colour of a smoothed density surface | hotspots of many points | bandwidth choice changes the story |
| Flow map | lines/arrows with width | movements between places (bike trips) | clutter with many flows |
| Cartogram | region size distorted by a value | population-weighted comparisons | unfamiliar shapes |
Normalize before you colour. A choropleth of total respiratory cases mostly maps population: Lucheng has the most cases (420), but Longwan has the highest rate (15 per 10,000 vs. 6 in Lucheng) — Lab V10.2.
Classification turns continuous rates into a few colour classes. Equal interval (same width) keeps differences honest but can put almost everything in one class when the distribution is skewed (five of six districts in the lowest class in Lab V10.2); quantile (same number of regions per class) uses all colours but can separate nearly identical values and hide large gaps; natural breaks (Jenks) look for gaps in the data. Always show the class boundaries in the legend, and know that the classification is a design choice that changes the map's message.
The modifiable areal unit problem (MAUP): results depend on how space is divided — the same events aggregated by district, by grid cell or by postal code can show different patterns. And beware the ecological fallacy: a district-level correlation says nothing certain about individuals.
In Altair, maps use mark_geoshape() with a project(type="equalEarth") (or "mercator", "albersUsa", …) and GeoJSON/TopoJSON data; points are drawn with mark_circle() using longitude=/latitude= encodings. Plotly (px.choropleth_map, px.scatter_map) and Folium/Leaflet add tile backgrounds and zooming.
Networks
- Node-link diagrams: nodes as points, links as lines; positions from a force-directed layout (connected nodes attract, all nodes repel; Fruchterman–Reingold). Good for paths and clusters in sparse networks; beyond a few hundred nodes they become hairballs. Remember: position in a force layout is not a data attribute — nearby nodes are not necessarily similar.
- Adjacency matrix: rows and columns = nodes, cells = links (colour = weight). Scales to dense networks and shows clusters when rows are reordered; studies (Ghoniem et al., 2004) found matrices better than node-link diagrams for most tasks on dense or large networks, node-link better for path-following in small sparse ones.
- Arc diagrams (nodes on a line, links as arcs), edge bundling (routing similar edges together, Holten 2006) and filtering reduce clutter.
- Metrics guide attention: degree (number of links), strength (weighted degree: number of trips in + out), betweenness centrality (how often a node lies on shortest paths — a "bridge"), density (links / possible links). In Lab V10.3 the station C has the highest strength (7 trips) and betweenness (0.83): it connects the outer stations D and E to the rest.
Trees (hierarchies)
- Node-link trees (tidy layout, Reingold–Tilford): clear structure, little space for leaf attributes.
- Indented lists (file browsers): good for lookup and labels.
- Treemaps (Shneiderman, 1992): containment — nested rectangles sized by a value (energy per district → building). Excellent for part-to-whole of a large hierarchy, poor for precise comparison (area, Chapter 5) and for showing depth. The original slice-and-dice layout alternates horizontal and vertical splits and produces thin slivers (aspect ratio 12 for the airport in Lab V10.4); squarified layouts (Bruls et al., 2000) keep rectangles close to squares, making areas easier to compare.
- Sunbursts/icicles: radial or stacked adjacency layouts that show depth better than treemaps.
Bike-share and ride-hailing companies visualize flows between stations to plan rebalancing; logistics firms map delivery networks; cybersecurity teams use network views to trace attacks. In all of them, the useful view is rarely "the whole network": it is a filtered, aggregated or matrix view focused on the task (e.g., the 20 largest imbalances).
Spatial and network visualization meet in origin–destination data (mobility, migration, trade). Research proposes OD maps, flow aggregation and edge bundling to make millions of flows readable, and studies how AI models can summarize maps — current models frequently misjudge areas and colour classes, echoing human perception problems.
Key takeaways
- Use great-circle distances; degrees of longitude shrink with latitude. GeoJSON order is [lon, lat].
- Mercator inflates areas; use equal-area projections for choropleths; Web Mercator is the tile standard.
- Choropleths for normalized rates, proportional symbols for counts, dot/heat maps for events, flow maps for movements.
- Classification (equal interval, quantile, natural breaks) changes the message; show breaks; beware MAUP and ecological fallacy.
- Networks: node-link for small sparse ones, adjacency matrices for dense ones; metrics (degree, strength, betweenness, density) guide filtering.
- Trees: node-link, indented, treemaps (squarified better than slice-and-dice), sunbursts/icicles.
Ready? Close the notes and practise.
30 questions. Predict the output before you check — that is the skill the exam measures.