<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="http://www.r-bloggers.com/data-journalism-with-r-at-fivethirtyeight/"></div></div><div><a data-url="http://www.r-bloggers.com/data-journalism-with-r-at-fivethirtyeight/" data-counturl="http://www.r-bloggers.com/data-journalism-with-r-at-fivethirtyeight/" data-count="horizontal" data-text="Data Journalism with R at FiveThirtyEight" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.revolutionanalytics.com/2016/07/data-journalism-with-r-at-538.html"> Revolutions</a></strong>, and kindly contributed to <a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p>Since it <a target="_blank" href="http://blog.revolutionanalytics.com/2014/03/fivethirtyeight-relaunches-as-a-data-journalism-site.html">expanded its focus</a> 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:</p>
<p><a target="_blank" href="http://fivethirtyeight.com/features/gun-deaths/"><img title="Gun deaths" alt="Gun deaths" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b7c8805f47970b-800wi" border="0"></a>\</p>
<p>Other than a few hold-outs working in Stata and Excel, the data journalism team at FiveThirtyEight uses the open-source <a target="_blank" href="https://mran.microsoft.com/documents/what-is-r/">R language</a> to perform the analysis. So that others can reproduce their results, the R code is usually published on GitHub (the <a target="_blank" href="https://github.com/fivethirtyeight/guns-data">R code for the gun deaths feature is here</a>). 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:</p>
<p><iframe height="281" allowfullscreen="" width="500" src="https://channel9.msdn.com/Events/useR-international-R-User-conference/useR2016/FiveThirtyEights-data-journalism-workflow-with-R/player"></iframe> </p>
<p>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) <a target="_blank" href="http://blog.revolutionanalytics.com/2012/10/style-your-r-charts-like-the-economist-tableau-or-xkcd.html">ggplot2 theme</a> to give their graphics the recognizable FiveThirtyEight style (sometimes with some touching up in Illustrator):</p>
<p><a target="_blank" href="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01bb0923c6ea970d-pi"><img title="528ggplot2" alt="528ggplot2" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01bb0923c6ea970d-800wi" border="0"></a></p>
<p>If you haven't seen them before, check out some of the reports Andrew mentions in his presentation, all facilitated by R: </p>
<ul>
<li><a target="_blank" href="http://fivethirtyeight.com/features/whats-the-most-common-name-in-america/">The most common name in America</a></li>
<li><a target="_blank" href="http://fivethirtyeight.com/features/the-dollar-and-cents-case-against-hollywoods-exclusion-of-women/">Movies that pass the Bechdel Test do better at the box office</a></li>
<li><a target="_blank" href="http://fivethirtyeight.com/features/the-rise-of-religiously-inspired-terrorism-in-france/">The Rise Of Terrorism Inspired By Religion In France</a></li>
<li><a target="_blank" href="http://fivethirtyeight.com/features/you-cant-trust-what-you-read-about-nutrition/">P-hacking nutrition studies</a></li>
<li><a target="_blank" href="http://fivethirtyeight.com/features/why-the-oldest-person-in-the-world-keeps-dying/">Why The Oldest Person In The World Keeps Dying</a> (featuring 538's custom ggplot2 theme)</li>
</ul>
</div>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="http://www.r-bloggers.com/data-journalism-with-r-at-fivethirtyeight/"></div></div><div><a data-url="http://www.r-bloggers.com/data-journalism-with-r-at-fivethirtyeight/" data-counturl="http://www.r-bloggers.com/data-journalism-with-r-at-fivethirtyeight/" data-count="vertical" data-text="Data Journalism with R at FiveThirtyEight" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://blog.revolutionanalytics.com/2016/07/data-journalism-with-r-at-538.html"> Revolutions</a></strong>.</div>
<hr>
<a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="http://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="http://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="http://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="http://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="http://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="http://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="http://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="http://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="http://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="http://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="http://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="http://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="http://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="http://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="http://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="http://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/WCyXepVIeyo"></a></div>