RSS International Conference 2023
Harrogate, UK
In this session we will cover… what the guide is, and how it came about, what’s in the guide, and how you can contribute to the guide.
We also want to hear from you about what sort of content you’d like to see added to the guide.
A survey in 2021 asked RSS members their views on Significance magazine.
Respondents were asked, “What aspects of content could be improved?”
We put out a call:
“RSS publications seek data visualisation expert to develop best practice guidance”
The guide would:
It would also provide basic information on figure sizes, fonts, colours, resolution, etc., used in RSS publications.
Andreas and Nicola answered the call. We started work in February this year, and six months later…
Visualisations are found everywhere.
They are the key medium for transporting a message.
Some are better than others.
There are largely no standards.
Gauge the sizes, determine the largest piece
The number of pixels per pie depends on its position
Sorting the bars by height is easy
… and arguably even easier with horizontal layout
A single pixel carries the same information as a large bar
Faint gridlines help reading off values precisely
There are options in designing a visualisation!
Data visualisations must serve a purpose.
Frequent aim: comparison.
Ask yourself:
Note the defaults: the boxplot function in R has 27 of them.
Line types: map style elements to order
If data points overlay (which they generally do)
If data points overlay perfectly (example: integer data)
Shades of gray
Edward Tufte (2001), p. 154
Should be intuitive:
Ideal case: Single look at the legend to memorize the mapping
Not intuitive: triangles, circles, squares -> repeated looks
(unless the order - number of vertices - carries a meaning)
Name | Age | Weight |
---|---|---|
Alex | 55 | 123.45 |
Sandy | 33 | 77.07 |
Name | Alex | Sandy |
---|---|---|
Age | 55 | 33 |
Weight | 123.45 | 77.07 |
Generally helpful:
Name | Age | Weight |
---|---|---|
Alex | 55 | 123.45 |
Sandy | 33 | 77.07 |
Name | Alex | Sandy |
---|---|---|
Age | 55.00 | 33.00 |
Weight | 123.45 | 77.07 |
Variable | Mean (%CV) |
---|---|
Age | 55 (9) |
Weight | 88 (25) |
Variable | Mean | %CV |
---|---|---|
Age | 55 | 9 |
Weight | 88 | 25 |
Why use colours in data visualisation?
Colours can highlight or emphasise parts of your data.
Not always the most effective for e.g. communicating differences between variables.
Different types of colourblindness
Monochrome printing
Ink usage
Add clarification or detail
Highlight an interesting data point
Labelling data points (sometimes!)
Font size: larger fonts are (usually) better
Font colour: ensure sufficient contrast
Font face: highlight text using bold font, avoid italics
Font family: choose a clear font with distinguishable features
Arial: Does it pass the 1Il test?
Times New Roman: Does it pass the 1Il test?
Courier New: Does it pass the 1Il test?
Alt text (AKA alternative text) is text that describes the visual aspects and purpose of an image – including charts.
Though alt text has various uses, its primary purpose is to aid visually impaired users in interpreting images when the alt text is read aloud by screen readers.
Source: medium.com/nightingale/writing-alt-text-for-data-visualization (Amy Cesal)
Following data visualisation guidelines
Consistent font and colour choices
Easy to implement!
Colour palettes
Base R helper functions
{ggplot2} helper functions
Install from CRAN:
Installing from GitHub (development version):
Examples using Significance colours
The guide also has examples of charts with:
Julia: datavisguide/docs/tools.html#julia (community contribution)
Python: datavisguide/docs/tools.html#python
Use something else?
Quarto is an open-source scientific and technical publishing system that allows you to combine text, images, code, plots, and tables in a fully-reproducible document.
Quarto has support for multiple languages including R, Python, Julia, and Observable. It works for a range of output formats such as PDFs, HTML documents, websites, presentations,…
The source code for the guide is stored on GitHub.
If you want to contribute to the guide, the easiest way is via GitHub.
Create or add to a GitHub discussion
Create an issue and describe:
what the bug or error is, and add the issue tag bug
what feature you want to include, and add the issue tag enhancement
Then make your changes and commit them…
Open a pull request, describe what changes it contains, reference any issues it describes, and wait for review.
Ask us!
RSS Conference session: GitHub: Version control for research, teaching and industry, Thu 7th @ 11:40
royal-statistical-society.github.io/datavisguide
github.com/royal-statistical-society/datavisguide