New York Times columnist Charles Blow needed a chart to accompany his op-ed piece Lincoln, Liberty and Two Americas (about one-party control in state legislatures). So he turned to resident graphic editor Kevin Quealy, who found the source data and used R to create the chart below:
If you'd like to create similar charts yourself, Kevin provides a useful tutorial on his behind-the-scenes blog, chartsnthings. It's just a few lines of base graphics in R, beginning with line plots and then moving on to bar plots. The abline function is used to create the gridlines. You can also use the same technique to create "waffle charts" (the display technique often used by the NYT, where small blocks represent data elements). You can find the full tutorial at the link below.
chartsnthings: R tutorial: Simple charts
What is purpose of showing a R pLot and not its code? It looks like cheap show off!
Posted by: Kban | December 04, 2012 at 08:19
The code is shown on the chartsnthings.tumblr.com posts that are linked.
Posted by: JNFoo | December 06, 2012 at 13:18
Unfortunately the code in the tutorial does not get one to the graph at the top of this post, just an earlier and not quite as nice a graphic using the same data set.
I still give the NYT a thumbs up for posting what they did.
Posted by: larry | December 12, 2012 at 07:34
how is it possible to create a pie chart in a bubble plot?
Posted by: linda | June 18, 2013 at 02:09