Slide 1

Slide 1 text

Henry Partridge GM Analyst Network Data Visualisation: Principles and practice Data Lab Manager 17 May 2018

Slide 2

Slide 2 text

Trafford Data Lab https://www.trafforddatalab.io/

Slide 3

Slide 3 text

• Clarity • Openness • Reproducibility Principles

Slide 4

Slide 4 text

Clarity

Slide 5

Slide 5 text

We strive for an economy of style in all of our data visualisations.

Slide 6

Slide 6 text

“Chart time! It's first Q shipping it garnered 19% market share, Palm 9.8%, RIM 39%, other 20%, Nokia 7% …" Macworld 2008 keynote Source: Macworld 2008 keynote; www.engadget.com

Slide 7

Slide 7 text

Cleveland’s perceptual hierarchy 1 Position along a common scale Scatter plots 2 Positions along non-aligned, identical scales Small multiples 3 Length, direction, angle Waterfall chart 4 Area Treemap 5 Volume, curvature 3D bar charts 6 Shading, colour saturation Continuous color scale Source: Cleveland and McGill (1984) Accuracy

Slide 8

Slide 8 text

Pie chart vs bar chart Source: Cleveland and McGill (1984: 533)

Slide 9

Slide 9 text

“A table is nearly always better than a dumb pie chart; the only worse design than a pie chart is several of them, for then the viewer is asked to compare quantities located in spatial disarray both within and between charts […] Given their low density and failure to order numbers along a visual dimension, pie charts should never be used.” — Edward Tufte (1983)

Slide 10

Slide 10 text

Tufte’s aesthetic guidelines

Slide 11

Slide 11 text

Tufte’s aesthetic guidelines

Slide 12

Slide 12 text

Wilkinson’s Grammar of Graphics Source: Wilkinson (2005) "A statistical graphic is a mapping from data to aesthetic attributes (colour, shape, size) of geometric objects (points, lines, bars)." — Hadley Wickham (2016)

Slide 13

Slide 13 text

Rosling’s bubble charts Source: gapminder.org Variable Geometry Aesthetic GDP per capita ($) point x-position Life Expectancy point y-position Population point size Continent point fill

Slide 14

Slide 14 text

Rosling’s bubble charts in ggplot2 Source: gapminder.org

Slide 15

Slide 15 text

Lab visualisation style https://traffordDataLab.io/assets/theme/ggplot2/theme_lab.R

Slide 16

Slide 16 text

Lab visualisation style https://www.trafforddatalab.io/info/community_safety/burglary/index

Slide 17

Slide 17 text

Openness

Slide 18

Slide 18 text

We are committed to the sourcing, preparation and publication of open data.

Slide 19

Slide 19 text

5-star Open Data Source: http://5stardata.info/en/

Slide 20

Slide 20 text

Defibrillators Source: https://www.trafforddatalab.io/maps/explore/

Slide 21

Slide 21 text

Open data portal Source: https://www.trafforddatalab.io/data

Slide 22

Slide 22 text

Reproducibility

Slide 23

Slide 23 text

We will publish the data and code that drive our data visualisations.

Slide 24

Slide 24 text

Example visualisation https://www.trafforddatalab.io/info/demographics/languages/R/fig1.R

Slide 25

Slide 25 text

Data Source: https://www.trafforddatalab.io/info/demographics/languages

Slide 26

Slide 26 text

Image Source: https://www.trafforddatalab.io/info/demographics/languages

Slide 27

Slide 27 text

R code Source: https://www.trafforddatalab.io/info/demographics/languages

Slide 28

Slide 28 text

R and (RStudio)

Slide 29

Slide 29 text

• Re-run code or adapt with different data • R is a language so it is readable as text • Post R code via Twitter, reddit, email etc Reproducibility in R

Slide 30

Slide 30 text

Graphics companion Source: https://www.trafforddatalab.io/graphics_companion/

Slide 31

Slide 31 text

Git and GitHub Source: https://github.com/logos

Slide 32

Slide 32 text

Git and GitHub Source: https://github.com/trafforddatalab

Slide 33

Slide 33 text

Thank you! @trafforddatalab