« An example of focusing the chart on a message | Main | Here are the cool graphics from the election »


Boots the Goat

I loved this chart too and set out to try to recreate it in R with ggplot. I ended up getting frustrated and giving up. Anyone else try to recreate or create something similar with more luck?


BtG: I don't think ggplot is the way to go to do this chart. You can do this in base R by constructing it piece by piece. The key function needed is rect.
You have to figure out how to code the data into appropriate vectors to draw each box and fill it in with the right colors.
Also, you have to figure out the plot axes so as to put the boxes in the appropriate places.
Then you use text to add the annotations, and line to add tickmarks.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment

Your Information

(Name is required. Email address will not be displayed with the comment.)


Link to Principal Analytics Prep

See our curriculum, instructors. Apply.
Marketing analytics and data visualization expert. Author and Speaker. Currently at Columbia. See my full bio.

Book Blog

Link to junkcharts

Graphics design by Amanda Lee

The Read

Good Books

Keep in Touch

follow me on Twitter