2016-12-12

Slides available at http://bit.ly/phd-seminar

This work is released under Creative Commons

Why interactive graphics?

  • Why interactive graphics for presentation?
  • Why interactive graphics for exploration?

Why interactive graphics on the web?

  • Portable (i.e., cross-platform)
  • Simple to share
  • Encourages composability (i.e., reports, dashboards, etc)
  • Enables integration of multiple systems (1 + 1 > 2)

The problem with web graphics for data analytics

  • Great for conveying information (viz is known), but impractical for exploration (viz is unknown).

  • The reality: analysts have to learn/juggle many technologies.
  • My goal: An R interface that makes 80% of techniques seamless, quick, and easy (w/o knowledge of web technology).
  • My contribution: Designed and implemented a linked brushing framework.

Implemented as an R package

A demo of the workflow

2016 Election Outcomes by County (Politico)

     County |   State | TotalVotes| Clinton| Johnson| Stein| Trump| Population|    Area
    --------| --------| ----------|--------|--------|------|------|-----------|--------
1   autauga | alabama |      24661|   0.240|   0.022| 0.004| 0.734|      54571|  594.44
2   baldwin | alabama |      94090|   0.196|   0.026| 0.005| 0.774|     182265| 1589.78
3   barbour | alabama |      10390|   0.467|   0.009| 0.002| 0.523|      27457|  884.88
4      bibb | alabama |       8748|   0.214|   0.014| 0.002| 0.770|      22915|  622.58
5    blount | alabama |      25384|   0.085|   0.013| 0.004| 0.899|      57322|  644.78
6   bullock | alabama |       4701|   0.751|   0.005| 0.002| 0.242|      10914|  622.81
7    butler | alabama |       8685|   0.428|   0.007| 0.001| 0.563|      20947|  776.83
8   calhoun | alabama |      47376|   0.279|   0.024| 0.006| 0.692|     118572|  605.87
9  chambers | alabama |      13778|   0.418|   0.012| 0.003| 0.566|      34215|  596.53
10 cherokee | alabama |      10503|   0.145|   0.014| 0.002| 0.839|      25989|  553.70
# ... with 3,101 more rows
  • Is there a relationship between population density and voting preference?

Choropleth map of voter turnout

Linking proportions with geography

Brushing to combat overplotting

Querying missing values

Querying seasons directly/indirectly

Brushing plus animation

Making comparisons

Making comparisons

Making comparisons

Linked Tree Brushing

The bigger picture

  • All examples could classify as focusing, arranging, and/or linking views.
  • Cook, Buja, & Swayne 1996: {focusing, arranging, linking} => {find Gestalt, pose queries, make comparisons}

Similar work

  • General purpose:
    • rCharts (Vaidyanathan et al. 2014), ggvis (Chang and Wickham 2016), rBokeh (Hafen et al. 2016), plotly (Sievert el al. 2016)
  • Domain specific:
    • leaflet (Cheng et al. 2016), dygraphs (Allaire et al. 2016), networkD3 (Gandrud et. al. 2016), DiagrammeR (Iannone et al. 2016), d3scatter (Cheng 2016)
  • Most approaches neglect/ignore linking views and animation.
    • ggvis - limited linking/animation (requires a shiny (Chang 2016) server).
    • animint (Hocking et al. 2016) limited linking/animation by extending ggplot2's grammar of graphics implementation (Wickham et al. 2017).

  • plotly (Sievert el al. 2016) borrows from and improves upon animint.
    • Makes ggplot2 graphics interactive.
    • Hooks into custom ggplot2 geoms.
      • E.g., ggmosaic (Jeppson et al. 2016), geomnet (Tyner et al. 2016), and ggalt (Rudis et al. 2016).
    • Special support for ggmatrix objects (from GGally (Schloerke et al. 2016)).
    • Better support for focusing (zoom/pan) and arranging views.
    • A "non-ggplot2" interface supports plots not supported by ggplot2 (e.g., 3D charts).
    • Supports more complex brushing interactions
      • Make selections via mouse hover, click, click & drag.
      • Dynamically modify brush color (making comparisons).

Future work

  • Keep adding documentation and examples in the plotly for R book.
  • Further advance plotly's support for linking views (without shiny).
  • Support for more popular ggplot2 extension packages such as ggrepel and ggraph.
    • Integrating plotly's support for linking tree-structures with ggraph would be particularly interesting.
  • Enable interactive arranging of views.

Thank you