How to create Visual Motion Picture with gganimate in R language
Most people do not understand the knowledge points of this "R language how to use gganimate to create visual dynamic map" article, so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "R language how to use gganimate to create visual dynamic map" article.
Load R packet Data # R package installs install.packages ("devtools") library (devtools) install_github ("thomasp85/gganimate") install.packages ("gapminder") # loads library (gganimate) library (gapminder) # View data head (gapminder) # A tibble: 6 x 6 country continent year lifeExp pop gdpPercap 1 Afghanistan Asia 1952 28.8 8425333 779.2 Afghanistan Asia 1957 30.3 9240934 821. 3 Afghanistan Asia 1962 32.0 10267083 853.4 Afghanistan Asia 1967 34.0 11537966 836.5 Afghanistan Asia 1972 36.1 13079460 740.6 Afghanistan Asia 1977 38.4 14880372 786.
The data set includes data on per capita GDP growth, life expectancy and population growth in major countries around the world from 1952 to 2007.
Ggplot2 drawing
Draw with ggplot2
Theme_set (theme_bw ()) p