Background/Related work: standard R graphics are based on the pen and paper model, which makes animations and interactivity difficult to accomplish. Non-interactive animations can be accomplished with the animation package, and some interactions with non-animated plots can be done with the qtbase, qtpaint, and cranvas packages. Linked plots in the web are possible using SVGAnnotation or gridSVG, but using these to create such a visualization requires knowledge of Javascript. The svgmaps package defines interactivity (hrefs, tooltips) in R code using igeoms, and exports SVG plots using gridSVG. Vega can be used for describing plots in Javascript.
The animint package supports brushing by adding 2 new aesthetics to the grammar of graphics:
showSelected=variable means that only the subset of the data that corresponds to the selected value of variable will be shown.clickSelects=variable means that clicking a plot element will change the currently selected value of variable.
The basic idea is to start from a list of ggplots, then export all their data in CSV along with a plot.json metadata file, which is then read and plotted using D3. The result is several linked, interactive, animated plots which are viewable in a web browser:
| Title | Plots | Clickable plots | Variables shown | Animated? |
|---|---|---|---|---|
| Evolution simulator | 3 | 3 | 6 | yes |
| Breakpoints | 2 | 1 | 5 | no |
| Max margin interval regression | 4 | 2 | 9 | no |
Proposal: implement several improvements to the animint package, so that more of the features of ggplot2 are available in these plots. In its current form, a large part of the grammar is not available, so the GSOC student should implement one or several of the following:
Tests:
Mentors: Toby Dylan Hocking toby.hocking@inria.fr, Hadley Wickham h.wickham@gmail.com, backup Yihui Xie xie@yihui.name.