- Key tool for visual analytics
- Much more efficient than static graphics
Examples:
- Navigation (panning, rotation, zooming)
- Selection (highlighting)
- Connecting (linked views)
- Filtering (sample)
- Reconfiguring (change aesthetics)
- …
Examples:
Navigation operator:
Australian crabs
Australian crabs
Screen space:
Data value space
Data structure space
Different data structures exist: matrix, list, graph,…
Navigation operator: how navigate the view in the long tree?
Selection operator: node in the tree is selected -> subbranches must be selected
Filtering operator: Social network: click on node - nodes that are X links away disappear
Abstraction/Elaboration: histogram with zooming - recompute bars?
Working with aesthetics
Navigation: change range of aesthetics to certain interval (show certain range of colors)
Encoding operator: change shapes of symbols, non-linear color mapping
Selection: highlight certain ranges of aesthetics (highlight stars)
Without Shiny: key ingridients
d<-SharedData$new(data, key, group)
Without Shiny: key ingridients
highlight
-function:
d <- SharedData$new(crabs) scatterCrab <- plot_ly(d, x = ~CL, y = ~RW) %>% add_markers(color = I("black")) barCrab <-plot_ly(d, x=~sex)%>%add_histogram()%>%layout(barmode="overlay") subplot(scatterCrab,barCrab)%>% highlight(on="plotly_selected", dynamic=T, persistent = T, opacityDim = I(1))%>% hide_legend()
plotly_data(barCrab)
## # A tibble: 200 × 9 ## species sex index FL RW CL CW BD .crossTalkKey ## <chr> <chr> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <chr> ## 1 Blue Male 1 8.1 6.7 16.1 19 7 1 ## 2 Blue Male 2 8.8 7.7 18.1 20.8 7.4 2 ## 3 Blue Male 3 9.2 7.8 19 22.4 7.7 3 ## 4 Blue Male 4 9.6 7.9 20.1 23.1 8.2 4 ## 5 Blue Male 5 9.8 8 20.3 23 8.2 5 ## 6 Blue Male 6 10.8 9 23 26.5 9.8 6 ## 7 Blue Male 7 11.1 9.9 23.8 27.1 9.8 7 ## 8 Blue Male 8 11.6 9.1 24.5 28.4 10.4 8 ## 9 Blue Male 9 11.8 9.6 24.2 27.8 9.7 9 ## 10 Blue Male 10 11.8 10.5 25.2 29.3 10.3 10 ## # ℹ 190 more rows
m <- SharedData$new(mpg) p1 <- ggplot(m, aes(displ, fill = class)) + geom_density() p2 <- ggplot(m, aes(displ, hwy, fill = class)) + geom_point() subplot(p1, p2) %>% highlight("plotly_click") %>% hide_legend()
Applications:
Analysis:
line | text |
---|---|
1 | Visualization is very cool. |
2 | I like it. |
line | word |
---|---|
1 | visualization |
1 | is |
1 | very |
1 | cool |
2 | i |
2 | like |
2 | it |
-Data in tidy format can be analysed by dplyr, tidyr, ggplot2, plotly
-n-grams: tokens of consecutive n words:
word |
---|
visualization is very |
is very cool |
very cool i |
Issues:
\[ TFIDF(w)=Tf(w) \cdot log(N/df(w)) \]
## # A tibble: 2,477 × 2 ## word value ## <chr> <dbl> ## 1 breathtaking 5 ## 2 hurrah 5 ## 3 outstanding 5 ## 4 superb 5 ## 5 thrilled 5 ## 6 amazing 4 ## 7 awesome 4 ## 8 brilliant 4 ## 9 ecstatic 4 ## 10 euphoric 4 ## # ℹ 2,467 more rows
https://www.jasondavies.com/wordtree/
Graph that analyses tri-grams (n=3)
Understanding of context without reading
Analysis:
https://hrbrmstr.github.io/streamgraph/
Chapters 10,11
Plotly book, ch. 4
Text Mining with R book, ch 2.1, 2.2, 2.5, 3.1, 3.3, 4.1.1, 4.1.4
Van Ham, F., Wattenberg, M., & Vi?gas, F. B. (2009). Mapping text with phrase nets. IEEE transactions on visualization and computer graphics, 15(6).
Wattenberg, M., & Vi?gas, F. B. (2008). The word tree, an interactive visual concordance. IEEE Transactions on Visualization & Computer Graphics, (6), 1221-1228.