Community of Practice Open Data Events
Alice Byers
Data Innovation Team, Scottish Government
13 March 2024
Reproducible Analytical Pipeline (RAP) developer
Background in statistics and data analysis
New to the Accessibility Champions Network
Examples of charts and common issues
Considerations for using colour
An introduction to the sgplot R package
An overview of available guidance for making charts accessible
But first, a quick question: What software do you use to produce charts?
Slido poll: What could be improved?
Cluttered; lots of grid lines, lots of colours, lots of data
Poor colour contrast with background and with other colours
Angled text not easy to read
Scottish Government Design System colour palettes for data visualisations
Example of palette for categorical data:
Colour name | Hex code | Example of colour |
---|---|---|
dark-blue | #002d54 | |
teal | #2b9c93 | |
purple | #6a2063 | |
orange | #e5682a |
Slido poll: What could be improved?
No way to link data lines to legend without colour
Meaningless axis label
No title, subtitle or source
However, it can also be:
a text description in the main body of the page
a table of the data presented in the chart
The life expectancy for both the United Kingdom and China have increased between 1952 and 2007. The United Kingdom has consistently had a higher life expectancy than China throughout this period.
Year | Life Expectancy | |
---|---|---|
China | United Kingdom | |
1952 | 44.0 | 69.2 |
1957 | 50.5 | 70.4 |
1962 | 44.5 | 70.8 |
1967 | 58.4 | 71.4 |
1972 | 63.1 | 72.0 |
An R package to apply a style and colour palettes to
ggplot2 charts
Applies Scottish Government Design System colour palettes and accessibility best practice
Package website with documentation, guidance and examples
Open project with code publicly available on GitHub
ggplot2
defaultssgplot
defaultsSupport for interactive chart packages
Functionality to produce maps
Viva Engage communities (internal only)