Animations can be a refreshing way to make a website more attractive, as we did exactly a year ago here.
Based on the Brownian motion simulated here, and using animation and ggplot2 R packages, we produced a fun welcome to the International year of Statistics, Statistics2013. The function saveMovie (please notice that there exists another alternative, saveGIF) allowed us to save it and finally publish it, as easy as that!
For this new year we have based our work on the demo(‘fireworks’) from the 2.0-0 version of the package animation (find here a list of the changes in each version) and world from the package maps (speaking of maps, have a look at this great dynamic map by Bob Rudis!).
They also come very handy when trying to represent visually a dynamic process, the evolution of a time-series,etc.
As an example, in a previous post we portrayed an optimisation model in which the values for the mean were asymptotically approaching the optimal solution, which was achieved after a few iterations. This was done with a for loop and again packages ggplot2 and animation.
There are many other examples of potential applications both in general Statistics – see this animated representation of the t distribution and these synchronised Markov chains and posterior distributions plots– and in Biostatistics. Some examples of the latter are this genetic drift simulation by Bogumił Kamiński and this animated plots facility in Bio7, the integrated environment for ecological modelling.
R package caTools also allows you to read and write images in gif format.
It is certainly one of our new year’s resolutions to incorporate more animations in our posts, what are yours?