Interactive Graphics stat/engl 332

advertisement
Interactive Graphics
stat/engl 332
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
600
400
200
0
!
Sex
400
800
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