Saturday, March 25, 2017

Creating an animated world map of life expectancy changes from 1950 to 2100 in R

I've created this map after a couple of hours  procrastinating  testing the gganimate package in R, which makes it ridiculously simple to create this type animation in .gif or .mp4 format.

The map shows how the life expectancy of each country has changed from 1950 to 2015 and how it is expected to increase up to 2100. It looks better in full screen, but it's still a bit clunky.


I've also created a gist that shows how you can create this map yourself: