I wanted to try the new favourite dataviz in town - the dynamic (race) barchart, so I decided to focus on the one question that matters most, namely the football performance of the countries of the world over time. World Football Elo Ratings has data since 1910 and provides Elo ratings for each country for the end of each year since. Elo ratings are nice because they are comparable over time, at least more so than other rankings.
The result of the visualizations is not as smooth as I expected, primarily because countries change ranks too often, so there is too much jumping in the charts rather than the neck-to-neck race with occasional overtaking dynamic that characterizes the best examples of this dataviz type. Also, I based the colors of the bars on the official colors of the countries' football federations (well, on the way Google Search represents them in its results), which makes for a rather dull color scheme. But there is still a lot to see in the charts, and if you care about the history of football, there are interesting insights to be gained from watching the animations.
I did all the charts in R
, using the gganimate
library. I had to use PhantomJS
from within R
in order to scrape the data from World Football Elo Ratings. The code for the data collection and the graphs is here.
This is a version that fixes the bars' positions and focuses on the ten most successful countries for the period since 1952.