介绍一个主要用于绘制动画的ggplot2的扩展包---gganimate包。 Hans Rosling的关于“New Insights on Poverty”的TED演讲绝对是对我影响最大的几个TED之一,原来数据可以这样展示,,,可视化可以这样炫,,,故事可以这样讲... 下面尝试使用 gganimate 包和 gapminder 数据集,实现类似可视化过程。加载R包,数据#R包安装install.packages("devtools")library(devtools) install_github("thomasp85/gganimate")install.packages("gapminder")#加载library(gganimate)library(gapminder)#查看数据head(gapminder)# A tibble: 6 x 6 country continent year lifeExp pop gdpPercap fct> fct> int> dbl> int> dbl>1 Afghanistan Asia 1952 28.8 8425333 779.2 Afghanistan Asia 1957 30.3 9240934 821.3 Afghanistan Asia 1962 32.0
………………………………