1 of 64

Visualisasi Data

Program Studi Informatika

Fakultas Sains dan Matematika

Universitas Diponegoro

​

MIK1624713

2 of 64

Agenda

  • What's Vis, and Why Do It?
  • Analysis: Nested Model
  • Data Abstraction
  • Task Abstraction
  • Marks & Channels
  • Review & Discussion
    • Palmer-Penguins
  • Arrange Tables
  • Review & Discussion
    • Gapminder

​

​

3 of 64

Visualization Analysis & Design

​

Arrange Tables (Ch 7) I

@tamaramunzner

4 of 64

Focus on Tables

4

Spatial

5 of 64

Keys and values

  • key
    • independent attribute
    • used as unique index to look up items
    • simple tables: 1 key
    • multidimensional tables: multiple keys
  • value
    • dependent attribute, value of cell

5

6 of 64

Keys and values

  • key
    • independent attribute
    • used as unique index to look up items
    • simple tables: 1 key
    • multidimensional tables: multiple keys
  • value
    • dependent attribute, value of cell
  • classify arrangements by keys used
    • 0, 1, 2, ...

6

0

7 of 64

Idiom: scatterplot

  • express values (magnitudes)
    • quantitative attributes
  • no keys, only values

7

[A layered grammar of graphics. Wickham. Journ. Computational and Graphical Statistics 19:1 (2010), 3–28.]

8 of 64

Idiom: scatterplot

  • express values (magnitudes)
    • quantitative attributes
  • no keys, only values
    • data
      • 2 quant attribs
    • mark: points
    • channels
      • horiz + vert position

8

[A layered grammar of graphics. Wickham. Journ. Computational and Graphical Statistics 19:1 (2010), 3–28.]

9 of 64

Idiom: scatterplot

  • express values (magnitudes)
    • quantitative attributes
  • no keys, only values
    • data
      • 2 quant attribs
    • mark: points
    • channels
      • horiz + vert position
    • tasks
      • find trends, outliers, distribution, correlation, clusters
    • scalability
      • hundreds of items

9

[A layered grammar of graphics. Wickham. Journ. Computational and Graphical Statistics 19:1 (2010), 3–28.]

10 of 64

Scatterplots: Encoding more channels

  • additional channels viable since using point marks
    • color
    • size (1 quant attribute, used to control 2D area)
      • note radius would mislead, take square root since area grows quadratically
    • shape

10

11 of 64

Scatterplot tasks

11

12 of 64

Scatterplot tasks

  • correlation

12

13 of 64

Scatterplot tasks

  • correlation

​

​

​

​

  • clusters/groups, and clusters vs classes

13

14 of 64

Some keys

14

0

15 of 64

Some keys: Categorical regions

15

16 of 64

Regions: Separate, order, align

  • regions: contiguous bounded areas distinct from each other
    • separate into spatial regions: one mark per region (for now)
  • use categorical or ordered attribute to separate into regions
    • no conflict with expressiveness principle for categorical attributes
  • use ordered attribute to order and align regions

16

17 of 64

Separated and aligned and ordered

  • best case

17

18 of 64

Separated and aligned but not ordered

  • limitation: hard to know rank. what's 4th? what's 7th?

18

19 of 64

Separated but not aligned or ordered

  • limitation: hard to make comparisons with size (vs aligned position)

19

20 of 64

Idiom: bar chart

  • one key, one value
    • data
      • 1 categ attrib, 1 quant attrib
    • mark: lines
    • channels
      • length to express quant value
      • spatial regions: one per mark
        • separated horizontally, aligned vertically
        • ordered by quant attrib
          • by label (alphabetical), by length attrib (data-driven)
    • task
      • compare, lookup values
    • scalability
      • dozens to hundreds of levels for key attrib [bars], hundreds for values

20

21 of 64

Idiom: stacked bar chart

  • one more key
    • data
      • 2 categ attrib, 1 quant attrib
    • mark: vertical stack of line marks
      • glyph: composite object, internal structure from multiple marks
    • channels
      • length and color hue
      • spatial regions: one per glyph
        • aligned: full glyph, lowest bar component
        • unaligned: other bar components
    • task
      • part-to-whole relationship
    • scalability: asymmetric
      • for stacked key attrib, 10-12 levels [segments]
      • for main key attrib, dozens to hundreds of levels [bars]

21

22 of 64

Idiom: streamgraph

  • generalized stacked graph
    • emphasizing horizontal continuity
      • vs vertical items
    • data
      • 1 categ key attrib (movies)
      • 1 ordered key attrib (time)
      • 1 quant value attrib (counts)
    • derived data
      • geometry: layers, where height encodes counts
      • 1 quant attrib (layer ordering)

22

[Stacked Graphs Geometry & Aesthetics. Byron and Wattenberg. IEEE Trans. Visualization and Computer Graphics (Proc. InfoVis 2008) 14(6): 1245–1252, (2008).]

​

23 of 64

Idiom: streamgraph

  • generalized stacked graph
    • emphasizing horizontal continuity
      • vs vertical items
    • data
      • 1 categ key attrib (movies)
      • 1 ordered key attrib (time)
      • 1 quant value attrib (counts)
    • derived data
      • geometry: layers, where height encodes counts
      • 1 quant attrib (layer ordering)
    • scalability
      • hundreds of time keys
      • dozens to hundreds of movies keys
        • more than stacked bars: most layers don’t extend across whole chart

23

[Stacked Graphs Geometry & Aesthetics. Byron and Wattenberg. IEEE Trans. Visualization and Computer Graphics (Proc. InfoVis 2008) 14(6): 1245–1252, (2008).]

​

24 of 64

Idiom: dot / line chart

  • one key, one value
    • data
      • 2 quant attribs
    • mark: points �AND line connection marks between them
    • channels
      • aligned lengths to express quant value
      • separated and ordered by key attrib into horizontal regions
    • task
      • find trend
        • connection marks emphasize ordering of items along key axis by explicitly showing relationship between one item and the next
    • scalability
      • hundreds of key levels, hundreds of value levels

24

25 of 64

Idiom: dot / line chart

  • one key, one value
    • data
      • 2 quant attribs
    • mark: points �AND line connection marks between them
    • channels
      • aligned lengths to express quant value
      • separated and ordered by key attrib into horizontal regions
    • task
      • find trend
        • connection marks emphasize ordering of items along key axis by explicitly showing relationship between one item and the next
    • scalability
      • hundreds of key levels, hundreds of value levels

25

26 of 64

Choosing bar vs line charts

  • depends on type of key attrib
    • bar charts if categorical
    • line charts if ordered
  • do not use line charts for categorical key attribs
    • violates expressiveness principle
      • implication of trend so strong that it overrides semantics!
        • “The more male a person is, the taller he/she is”

26

after [Bars and Lines: A Study of Graphic Communication. Zacks and Tversky. Memory and Cognition 27:6 (1999), 1073–1079.]

27 of 64

Chart axes: label them!

  • best practice to label
    • few exceptions: individual small multiple views could share axis label

27

28 of 64

Chart axes: avoid cropping y axis

  • include 0 at bottom left or slope misleads

28

[Truncating the Y-Axis: Threat or Menace?�Correll, Bertini, & Franconeri, CHI 2020.]

29 of 64

Chart axes: avoid cropping y axis

  • include 0 at bottom left or slope misleads
    • some exceptions (arbitrary 0, small change matters)

29

[Truncating the Y-Axis: Threat or Menace?�Correll, Bertini, & Franconeri, CHI 2020.]

30 of 64

Idiom: Indexed line charts

  • data: 2 quant attribs
    • 1 key + 1 value
  • derived data: new quant value attrib
    • index
    • plot instead of original value
  • task: show change over time
    • principle: normalized, not absolute
  • scalability
    • same as standard line chart

30

31 of 64

Idiom: Gantt charts

  • one key, two (related) values
    • data
      • 1 categ attrib, 2 quant attribs
    • mark: line
      • length: duration
    • channels
      • horiz position: start time �(+end from duration)
    • task
      • emphasize temporal overlaps & start/end dependencies between items
    • scalability
      • dozens of key levels [bars]
      • hundreds of value levels [durations]

31

https://www.r-bloggers.com/gantt-charts-in-r-using-plotly/

32 of 64

Idiom: Slopegraphs

  • two values
    • data
      • 2 quant value attribs
      • (1 derived attrib: change magnitude)
    • mark: point + line
      • line connecting mark between pts
    • channels
      • 2 vertical pos: express attrib value
      • (linewidth/size, color)
    • task
      • emphasize changes in rank/value
    • scalability
      • hundreds of value levels
      • dozens of items

32

33 of 64

2 Keys

33

0

34 of 64

Idiom: heatmap

  • two keys, one value
    • data
      • 2 categ attribs (gene, experimental condition)
      • 1 quant attrib (expression levels)
    • marks: point
      • separate and align in 2D matrix
        • indexed by 2 categorical attributes
    • channels
      • color by quant attrib
        • (ordered diverging colormap)
    • task
      • find clusters, outliers
    • scalability
      • 1M items, 100s of categ levels, ~10 quant attrib levels

34

35 of 64

Heatmap reordering

35

36 of 64

Idiom: cluster heatmap

  • in addition
    • derived data
      • 2 cluster hierarchies
    • dendrogram
      • parent-child relationships in tree with connection line marks
      • leaves aligned so interior branch heights easy to compare
    • heatmap
      • marks (re-)ordered by cluster hierarchy traversal
      • task: assess quality of clusters found by automatic methods

36

37 of 64

Visualization Analysis & Design

​

Tables (Ch 7) II

@tamaramunzner

38 of 64

38

39 of 64

Idioms: radial bar chart, star plot

  • star plot
    • line mark, radial axes meet at central point
  • radial bar chart
    • line mark, radial axes meet at central ring
    • channels: length, angle/orientation
  • bar chart
    • rectilinear axes, aligned vertically

​

  • accuracy
    • length not aligned with radial layouts
      • less accurately perceived than rectilinear aligned

39

[Vismon: Facilitating Risk Assessment and Decision Making In Fisheries Management. Booshehrian, Möller, Peterman, and Munzner. Technical Report TR 2011-04, Simon Fraser University, School of Computing Science, 2011.]

40 of 64

Idiom: radar plot

  • radial line chart
    • point marks, radial layout
    • connecting line marks

​

  • avoid unless data is cyclic

40

41 of 64

“Radar graphs: Avoid them (99.9% of the time)”

41

http://www.thefunctionalart.com/2012/11/radar-graphs-avoid-them-999-of-time.html

original�difficult to interpret

redesign for�rectilinear

42 of 64

Idioms: pie chart, coxcomb chart

  • pie chart
    • interlocking area marks with angle channel: 2D area varies
      • separated & ordered radially, uniform height
    • accuracy: area less accurate than rectilinear aligned line length
    • task: part-to-whole judgements
  • coxcomb chart
    • line marks with length channel: 1D length varies
      • separated & ordered radially, uniform width
    • direct analog to radial bar charts
  • data
    • 1 categ key attrib, 1 quant value attrib

42

[A layered grammar of graphics. Wickham. Journ. Computational and Graphical Statistics 19:1 (2010), 3–28.]

43 of 64

Coxcomb / nightingale rose / polar area chart

  • invented by Florence Nightingale: �Diagram of the Causes of Mortality in the Army in the East

43

44 of 64

Coxcomb: perception

  • encode: 1D length
  • decode/perceive: 2D area

​

  • nonuniform line/sector width as length increases
    • so area variation is nonlinear wrt line mark length!

​

  • bar chart safer: uniform width, so area is linear with line mark length
    • both radial & rectilinear cases

44

nonuniform width as length increases

uniform width as length increases

radial & rectilinear bars: uniform width as length increases

45 of 64

Pie charts: perception

  • some empirical evidence that people respond to arc length
    • decode/perceive: not angles
    • maybe also areas?…
  • donut charts no worse than pie charts

45

46 of 64

Pie charts: best practices

  • not so bad for two (or few) levels, for part-to-whole task

46

47 of 64

Pie charts: best practices

  • not so bad for two (or few) levels, for part-to-whole task
  • dubious for several levels if details matter

47

48 of 64

Pie charts: best practices

  • not so bad for two (or few) levels, for part-to-whole task
  • dubious for several levels if details matter
  • terrible for many levels

48

49 of 64

Idioms: normalized stacked bar chart

  • task
    • part-to-whole judgements
  • normalized stacked bar chart
    • stacked bar chart, normalized to full vert height
    • single stacked bar equivalent to full pie
      • high information density: requires narrow rectangle
  • pie chart
    • information density: requires large circle

49

50 of 64

Idiom: glyphmaps

​

​

  • rectilinear good for �linear vs nonlinear trends

​

​

  • radial good for cyclic patterns
    • evaluating periodicity

50

[Glyph-maps for Visually Exploring Temporal Patterns in Climate Data and Models. Wickham, Hofmann, Wickham, and Cook. Environmetrics 23:5 (2012), 382–393.]

51 of 64

51

52 of 64

Idiom: SPLOM

  • scatterplot matrix (SPLOM)
    • rectilinear axes, �point mark
    • all possible pairs of axes
    • scalability
      • one dozen attribs
      • dozens to hundreds of items

52

53 of 64

Idioms: parallel coordinates

  • scatterplot limitation
    • visual representation with orthogonal axes
    • can show only two attributes with spatial position channel

53

after [Visualization Course Figures. McGuffin, 2014. http://www.michaelmcguffin.com/courses/vis/]

54 of 64

Idioms: parallel coordinates

  • scatterplot limitation
    • visual representation with orthogonal axes
    • can show only two attributes with spatial position channel
  • alternative: line up axes in parallel to show many attributes with position
    • item encoded with a line with n segments
    • n is the number of attributes shown
  • parallel coordinates
    • parallel axes, jagged line for item
    • rectilinear axes, item as point
      • axis ordering is major challenge
    • scalability
      • dozens of attribs
      • hundreds of items

54

after [Visualization Course Figures. McGuffin, 2014. http://www.michaelmcguffin.com/courses/vis/]

55 of 64

Task: Correlation

  • scatterplot matrix
    • positive correlation
      • diagonal low-to-high
    • negative correlation
      • diagonal high-to-low
    • uncorrelated: spread out
  • parallel coordinates
    • positive correlation
      • parallel line segments
    • negative correlation
      • all segments cross at halfway point
    • uncorrelated
      • scattered crossings

55

[Hyperdimensional Data Analysis Using Parallel Coordinates. Wegman. Journ. American Statistical Association 85:411 (1990), 664–675.]

56 of 64

Parallel coordinates, limitations

  • visible patterns only between neighboring axis pairs
  • how to pick axis order?
    • usual solution: reorderable axes, interactive exploration
    • same weakness as many other techniques
      • downside of interaction: human-powered search
    • some algorithms proposed, none fully solve

56

57 of 64

Orientation limitations

  • rectilinear: scalability wrt #axes
      • 2 axes best, 3 problematic, 4+ impossible

57

58 of 64

Orientation limitations

  • rectilinear: scalability wrt #axes
      • 2 axes best, 3 problematic, 4+ impossible
  • parallel: unfamiliarity, training time

58

59 of 64

Orientation limitations

  • rectilinear: scalability wrt #axes
      • 2 axes best, 3 problematic, 4+ impossible
  • parallel: unfamiliarity, training time
  • radial: perceptual limits
    • polar coordinate asymmetry
      • angles lower precision than length
      • nonuniform sector width/size depending on radial distance
    • frequently problematic
      • but sometimes can be deliberately exploited!
        • for 2 attribs of very unequal importance

59

[Uncovering Strengths and Weaknesses of Radial Visualizations - an Empirical Approach. Diehl, Beck and Burch. IEEE TVCG (Proc. InfoVis) 16(6):935--942, 2010.]

60 of 64

Layout density

60

61 of 64

Idiom: Dense software overviews

  • data: text
    • text + 1 quant attrib per line
  • derived data:
    • one pixel high line
    • length according to original
  • color line by attrib
  • scalability
    • 10K+ lines

61

[Visualization of test information to assist fault localization. Jones, Harrold, Stasko. Proc. ICSE 2002, p 467-477.]

62 of 64

Arrange tables

62

63 of 64

63

64 of 64

64