Interactive Graphics stat/engl 332

advertisement
Interactive Graphics
stat/engl 332
Outline
• Interactive Graphics
• Examples: Media, ManyEyes
• Linked Displays - EDA
• Example: Unusual Episode
• More on EDA: cranvas & tipping behavior
What is interaction?
Interaction means that the human makes some
action on the plot and the plot responds to the
action by changing itself in some way or by
revealing more information.
Interactive Displays
Highly interactive systems are characterized by
• Immediacy of place and time:
- click on object in a screen
- response within milliseconds (200 ms is blink of
an eye)
• Actions include querying, zooming, re-ordering/re-structuring
chart, change of parameters, ...
Examples in the Media
• NY Times
e.g. inaugural presidential addresses: http://
www.nytimes.com/interactive/2009/01/17/washington/
20090117_ADDRESSES.html
how people spend their time: http://
www.nytimes.com/interactive/2009/07/31/business/20080801-metricsgraphic.html
• US Census 2010
http://www.census.gov/dataviz/visualizations/054/
Namevoyager
Martin
Wattenberg, 2000
Explore the
popularity of
your name over
the last century.
http://www.babynamewizard.com/voyager#
Limitations
• a lot of these examples only allow us
limited access/functionality:
• often we cannot use our own data,
• we cannot change the display beyond the
intended use. We would often like to
- change type
- change parameters
Many Eyes
• roots in social network sites: share data &
collectively analyze in form of visualizations
• developed by IBM (Martin Wattenberg,
Fernanda Viegas)
• available at
http://manyeyes.alphaworks.ibm.com/
manyeyes/
http://manyeyes.alphaworks.ibm.com/manyeyes/
Example Applications
• Treemap: http://manyeyes.alphaworks.ibm.com/
manyeyes/visualizations/fuel-economy-treemap
• Choropleth Map:
http://manyeyes.alphaworks.ibm.com/
manyeyes/visualizations/violent-crime-rateper-100000-pers
http://manyeyes.alphaworks.ibm.com/manyeyes/datasets/
california-crime-rates-1960-2008/versions/1
ManyEyes
!
• ‘make a graphic and talk about it’
• very social aspect, finger on the hub of
time, e.g. list of most popular displays:
http://www-958.ibm.com/software/data/
cognos/manyeyes/visualizations?sort=rating
GapMinder
• http://www.gapminder.org/downloads/
• one view, with an additional dimension for
multiple rendering (usually time)
Hans Rosling’s talk at TED 2006
Data Exploration
• John W. Tukey (1977): Exploratory Data Analysis • Objectives:
- investigation of data rather than confirmation
- generation of hypotheses
- checking of assumptions (of later inferential
techniques)
• Graphics at the heart of EDA
"The greatest value of a picture is when it forces
us to notice what we never expected to see."
John W. Tukey
Zoology of tasks
Botanist
Stamp collector
Photographer
Ref: Buja (1996)
The botanist
The botanist collects
specimens and looks up the
botanical guide.
Linking
information
Photographer
The photographer directs
their lens to the target and
then focuses the image.
Aspect ratio,
histogram bin size
Stamp Collector
A stamp collector
sorts, reorganizes
and groups similar
objects together.
Multiple views,
small multiples
Linked Charts
• Plots are linked, i.e. visual changes to one
plot are propagated to the others
• Charts become (marginal) views of
different aspects of data
• Selection & Highlighting help find
relationships in higher dimensions
!!! Warning !!!
Graphics created for interaction are not as pretty as
graphics made for presentation.
10
Presentation
●
r=0.68
8
●
●
6
●
●
●
●
●
●
●● ● ●
●● ● ● ●
●
●●
●
●
●
●
●
●
● ●● ●
●
● ● ●●
●
● ●
●●
●
●●
●
●
●
●●
●
●
●
●
●●●●
●●● ●
●
●
●
●● ●
●●
●● ●
●●●●
●
●
●
●
●●
●
●
●
●●
●
●
●
●●●
●●●●●●
●●● ●
●● ●
●
●
●
●
●
●●
●●●
●
●
●●
● ●
●
●●●
●
● ●● ●
●
● ●
●
●● ●
●
●
● ●●
●●
●●
●
●
●●
●
●
●
●
●
●
●●
●
●
●● ●
● ●● ●
●
●
●
●
●
●
●
●●
● ●
●
●●
●●
●
●
●● ●
● ●
●
●
●●
●
●●
●●
●
● ●
●
●
● ●●
●
●
●
2
4
●
0
Total Tip
●
●
0
10
20
30
Total Bill
40
50
Interactive
Linked Displays
• Software for Interactive Statistical Graphics
since late 1960s, early 1970s
• Video Library:
http://stat-graphics.org/movies/prim9.html
(Interactive Graphics Hardware)
• more modern software:
ggobi, mondrian, iplots, ...
Your turn:
The Unusual Episode
• Dataset contains a “story”
• We are going to use interactive tools to
figure out what happened
• Ask questions that can be answered with a
graphic
• Once you know (or suspect) the story
behind this data, collect graphical evidence
for your theory.
How do we Explore?
• See what we find ...
• ... compare to what we know
• Start with simple, low-dimensional
summaries, increase complexity step by step
1d Barcharts
!
1500
2000
1200
1500
500
!
600
1000
500
!
800
600
400
200
0
Sex
400
200
0
Female
1000
count
count
!
1000
count
count
1400
800
Male
0
Adult
Child
Age
0
I
II
Treatment
III
IV
died
Outcome
•
strange gender distribution (does not match 50-50 distribution
we’d expect for gender), i.e. not random •
too few children to be random selection (could check with US
Census)
•
treatment assignments not random, not designed experiment
(would expect margins to be closer together)
•
observation: 1/3 of people exposed died
survived
2d Associations
• Conclusions:
• Women & Children have higher survival
chances (preferential treatment?)
• Survival &Treatment are strongly
associated: with higher treatment number
survival rates decrease
• Women in all groups have higher
survival chances,
• All Children in treatment 1 & 2
survived, no children in
treatment 4
• Men in treatment 2 have very
low chances of survival
UNusual Episode
Stamp collector: Barcharts or spine plots of
different variables laid out on screen!
Photographer: Bar for a category is shifted in a
barchart, the view is re-focused!
Biologist: Plots are probed for more details on
counts/percentages in a bar. Plots are linked,
highlighting in one plot corresponds to
highlighting in other plots.
How does it work?
• The graphics window needs to listen to user
actions.
• The actions need to be related to the data.
How Linking Works
OBS
1
2
3
4
5
6
7
8
9
10
TOTBILL
16.99
10.34
21.01
23.68
24.59
25.29
8.77
32.83
15.04
14.78
TIP
1.01
1.66
3.5
3.31
3.61
4.71
2
1.17
1.96
3.24
SEX
F
M
M
M
F
M
M
M
M
M
SMOKER
no
no
no
yes
yes
no
no
yes
no
no
DAY
sun
thurs
sun
sun
sat
sat
sun
sat
sun
sun
TIME
dinner
lunch
dinner
dinner
dinner
dinner
dinner
dinner
dinner
dinner
SIZE
2
3
3
2
4
4
2
2
2
2
Download