54
https://www.students.cs.ubc.ca/~cs-436v/21Jan/ Information Visualization (Geographic) Maps Tamara Munzner Department of Computer Science University of British Columbia Week 5, Jan 2021

Information Visualization (Geographic) Mapscs-436v/21Jan/slides/...2 How? Encode Manipulate Facet Reduce Arrange Map Change Select Navigate Express Separate Order Align Use Juxtapose

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

  • https://www.students.cs.ubc.ca/~cs-436v/21Jan/

    Information Visualization (Geographic) Maps

    Tamara MunznerDepartment of Computer ScienceUniversity of British Columbia

    Week 5, Jan 2021

    https://www.students.cs.ubc.ca/~cs-436v/21Jan/

  • 2

    How?

    Encode Manipulate Facet Reduce

    Arrange

    Map

    Change

    Select

    Navigate

    Express Separate

    Order Align

    Use

    Juxtapose

    Partition

    Superimpose

    Filter

    Aggregate

    Embed

    Color

    Motion

    Size, Angle, Curvature, ...

    Hue Saturation Luminance

    Shape

    Direction, Rate, Frequency, ...

    from categorical and ordered attributes

    Why?

    How?

    What?

    How?

    Encode Manipulate Facet Reduce

    Arrange

    Map

    Change

    Select

    Navigate

    Express Separate

    Order Align

    Use

    Juxtapose

    Partition

    Superimpose

    Filter

    Aggregate

    Embed

    Color

    Motion

    Size, Angle, Curvature, ...

    Hue Saturation Luminance

    Shape

    Direction, Rate, Frequency, ...

    from categorical and ordered attributes

    Why?

    How?

    What?

    How?

    Encode Manipulate Facet Reduce

    Arrange

    Map

    Change

    Select

    Navigate

    Express Separate

    Order Align

    Use

    Juxtapose

    Partition

    Superimpose

    Filter

    Aggregate

    Embed

    Color

    Motion

    Size, Angle, Curvature, ...

    Hue Saturation Luminance

    Shape

    Direction, Rate, Frequency, ...

    from categorical and ordered attributes

    Why?

    How?

    What?

    How?

    Encode Manipulate Facet Reduce

    Arrange

    Map

    Change

    Select

    Navigate

    Express Separate

    Order Align

    Use

    Juxtapose

    Partition

    Superimpose

    Filter

    Aggregate

    Embed

    Color

    Motion

    Size, Angle, Curvature, ...

    Hue Saturation Luminance

    Shape

    Direction, Rate, Frequency, ...

    from categorical and ordered attributes

    Why?

    How?

    What?

  • 3

    How?

    Encode Manipulate Facet Reduce

    Arrange

    Map

    Change

    Select

    Navigate

    Express Separate

    Order Align

    Use

    Juxtapose

    Partition

    Superimpose

    Filter

    Aggregate

    Embed

    Color

    Motion

    Size, Angle, Curvature, ...

    Hue Saturation Luminance

    Shape

    Direction, Rate, Frequency, ...

    from categorical and ordered attributes

    Why?

    How?

    What?

    How?

    Encode Manipulate Facet Reduce

    Arrange

    Map

    Change

    Select

    Navigate

    Express Separate

    Order Align

    Use

    Juxtapose

    Partition

    Superimpose

    Filter

    Aggregate

    Embed

    Color

    Motion

    Size, Angle, Curvature, ...

    Hue Saturation Luminance

    Shape

    Direction, Rate, Frequency, ...

    from categorical and ordered attributes

    Why?

    How?

    What?

    How?

    Encode Manipulate Facet Reduce

    Arrange

    Map

    Change

    Select

    Navigate

    Express Separate

    Order Align

    Use

    Juxtapose

    Partition

    Superimpose

    Filter

    Aggregate

    Embed

    Color

    Motion

    Size, Angle, Curvature, ...

    Hue Saturation Luminance

    Shape

    Direction, Rate, Frequency, ...

    from categorical and ordered attributes

    Why?

    How?

    What?

    How?

    Encode Manipulate Facet Reduce

    Arrange

    Map

    Change

    Select

    Navigate

    Express Separate

    Order Align

    Use

    Juxtapose

    Partition

    Superimpose

    Filter

    Aggregate

    Embed

    Color

    Motion

    Size, Angle, Curvature, ...

    Hue Saturation Luminance

    Shape

    Direction, Rate, Frequency, ...

    from categorical and ordered attributes

    Why?

    How?

    What?

  • 4

    How?

    Encode Manipulate Facet Reduce

    Arrange

    Map

    Change

    Select

    Navigate

    Express Separate

    Order Align

    Use

    Juxtapose

    Partition

    Superimpose

    Filter

    Aggregate

    Embed

    Color

    Motion

    Size, Angle, Curvature, ...

    Hue Saturation Luminance

    Shape

    Direction, Rate, Frequency, ...

    from categorical and ordered attributes

    Why?

    How?

    What?

    How?

    Encode Manipulate Facet Reduce

    Arrange

    Map

    Change

    Select

    Navigate

    Express Separate

    Order Align

    Use

    Juxtapose

    Partition

    Superimpose

    Filter

    Aggregate

    Embed

    Color

    Motion

    Size, Angle, Curvature, ...

    Hue Saturation Luminance

    Shape

    Direction, Rate, Frequency, ...

    from categorical and ordered attributes

    Why?

    How?

    What?

    How?

    Encode Manipulate Facet Reduce

    Arrange

    Map

    Change

    Select

    Navigate

    Express Separate

    Order Align

    Use

    Juxtapose

    Partition

    Superimpose

    Filter

    Aggregate

    Embed

    Color

    Motion

    Size, Angle, Curvature, ...

    Hue Saturation Luminance

    Shape

    Direction, Rate, Frequency, ...

    from categorical and ordered attributes

    Why?

    How?

    What?

    How?

    Encode Manipulate Facet Reduce

    Arrange

    Map

    Change

    Select

    Navigate

    Express Separate

    Order Align

    Use

    Juxtapose

    Partition

    Superimpose

    Filter

    Aggregate

    Embed

    Color

    Motion

    Size, Angle, Curvature, ...

    Hue Saturation Luminance

    Shape

    Direction, Rate, Frequency, ...

    from categorical and ordered attributes

    Why?

    How?

    What?

  • Spatial data

    • use given spatial position • when?

    – dataset contains spatial attributes and they have primary importance– central tasks revolve around understanding spatial relationships

    • main focus today: geographical data...– example: state borders on a map

    • ...but not all spatial data is geographical

    5

  • We use geographic visualization when:

    (1) The data contains geographical attributes

    (2) Understanding spatial relationships is an important task

    6

  • A dataset may contain geographical information and yet creating a geographical visualization may not be relevant.

    7

  • Key question:

    Does the given spatial/geographic data matter for my task?

    8

    » Position is the most effective visual channel

    » we don’t want to waste it for non-relevant geographic spatial information

    » A geo map is not always the best or only solution.

  • That said, there is an advantage of maps over other representations …

    9

  • … familiarity!

    10

    • people know where something on a map is– if they are familiar with the region

    • maps act as an index from spatial to semantic information and vice versa– visually encode given spatial geometry as marks using 2D position channels

  • 11

  • 12

    John Snow’s Cholera Map

    • London, 1854: mystery outbreak

    • Snow mapped deaths as bars on a geo map

    • cases clustered around a water pump

    – one part of a detailed statistical analysis

  • 13

    John Snow’s Cholera Map

    • London, 1854: mystery outbreak

    • Snow mapped deaths as bars on a geo map

    • cases clustered around a water pump

    – one part of a detailed statistical analysis

  • 14

    Interlocking marks

    • shape coded

    • area coded

    • position coded

    Geographic Map

    • cannot encode another attribute with these channels, they're "taken"

  • Thematic maps

    • show spatial variability of attribute ("theme")– combine geographic / reference map with (simple, flat) tabular data– join together

    • region: interlocking area marks (provinces, countries with outline shapes)– also could have point marks (cities, locations with 2D lat/lon coords)

    • region: categorical key attribute in table– use to look up value attributes

    • major idioms– choropleth– symbol maps– cartograms– dot density maps

    15

  • Choropleth Maps

    16

  • 17

    Idiom: Choropleth map

    • quantitative attribute encoded with color channel over regions

    • region is determined by using given geographic geometry

    • choropleth map created by Charles Dupin in 1826

    – illiteracy / school attendance

  • 18censusmapper.ca

    Population density (Census 2016)

    https://censusmapper.ca/

  • Choropleth map: Pros & cons

    • pros– easy to read and understand – well established visualization (no learning curve) – data is often collected and aggregated by geographical regions

    • cons– most effective visual variable used for geographic location – visual salience depends on region size, not true importance wrt attribute value

    • large regions appear more important than small ones

    – color palette choice has a huge influence on the result

    19

  • U.S. Poverty Map

    • exact same data in both!

    20Gregor Aisch, https://www.vis4.net/blog/2011/12/choropleth-maps/

    http://vis4.net/blog/posts/choropleth-maps/https://www.vis4.net/blog/2011/12/choropleth-maps/

  • U.S. Poverty Map

    21Gregor Aisch, https://www.vis4.net/blog/2011/12/choropleth-maps/

    distorted class distribution equidistant bin limits between min & max

    http://vis4.net/blog/posts/choropleth-maps/https://www.vis4.net/blog/2011/12/choropleth-maps/

  • U.S. Poverty Map

    22Gregor Aisch, https://www.vis4.net/blog/2011/12/choropleth-maps/

    big jumps bins1-2, 4-5. diff. gradient bin 4

    http://vis4.net/blog/posts/choropleth-maps/https://www.vis4.net/blog/2011/12/choropleth-maps/

  • U.S. Poverty Map

    23

    Number of bins?

    trade-off between correctness and color distinguishability, hard to compare many regions

    Gregor Aisch, https://www.vis4.net/blog/2011/12/choropleth-maps/

    http://vis4.net/blog/posts/choropleth-maps/https://www.vis4.net/blog/2011/12/choropleth-maps/

  • Beware: Population maps trickiness!

    • consider when to normalize by population density

    • general issue– absolute counts vs relative/normalized data– failure to normalize is common error:

    • encode raw data values (tied to underlying population), but should use normalized values (unemployed people per 100 citizens, mean family income, …).

    – or could derive new data like ratios• ex: population growth between 2010 and 2020

    24[ https://xkcd.com/1138 ]

    https://xkcd.com/1138

  • Choropleth maps: Recommendations

    • only use when central task is understanding spatial relationships

    • show only one variable at a time

    • normalize when appropriate

    • be careful when choosing colors & bins

    • best case: regions are roughly equal sized

    25

  • Symbol Maps

    26

  • Idiom: Symbol maps• symbol is used to represent aggregated data (mark or glyph)

    – allows use of size and shape and color channels• aka proportional symbol maps, graduated symbol maps

    • keep original spatial geometry in the background• often a good alternative to choropleth maps

    27

    State population

  • Symbol maps with glyphs

    28

  • Symbol map: Pros & cons

    • pros– somewhat intuitive to read and understand – mitigate problems with region size vs data salience

    • marks: symbol size follows attribute value• glyphs: symbol size can be uniform

    • cons– possible occlusion / overlap

    • symbols could overlap each other• symbols could occlude region boundaries

    – complex glyphs may require explanation / training

    29

  • Cartograms

    30

  • 31Mark Newman, Univ. Michigan

  • 32

    Contiguous Cartogram: Population

    Mark Newman, Univ. Michigan

    Cartograms distort size & shape of geographic regions so that the area directly encodes a data variable

  • 33

    Contiguous Cartogram: GDP (Gross Domestic Product)

    Mark Newman, Univ. Michigan

  • 34

    Idiom: Contiguous cartogram

    Mark Newman, Univ. Michigan

    Greenhouse Emissions

    Child Mortality

    • interlocking marks: shape, area, and position coded

    • derive new interlocking marks– based on combination of original interlocking

    marks and new quantitative attribute.

    • algorithm to create new marks– input: target size– goal: shape as close to the original as possible– requirement: maintain constraints

    • relative position• contiguous boundaries with their neighbours

  • Cartogram: Pros & cons

    • pros– can be intriguing and engaging– best case: strong and surprising size disparities

    • cons– require substantial familiarity with original dataset & use of memory

    • compare distorted marks to memory of original marks• mitigation strategies: transitions or side by side views

    – major distortion is problematic• may be aesthetically displeasing• may result in unrecognizable marks

    – difficult to extract exact quantities

    35

  • Idiom: Dorling cartogram

    36communityhub.esriuk.com

    • sized circles represent quantity of interest– one for each geographic region

    • geometric shapes in place of geographic area– stylized rather than realistic, relax shape constraints

  • Idiom: Demers cartogram

    37communityhub.esriuk.com

    • variation of Dorling cartogram: rectangles not circles

  • • uniform-sized shapes arranged in rectilinear grid• maintain approximate spatial position and arrangement

    Idiom: Grid Cartogram

    38

  • Idiom: Hexagonal cartogram

    39

    Danny DeBelius

    • uniform-sized hexagons arranged in grid• maintain as many border adjacencies as possible

    http://blog.apps.npr.org/2015/05/11/hex-tile-maps.html

  • Cartogram: Recommendations

    • non-contiguous cartograms often easier to understand– hex cartograms especially good trade-off between stylized and familiar

    • uniform size has benefit of regularity

    40

  • Dot Density Maps

    41

  • Idiom: Dot density maps• visualize distribution of a

    phenomenon by placing dots

    • one symbol represents a constant number of items

    – dots have uniform size & shape

    – allows use of color channel

    • task: show spatial patterns, clusters

    42

  • 43

    Dot Density Map: One Dot per Zipcode in the U.S.

    https://vega.github.io/editor/#/examples/vega-lite/geo_circle

    https://vega.github.io/editor/#/examples/vega-lite/geo_circle

  • Dot density maps: Pros and cons

    • pros– straightforward to understand– avoids choropleth non-uniform region size problems

    • cons– challenge: normalization

    • many dot maps primarily show population density (with which the target variable is correlated) instead of the effect of interest

    • same challenge as choropleths

    – perceptual disadvantage: difficult to extract quantities

    – performance disadvantage: rendering many dots can be slow

    44

  • Map Projections

    45

  • Map Projections

    46

    • mathematical functions that map 3D surface geometry of the Earth to 2D maps• all projections of sphere on plane necessarily distort surface in some way• interactive: philogb.github.io/page/myriahedral/ and jasondavies.com/maps/

    http://philogb.github.io/page/myriahedral/https://www.jasondavies.com/maps/

  • 47

    Mercator Projection

    » Heavily distorts country sizes; particularly close to the poles.

  • D3 Geo Projections

    48

    github.com/d3/d3-geo-projection

    https://github.com/d3/d3-geo-projection

  • Implementation: Tile Maps• divide into many smaller images (tiles) of fixed size, instead of one huge image

    – to display, only need tiles covering current geographic area and zoom level– often image (.png), but some use vectors for performance– examples: Google Maps (widely used), leaflet.js framework with Open Street Map tiles (open source)

    • can add symbols or D3 visualization as a superimposed layer

    49

    TileOne map, multiple tiles

  • Beyond Thematic Maps

    50

  • Idiom: topographic map• data

    – geographic geometry– scalar spatial field

    • 1 quant attribute per grid cell

    • derived data– isoline geometry

    • isocontours computed for specific levels of scalar values

    • task– understanding terrain shape

    • densely lined regions = steep

    • pros– use only 2D position, avoid 3D challenges– color channel available for other attributes

    • cons– significant clutter from additional lines 51

    Land Information New Zealand Data Service

    http://bl.ocks.org/mbostock/4060606

  • Non-Geographic Spatial

    52

  • Spatial data

    • smaller scales– shot maps, floor plans

    • still use given data

    53http://www.nytimes.com/interactive/2012/06/11/sports/basketball/nba-shot-analysis.html

    http://www.nytimes.com/interactive/2012/06/11/sports/basketball/nba-shot-analysis.html

  • Credits

    • Visualization Analysis and Design (Ch 8)• Heer et al.: A Tour Through the Visualization Zoo

    https://homes.cs.washington.edu/~jheer/files/zoo/

    • Enrico Bertini, NYU Tandon• Hanspeter Pfister, Harvard University

    http://cs171.org/

    • Michael Oppermann https://www.students.cs.ubc.ca/~cs-436v/20Jan/

    54

    https://homes.cs.washington.edu/~jheer/files/zoo/http://cs171.org/https://www.students.cs.ubc.ca/~cs-436v/20Jan/