Code Monkey home page Code Monkey logo

animint's Introduction

animint

Interactive animations using ggplot2's grammar of graphics implementation combined with clickSelects and showSelected aesthetics.

Installation

if (!require(devtools)) install.packages("devtools")
devtools::install_github(c("tdhock/ggplot2", "tdhock/animint"), build_vignettes=FALSE)
library(animint)
example(animint)

NOTE: There is a pull request to merge tdhock/ggplot2 with the main ggplot2 repo. This fork is required in order to use theme_animint.

Examples

The best way to learn animint is through examples. The animint tutorial has the most complete collection of examples with explanations. In addition, there is an examples web site, examples distributed with animint, as well as more complex 'big data' examples in the tdhock/animint-examples repo.

Animint paper

Susan VanderPlas and Toby Dylan Hocking wrote an 8-page conference paper in March 2014. If you would like to contribute code to animint, please read the paper first to get an overview of the package. It explains:

  • the purpose of animint: make it easy to design interactive animations.
  • the clickSelects and showSelected keywords which permit interactivity.
  • the design of the animint package.
  • the advantages and disadvantages of animint compared to other interactive data viz libraries.

Related work

We have compiled short and long tables of related work.

Contribute to animint!

Get acquainted

Before contributing to animint, you should first read about its design. There are two main components, which have separate wiki pages that explain their details:

  • The compiler is written in R code.
  • The renderer is written in JavaScript code.

TODO items

We keep a TODO list at top of the NEWS file. They are categorized as follows:

  • 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.
  • GGPLOT: things which ggplot2 supports but animint does not yet support. For example facets, coord_equal.
  • 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.
  • EXAMPLE: examples to show off animint features, which should affect neither the compiler nor renderer. For example the pirates data set.
  • 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.
  • OUTPUT: different output formats for viewing/sharing an interactive animation.
  • 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?

Submitting contributions

We welcome pull requests, but please R CMD check your changes:

devtools::check('path/to/animint')

You may ignore (or fix :) the various WARNINGS/NOTES, but make sure there are no errors and the tests run smoothly before submitting.

animint's People

Contributors

cpsievert avatar srvanderplas avatar tdhock avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.