In the animation package a function Rosling.bubbles() used to mimic Hans Rosling’s talk using bubbles animation. In Hans Rosling’s attractive talk “Debunking third-world myths with the best stats you’ve ever seen”, he used a lot of bubble plots to illustrate trends behind the data over time. This function gives an imitation of those moving bubbles, besides, as this function is based on symbols, we can also make use of other symbols such as squares, rectangles, thermometers, etc. But, the bubble symbol is the better one to illustrate than other symbols, bubble graphs can give a quick comparison of values for your data.

Here is a beautiful demo made by ‘严酷的魔王’ using animation package.

library(animation)
ani.options(interval = 0.2)
par(mar = c(4, 4, 0.2, 0.2))
# with 'years' as the background
Rosling.bubbles(text = 1951:2000)

Reference

-Hans Rosling: The best stats you’ve ever seen



Published

08 May 2013

Tags