Site icon R-bloggers

NYT uses R to map the 1%

[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.

Last Saturday, the New York Times published a feature article on the wealthiest 1% of Americans. The on-line version of the article included interactive features like this interactive map showing where your household ranks in the country and in local regions. The print edition, however, included some different (and necessarily static) representations of US wealth data, such as this map of where the wealthiest 1% live:

(Image credit: New York Times, January 14 2002.)

Kevin Quealy, graphics editor at the New York Times, used R to help create this chart. The process began with an initial proof of concept, which used R's maptools package and required five lines of R code. 

The original plan was to use ArcMap to generate the chart, but ArcView lacks the flexibility of styling the output that R has. Later iterations added color and algorithmically moved the labels around for legibility, and some final tweaking outside of R led to the chart in the print edition.

Interestingly, the chart doesn't appear in the on-line edition of the NYT. I knew that some features like interactive charts, were online only, but I wasn't aware that the reverse was also true, and that special content was made only for the print edition. Quealy points out that this is a necessity:

This is a good example, I think, of using each medium to its best potential, meeting the design constraints of each. More and more, this means making totally separate versions of things – admittedly, it frequently takes twice the time and energy – but the mediums are just so different that works well in one just doesn’t work well in another. 

For the full story of how this lovely chart was created, check out Kevin Quealy's tubmlr linked below.

chartsnthings: Before, During and After: The Richest 1 Percent

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

R-bloggers.com 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.