The software behind this clickbait data visualization will blow your mind

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

New media sites like Buzzfeed and Upworthy have mastered the art of “clickbait”: headlines and content designed to drive as much traffic as possible to their sites. One technique is to use coy headlines like “If you take a puppy video break today, make sure this is the dog video you watch.” (Gawker apparently spends longer writing a headline than the actual article.) But the big stock-in-trade is “listicles”: articles that are, well, just lists of things. (Exactly half of Buzzfeed's top 20 posts of this week are listicles, including “32 Paintings Paired With Quotes From 'Mean Girls'”.)

If your goal is to maximize virality, how long should a listicle be? Max Woolf, an R user and Bay Area Software QA Engineer, set out to answer that question with data. Buzzfeed reports the number of Facebook shares for each of its articles, so he scraped BuzzFeed’s website and counted the number of items in 15,656 listicles. He then used R's ggplot2 package to plot number of Facebook shares versus number of listicle items, and added a smooth line to show the relationship:


So it looks like if you want your listicle to go viral, aim for 15 or more items.

For R programmers, Max also shares a collection of useful tips for creating graphics like the above using ggplot2. His tutorial provides a step-by-step guide to making basic histograms and scatterplots, and then adding titles and annotations and choosing attractive color schemes to make your chart publication-ready. If you're an R user but haven't yet made the dive into ggplot2, the tutorial linked below is a good place to start.

Max Woolf: An Introduction on How to Make Beautiful Charts With R and ggplot2

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)