Tuesday 4 November 2014

Gapminder in one line


 Gapminder has received a lot of attention for its cool animated graphics. I downloaded their data and ran:

palette(adjustcolor(rainbow(23), 1, .6, .6, .6, 
      offset=c(0,0,0,-0.1)))

library(anim.plots)
gm <- anim.plot(lifex ~ GDP + year, data=gm_data, log="x", 
      cex=sqrt(pop)*0.0004, pch=19, col=region, xlab="GDP",
      ylab="Life expectancy", speed=5, subset=year>1900)
ani.options(interval=0.2)
anim.save(gm, file="gapminder.mp4", type="Video") 






Holograms and talking Hans Rosling will be included in the 2.0 release ;-)

No comments:

Post a Comment