Exemplar visualizations - how far can we take it?

We’ve seen how to make ‘quick and dirty’ plots for ourselves. Now we will give you a glimpse of just how far you can take your visualizations. For this section we are looking at both code complexity and fundamental elements of design.

The aim of this section is to give you a set of resources that you can use to find examples and inspiration for your own work, as well as starting to look at elements of design.

Here we will provide guidelines on design and visualization while highlighting key examples from the scientific community. The good news is that there is an avid visualization community online - check out the 30 day chart challenge or the datavisualization hashtag on LinkedIn as a starting point.

From the community

Cédric Scherer

Cédric Scherer’s Data Visualization Gallery

When looking through this gallery, note that while some plots are very complex, they are built from basic elements. Each visualization is carefully designed: colour palettes are interesting but not overwhelming. There is adequate spacing between plot space and titles, axes, and text. Paler text (grey instead of black) makes overall images gentler. Cédric is a master of design as well as code, and all these visualizations demonstrate careful thought and planning.

This image comes from Cédric Scherer, and shows the relationship between the number of US Views and the number of votes on IMDb (a site that hosts voting on tv/movie quality). It looks like US viewers are heavy contributors in the IMDb voting system!

Key things to note about this visualization:

  • Use of a lower alpha value is a functional way to represent density. In addition to the wider scatter plot, there’s a clear pattern of higher density which probably contributes heavily to the overall trend line.

  • The colour scheme is eye-catching but not abrasive. In design/art this is called a monocolour (a single colour with white or black to modify the colour) - it’s highly cohesive and will generally be considered aesthetically pleasing. Note how the text uses the same colour, and the bolded text is also a colour found on the plot itself. The plot is probably using theme_minimal().

  • There is a hierarchy of black, with the title in black, the sub-heading in dark grey, the text below the chart in two separate light greys. This draws the eye to the top and guides the eye downwards. The two axis labels break from this, but only slightly, so that they stand out subtly - you can see them but they don’t distract you.

  • Text on the plot: this is not too common in scientific journal articles, but is a useful tool for science communication to a wider audience.

Isaac Arrayo

Isaac Arrayo: towards data science

Isaac Arrayo gives us a breakdown of four plots from #tidytuesday (a community effort where people are invited to create visualizations of a provided dataset). We see four diverse plot types, the rationale for each plot, and how these plots might be applied to a more ‘standard’ dataset (i.e., an in-real-life example).

Resources and Showcase

A collection of resources - if you have any recommendations, reach out to me on LinkedIn or by opening an issue on github and I’ll add them here.

Galleries, books, workshops

from Data to Viz

I highly recommend from Data to Viz as a resource for thinking about your data and what type of chart might be appropriate.

from Data to Viz decision tree

First, it shows a decision tree for each of the different data types (numeric, categoric etc.,). Within the data types you can look at plots for different subcategories (single numeric data, two numeric variables etc.,) and there is a “story” article for each subcategory that covers an example and explanations.

from Data to Viz plot information

You can also click on a given plot type in the decision tree to open up a panel and view information about the plot type. Each plot also has a dedicated page that gives a full breakdown of the plot, explaining the required variables and some beautiful examples.

R for Data Science, 2E

The R for Data Science, 2E book (available free, online) is the go to resource for anyone learning the tidyverse, and it has a great section on ggplot2!

Summary

Elements of design, or the ability to create attention-capturing visuals, is not widely taught (in my experience) in the science sector, but there is a range of useful material and dialogue on visualization available to you. Remember that everyone will have their own personal preference, and it’s important to balance style with clarity. Simplicity is always going to be a powerful factor, and within a single document having a cohesive theme is key.