Data Journalism with R at FiveThirtyEight

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Since it expanded its focus from predicting the US election, FiveThirtyEight has emerged as a prominent source of in-depth data journalism, with data-driven analysis of media, culture, politics and society. A recent feature combined CDC and independent data sources to break down the nearly 34,000 gun deaths in the US in 2014 by cause of death and the gender, age and race of the victim:

Gun deaths\

Other than a few hold-outs working in Stata and Excel, the data journalism team at FiveThirtyEight uses the open-source R language to perform the analysis. So that others can reproduce their results, the R code is usually published on GitHub (the R code for the gun deaths feature is here). In fact, R forms a key component of the data science workflow at FiveThirtyEight, as described in this presentation by quantiative editor Andrew Flowers at the useR!2016 conference:


Andrew mentioned in the presentation that one of the many reasons why they use R is because of the flexibility of its graphics system, which allows them to produce attractive yet complex charts on deadline. In fact, they use a custom (unreleased) ggplot2 theme to give their graphics the recognizable FiveThirtyEight style (sometimes with some touching up in Illustrator):


If you haven't seen them before, check out some of the reports Andrew mentions in his presentation, all facilitated by R: 

To leave a comment for the author, please follow the link and comment on their blog: Revolutions. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)