- When to use maps
- Types of maps
- Case study
October 27 and November 1 2022
“The common case with spatial data is that the given spatial position is the attribute of primary importance because the central tasks revolve around understanding spatial relationships. […] datasets with spatial attribute semantics might not have the task involving understanding of spatial relationships as the primary concern.
Munzner, Tamara. Visualization Analysis and Design (Chapter 8)
“A choropleth map shows a quantitative attribute encoded as color over regions delimited as area marks, where the shape of each region is determined by using given geometry. […] The major design choices for choropleths are how to construct the colormap, and what region boundaries to use.”
– Munzner (p. 181)
With a classmate, explore the choropleth map Vega example
Most of us in the US have encountered map visualizations for election results (they are quite popular). Here’s an example from the New York Times.
With a classmate, explore the maps at gapminder.org and discuss:
Mercador is the most common globe projection used in world maps (for historical reasons, not because it’s the most accurate projection).
You can find the data in its original form at the Gapminder website
We will be working with data that has been already transformed to be used in a Vega map specification
The starter project for this case study is one of the zoomable world map example from Vega’s documentation website.
Download the project and look at the specification – what property do we need to connect with the gapminder data? How do we do that?
We can use the lookup
transform to join the gapminder data to the world map data:
transform: [ { type: "lookup", from: "gapminder", key: "id", fields: ["id"], values: ["lifeExpectancy"] } ]