October 27 and November 1 2022

Agenda

  • When to use maps
  • Types of maps
  • Case study

Spatial Data

“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)

Choropleth Map

“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

  1. What data is being encoded?
  2. What is the purpose of this visualization? Who is the audience?
  3. Is spatial position the attribute of primary importance?
  4. How easy are the identify and compare tasks in this visualization?

Interactive Choropleth Map

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.

  1. Why do you think these are so popular?
  2. Is spatial position the attribute of primary importance?
  3. How easy are the identify and compare tasks in this visualization?
  4. What colormap/color scheme is used in this map?

Interactive Maps

With a classmate, explore the maps at gapminder.org and discuss:

  1. What data is being encoded?
  2. What is the purpose of this visualization? Who is the audience?
  3. Is spatial data the attribute of primary importance?
  4. How easy are the identify and compare tasks in this visualization?

Projections

Mercador is the most common globe projection used in world maps (for historical reasons, not because it’s the most accurate projection).

  1. How do other projections represent the size of different countries?
  2. Why is size of a geographical area important for spatial visualizations?
  3. What other attributes for geographical area are important but might not be represented in map visualizations?

Case Study: Gapminder data

The data

Data Joins

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"] }
]