|
1 |
| -animint - an R package for *anim*ated *int*eractive web graphics |
| 1 | +animint - DEPRECATED since July 2019 |
2 | 2 | =======
|
3 | 3 |
|
4 |
| -[](https://travis-ci.org/tdhock/animint) |
5 |
| -[](https://coveralls.io/r/tdhock/animint?branch=master) |
6 |
| -[](https://app.wercker.com/project/bykey/3e56e443fb24a5ce304b706425ba6987) |
7 |
| - |
8 |
| -Animint makes it possible to design multi-layer, multi-plot, |
9 |
| -interactive, and possibly animated data visualizations using just a |
10 |
| -few lines of R code. Animint adds clickSelects and showSelected |
11 |
| -aesthetics to [ggplot2](https://github.com/hadley/ggplot2), and |
12 |
| -renders using [D3](http://d3js.org/). For example, this multi-layer |
13 |
| -facetted interactive animation of WorldBank data was defined using |
14 |
| -only [about 60 lines of R code](inst/examples/WorldBank-facets.R). |
| 4 | +Please use [animint2](https://github.com/tdhock/animint2) instead. |
15 | 5 |
|
16 | 6 | [](http://cbio.ensmp.fr/~thocking/WorldBank-facets/)
|
17 |
| - |
18 |
| -## Installation |
19 |
| - |
20 |
| -```r |
21 |
| -if (!require(devtools)) install.packages("devtools") |
22 |
| -devtools::install_github("tdhock/animint", upgrade_dependencies=FALSE) |
23 |
| -library(animint) |
24 |
| -example(animint) |
25 |
| -``` |
26 |
| - |
27 |
| -NOTE: animint now works with standard ggplot2 >= 2.0 thanks to |
28 |
| -[Faizan](https://github.com/faizan-khan-iit) and |
29 |
| -[Kevin](https://github.com/kferris10)! If you want to use the animint |
30 |
| -[chunk\_vars |
31 |
| -option](https://github.com/tdhock/animint/wiki/Advanced-features-present-animint-but-not-in-ggplot2#use-chunk_varscvar1-var2-to-specify-how-much-data-to-load-at-a-time) |
32 |
| -then you will need to install |
33 |
| -[faizan-khan-iit/ggplot2@validate-params](https://github.com/hadley/ggplot2/pull/1649) |
34 |
| -until the ggplot2 developers [resolve the |
35 |
| -issue](https://github.com/hadley/ggplot2/issues/1694). |
36 |
| - |
37 |
| -## Learning animint through examples |
38 |
| - |
39 |
| -The best way to learn animint is by reading the [Animint Designer |
40 |
| -Manual](http://cbio.mines-paristech.fr/~thocking/animint-book/Ch00-preface.html). Some |
41 |
| -other good introductions are Carson Sievert's [Interactive animations |
42 |
| -of PITCHf/x](http://cpsievert.github.io/baseballR/20140818/) and Susan |
43 |
| -VanderPlas' [animint tutorial](http://tdhock.github.io/animint/). In |
44 |
| -addition, animint includes many example data visualizations in our |
45 |
| -extensive set of [test |
46 |
| -cases](https://github.com/tdhock/animint/tree/master/tests/testthat). |
47 |
| - |
48 |
| -## Frequently asked questions (FAQ) |
49 |
| - |
50 |
| -- Is there a list of new features in Animint, with respect to standard |
51 |
| - ggplot2? |
52 |
| - [Yes](https://github.com/tdhock/animint/wiki/Advanced-features-present-animint-but-not-in-ggplot2). |
53 |
| - |
54 |
| -- Can I do brushing in Animint? If by "brushing" you mean "multiple |
55 |
| - selection," then yes the designer can use the |
56 |
| - [selector.types](https://github.com/tdhock/animint/wiki/Advanced-features-present-animint-but-not-in-ggplot2#multiple-selection) |
57 |
| - option to declare a multiple selection variable, which means that |
58 |
| - users will be able to click plot elements to add/remove items from |
59 |
| - the multiple selection set. For example see the [WorldBank-facets |
60 |
| - viz](http://bl.ocks.org/tdhock/raw/217823c39eb1fc7c5dc9/) and |
61 |
| - [source code](inst/examples/WorldBank-facets.R). |
62 |
| - |
63 |
| -- Can I use animint inside of a Shiny app? |
64 |
| - [Yes](https://cpsievert.shinyapps.io/animintShiny/). |
65 |
| - |
66 |
| -- Can I use animint inside of knitr? [Yes, but use `structure(viz, |
67 |
| - class="animint")` rather than |
68 |
| - `animint2dir(viz)`](http://cpsievert.github.io/animint/worldPop/worldPop.html) |
69 |
| - |
70 |
| -- Can I use animint inside of an interactive Rmarkdown document? |
71 |
| - [Yes](https://cpsievert.shinyapps.io/animintRmarkdown/) |
72 |
| - ([source](https://github.com/tdhock/animint/tree/master/inst/examples/rmarkdown)). |
73 |
| - |
74 |
| - |
75 |
| -## Contribute to animint! |
76 |
| - |
77 |
| -#### Write tests to increase code coverage |
78 |
| - |
79 |
| -The easiest way to contribute to animint is by writing a new test that would increase the code coverage. First [check the coveralls status page and find a part of the code which is not tested](https://coveralls.io/github/tdhock/animint). Then fork animint and commit [a new test](https://github.com/tdhock/animint/tree/master/tests/testthat) that increases the coverage, and send us a Pull Request. It may be useful to read about [our testing framework](https://github.com/tdhock/animint/wiki/Testing). |
80 |
| - |
81 |
| -#### Learn about the design and theory of animint |
82 |
| - |
83 |
| -Before adding features to animint, you should first read about its design. There are two main components, which have separate wiki pages that explain their details: |
84 |
| -- The [compiler](https://github.com/tdhock/animint/wiki/Compiler%20details) is written in R code. |
85 |
| -- The [renderer](https://github.com/tdhock/animint/wiki/Renderer-details) is written in JavaScript code. |
86 |
| - |
87 |
| -It would also be useful to read some theory in the |
88 |
| -[academic paper describing |
89 |
| -Animint](https://github.com/tdhock/animint-paper/blob/master/HOCKING-animint.pdf?raw=true). It explains: |
90 |
| - |
91 |
| -- the purpose of animint: make it easy to design data visualizations |
92 |
| -which can be both animated and interactive. |
93 |
| - |
94 |
| -- the clickSelects and showSelected keywords which permit |
95 |
| -interactive linked plots. |
96 |
| - |
97 |
| -- the advantages and disadvantages of animint compared to other |
98 |
| -interactive data viz libraries. |
99 |
| - |
100 |
| -It may also be useful to read our [short](https://github.com/tdhock/interactive-tutorial/tree/master/animation) and [long](https://github.com/tdhock/animint/blob/master/inst/etc/references.org) tables of related work. |
101 |
| - |
102 |
| -#### TODO list of features to implement |
103 |
| - |
104 |
| -We keep a TODO list at top of the [NEWS](https://github.com/tdhock/animint/blob/master/NEWS) file. Feel free to implement one and send us a PR. They are categorized as follows: |
105 |
| - |
106 |
| -- BUG: things which used to work but have stopped working. Tests should be added to prevent these. For example at one point in 2013, animint rendered the correct number of legend entries for the WorldBank viz, but in the beginning of 2014 animint rendered too many legend entries. |
107 |
| -- GGPLOT: things which ggplot2 supports but animint does not yet support. For example facets, coord_equal. |
108 |
| -- DSL: changes to the animint domain-specific language (DSL) which would allow interactive/animated features. These involve changes to how we define the ggplots, and how the compiler works. For example custom alpha/color/etc for selected geoms, using selected.alpha/selected.color/etc aesthetics. |
109 |
| -- EXAMPLE: examples to show off animint features, which should affect neither the compiler nor renderer. |
110 |
| -- RENDER: changes to the JavaScript rendering code which would result in better interactive plots, without having to change the definition of the ggplots. For example rendering a selection widget for every selection variable. |
111 |
| -- OUTPUT: different output formats for viewing/sharing an interactive animation. |
112 |
| -- OPTIMIZATION: things which are currently supported, but with an implementation that could be improved in terms of render/compile speed, disk usage, memory, etc. Typically these optimizations are not really noticed for small data sets, but make it easier to visualize large data sets. For example, can we gzip the TSV plot data files to reduce disk space and download times? |
0 commit comments