R for the Rest of Us

R for the Rest of Us Podcast Episode #2: Nassos Stylianou and Clara Guibourg Discuss Making a Custom ggplot Theme for the BBC


Listen Later

In 2017, BBC data journalist Nassos Stylianou was working with a backend developer on a particularly large data set. Nassos was primarily an Excel user at the time, but this data was too large for Excel. Seeing the developer work through the data with ease, a light bulb went off for Stylianou: if he and his data journalism team learned to use R, they could do this type of analysis on their own.

This realization began a journey into R. This journey, which started with needing to analyze data too large for Excel to handle, would ultimately end up in a very different place. In 2018, Stylianou, his colleague Clara Guibourg, and their team created a custom ggplot theme to create plots that match the BBC style. The code in the bbplot package is a great example of the value of developing a custom theme. But the real story of the creation of bbplot is not just about technical tools. Through learning R and creating a custom theme for others to use, Nassos, Clara and their colleagues would change the culture, remove bottlenecks, and allow the BBC to be more creative with their data viz.

To understand how big these changes were, it’s helpful to understand what things looked like at the BBC before bbplot. In the mid-2010s, journalists at the BBC who wanted to make data visualization had two choices:

  1. They could use an internal tool. This tool could create data visualization, but only the predefined charts it had been designed to generate.

  2. They could use Excel to create mockups and then work with a graphic designer to finalize the charts. This approach led to better results, and was way more flexible, but required extensive back-and-forth with a designer. As Stylianou described it, working with a designer “is just a very time-consuming workflow if you think of how many visualizations the BBC does.”

Neither of these choices was ideal. And this limited set of less-than-ideal choices led to a limited output of data viz. 

That would all change when Stylianou, Guibourg, and their colleagues realized that R, the tool they had decided to learn for data analysis, could also do data visualization. As they began playing around with ggplot, they quickly saw its power. Guibourg said she found it “immediately addictive when I started working with ggplot to make charts.” No longer limited by the BBC’s inflexible internal tool, she found that ggplot was “completely flexible in a way that was just completely new to me.”

The biggest change, though, came from not having to work with a designer. Not because the designers were bad (they weren’t), but because ggplot allowed the BBC data journalists to explore different visualizations on their own. Working with a designer required the journalists to have a fully-formed idea that the designer could take and improve upon. Working in ggplot allowed BBC data journalists to explore different data viz ideas.

Clara Guibourg believes this freedom is what explains the addictive quality of ggplot. As she told me, “even before we got anywhere near having a production-ready chart, just trying things out, visualizing things for the first time” was completely captivating. Having learned the basics of ggplot, she saw that “you can make like the simplest chart with just a couple of lines of code.” Being able to explore different types of visualization on her own led Clara and others to produce more data viz than they had previously.

As the BBC data journalism team improved their ggplot skills, they realized that it might be possible produce for more than just exploratory data viz. They had learned to use R for data analysis and they were starting to use it for exploratory data visualization. Could they go all the way and create production-ready charts in R that could go straight onto the BBC website?

Stylianou, Guibourg, and their colleagues set about looking into what would be involved in creating production-ready charts from R. They realized that so much of this work involved small tweaks. What font should they use? Where should the legend go? Should axes have titles? Should charts have grid lines? These questions may seem small but they have a big impact. Having consistent answers to them is what enabled BBC designers to turn Excel mockups into high-quality data viz ready to go on the website. As the BBC data journalism team dug further into ggplot, they realized that they might be able to write code to make their data viz production-ready. They realized that, if making production-ready charts required asking question about fonts, legends, axes, and grid lines, ggplot had the answer. And the answer was to make a custom theme.

Learn More 

  • Read Chapter 3 of R Without Statistics, where this conversation is summarized
  • bbplot website
  • BBC Visual and Data Journalism cookbook for R graphics
  • Nassos's website and Twitter
  • Clara's website and Twitter 
...more
View all episodesView all episodes
Download on the App Store

R for the Rest of UsBy David Keyes


More shows like R for the Rest of Us

View all
The Naked Scientists Podcast by The Naked Scientists

The Naked Scientists Podcast

604 Listeners

More or Less: Behind the Stats by BBC Radio 4

More or Less: Behind the Stats

868 Listeners

Future Tense by ABC listen

Future Tense

72 Listeners

The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

285 Listeners

Data Skeptic by Kyle Polich

Data Skeptic

475 Listeners

Talk Python To Me by Michael Kennedy

Talk Python To Me

580 Listeners

Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

Super Data Science: ML & AI Podcast with Jon Krohn

295 Listeners

Python Bytes by Michael Kennedy and Brian Okken

Python Bytes

214 Listeners

Perpetual Chess Podcast by Ben Johnson

Perpetual Chess Podcast

601 Listeners

DataFramed by DataCamp

DataFramed

266 Listeners

Practical AI by Practical AI LLC

Practical AI

196 Listeners

The MapScaping Podcast - GIS, Geospatial, Remote Sensing, earth observation and digital geography by MapScaping

The MapScaping Podcast - GIS, Geospatial, Remote Sensing, earth observation and digital geography

112 Listeners

Learning Bayesian Statistics by Alexandre Andorra

Learning Bayesian Statistics

65 Listeners

Tech Won't Save Us by Paris Marx

Tech Won't Save Us

476 Listeners

R Weekly Highlights by Eric Nantz

R Weekly Highlights

5 Listeners