Create animated choropleth map [ggplot2, animation]

For my anti-corruption report, let’s first of all demonstrate how severe corruption is in the world. I decided to let the picture say a thousand words. Instead of an interminable paragraph littered with cherry-picked facts, we now have a picture that 1) is pretty, and 2) allows readers to think for themselves, using our (human’s) superb capability of pattern recognition.


But wait — what if we want to visualize the change in pattern over time? Essentially, we just have to create the same map above for each year, and string them all together using the animation package in R.

Stupid does not allow embedded flash, so you will have to take a look at this dropbox link.

Below is the code used to produce the graphs. The corruption data come from World Governance Indicators (WGI), the map data from Here is a link to my cleaned WGI data (.RData — a lot of the grunt work is simply to match the WB country name system with that of the map.

I sincerely wish that all organizations could just go ahead and accomplish simple things like standardized country names before tackling world poverty.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: