Data Visualisation
Preface
Acknowledgements
1
Design and Integrity
1.1
Summary
1.1.1
Learning Objectives
1.1.2
Chapter Video
1.2
Defining Data Visualisation
1.3
Data Types - A Quick Revision
1.4
Plot Anatomy
1.5
A Visual Design Process
1.5.1
Guiding Principles
1.5.2
Identifying a targeted audience and a data visualisation design objective
1.5.3
Focusing, justifying and choosing methods
1.5.4
Construction and evaluation
1.6
Trifecta Check-up
1.6.1
(Q) What is the question?
1.6.2
(D) What does the data say?
1.6.3
(V) What does the visual say?
1.6.4
Failing the Trifecta
1.6.5
Critiques
1.7
Publication Ready Data Visualisations
1.7.1
Text
1.7.2
Arrangement
1.7.3
Colour
1.7.4
Lines
1.7.5
Overall
1.8
Ethical Principles
1.8.1
Beneficence
1.8.2
Transparency
1.8.3
Accuracy
1.8.4
Objectivity
1.8.5
Respect
1.8.6
Accountability
1.9
Data Integrity
1.9.1
Permission
1.9.2
Security
1.9.3
Consent
1.9.4
Privacy and Sensitive Information
1.9.5
Data Quality
1.9.6
Citing a Data Source
1.10
Concluding Thoughts
2
Storytelling with Data
2.1
Summary
2.1.1
Learning Objectives
2.1.2
Chapter Video
2.2
The Power of Storytelling
2.3
Storytelling and Data Visualisation
2.4
Case Study
2.5
Well Known Data Visualisation Storytelling Sites
2.6
Storytelling Strategies
2.6.1
Genre
2.6.2
Approach
2.6.3
Design Strategies
2.7
Storytelling Structure
2.7.1
Set-up
2.7.2
Supporting Facts
2.7.3
Main Insight
2.7.4
The Solution
2.8
Concluding Thoughts
3
Visual Perception and Colour
3.1
Summary
3.1.1
Learning Objectives
3.2
Visual Complexity
3.3
Our Visual Information Processing System
3.4
Important Visual Laws
3.4.1
Preattentive Processing
3.4.2
Gestalt Laws
3.4.3
Change and Inattentional Blindness
3.5
Visual Variables
3.6
Visual Comparison Accuracy
3.7
Colour
3.8
Colour Models
3.9
Colour Scales and Data Types
3.10
ColorBrewer
3.11
Colour Blindness
3.12
Colour Associations
3.13
Responsible Use of Colour
3.13.1
Use colour with purpose
3.13.2
Use colour to differentiate important features
3.13.3
Ensure colour constancy
3.13.4
Ensure adequate contrast
3.13.5
Define objects with equiluminous colour using thin borders
3.13.6
Avoid highly saturated colours
3.13.7
Reserve bright colours to highlight important information
3.13.8
Saturated colours can be used for small data points
3.13.9
Use colour scales to encode important information
3.13.10
Non-data elements should not compete with the data
3.13.11
Try to avoid colour scales that use red and green.
3.13.12
Avoid visual effects.
3.14
Concluding Thoughts
4
Avoiding Deception
4.1
Summary
4.1.1
Learning Objectives
4.2
Pies and Doughnuts
4.3
Truncated Axis
4.4
Area and Size as Quantity
4.5
Aspect Ratio
4.6
Ignoring Convention
4.7
Dual Axes
4.8
Other Poor Scaling Methods
4.9
Visual Bombardment
4.10
Concluding Thoughts
5
Grammar and Vocabulary
5.1
Summary
5.1.1
Learning Objectives
5.2
R & RStudio
5.3
ggplot2
5.4
Installing
ggplot2
5.5
A Layered Grammar of Graphics
5.5.1
Data
5.5.2
Layers
5.5.3
Data
5.5.4
Aesthetic Mapping
5.5.5
Geoms
5.5.6
Stats
5.5.7
Scales
5.5.8
Position Adjustment
5.5.9
Coord
5.5.10
Facet
5.6
A Verbose Example
5.7
Cars Data
5.8
qplot - Quick Plots
5.9
ggplot - A Layered Approach
5.10
Diamonds Data
5.11
Basic Colour in R and ggplot2
5.11.1
R Colour Names
5.11.2
colourpicker
5.11.3
Colour Scales in ggplot2
5.11.4
colourblindr
5.12
Visualising One and Two Variables
5.13
Qualitative Data
5.14
Qualitative Univariate Visualisations
5.14.1
Bar Charts
5.14.2
Check Your Scales
5.14.3
Dot Plot
5.14.4
Pie Charts
5.14.5
Coxcomb Diagram (Polar Area Diagram)
5.15
Quantitative Variables
5.15.1
YouTube Data
5.15.2
Histograms
5.15.3
Boxplot
5.15.4
Density Plot
5.15.5
Overlaying Univariate Plots
5.15.6
Adding Markers and Annotations
5.15.7
Violin Plot
5.15.8
Stacked Dot Plots
5.16
Juxtaposing
5.17
Two Qualitative Variables
5.17.1
Colour Data
5.17.2
Bar Chart
5.17.3
Mosaic Plots
5.18
Two Quantitative Variables
5.18.1
Body Data
5.18.2
Scatter Plots
5.18.3
Economics Data
5.18.4
Time Series Plots (Line plots)
5.18.5
One Quantitative and One Qualitative Variable
5.18.6
Side-by-side Box Plots
5.18.7
Side-by-side Variations
5.18.8
Visualising Uncertainty
5.19
Concluding Thoughts
6
Multivariate Strategies
6.1
Summary
6.1.1
Learning Objectives
6.2
Multivariate Thinking
6.3
Multivariate Data Visualisation Strategies
6.4
Mapping Additional Aesthetics
6.4.1
Bivariate
6.4.2
Multivariate Visualisation I
6.4.3
Learning Analytics Data
6.4.4
Multivariate II
6.4.5
Size
6.4.6
Colour - Discrete
6.4.7
Transforming
6.4.8
Colour- Continuous (Heatmaps)
6.5
Faceting
6.5.1
Single Facet
6.5.2
Double Facet
6.5.3
Emphasis
6.6
Purpose Built
6.6.1
Sankey Diagrams
6.6.2
Parallel Coordinates
6.6.3
3D Scatter Plots
6.6.4
Multivariate Mosaic Plots
6.7
Concluding Thoughts
7
Spatial Data
7.1
Summary
7.1.1
Co-author
7.1.2
Learning Objectives
7.2
Thinking Spatially
7.3
Types of Spatial Visualisations
7.3.1
Choropleth Map
7.3.2
Isarithmic Map
7.3.3
Point Map/Dot Density Map
7.3.4
Proportional symbol/Bubble maps
7.3.5
Area Cartograms
7.3.6
Dorling Cartograms
7.4
Understanding Spatial Data
7.4.1
Spatial Data Models
7.4.2
Spatial Referencing Systems
7.5
Worked Examples
7.5.1
Choropleth Map
7.5.2
Point Map
7.5.3
Case Study - The City of Melbourne’s Urban Forest
7.6
Concluding Thoughts
8
Adding Interactivity
8.1
Summary
8.1.1
Learning Objectives
8.2
Why Interactive?
8.3
Adding Interactive Features
8.3.1
Plotly
8.3.2
Getting Started
8.3.3
plot_ly
8.3.4
Sharing
8.3.5
ggplotly
8.3.6
Custom Controls
8.3.7
Highlighting
8.3.8
Animations
8.4
Concluding Thoughts
9
Building Apps
9.1
Summary
9.1.1
Learning Objectives
9.2
Apps
9.3
Shiny
9.4
shinyapps.io
9.5
Building Your First App
9.6
Histograms App
9.6.1
ui.R
9.6.2
server.R
9.7
Population Pyramid App
9.7.1
Data
9.7.2
ui.R
9.7.3
server.R
9.8
Shiny Apps II
9.8.1
Single File Apps
9.8.2
Building a
ui
Quickly
9.8.3
Tabsets and Navbars
9.8.4
Plotly and Shiny
9.8.5
Reactive Events
9.9
Uploading and Viewing Data
9.10
Shiny Themes
9.11
Avoiding Common Errors in Shiny
9.11.1
Load your Packages and Data
9.11.2
Remove the Unnecessary
9.11.3
Use Current Versions
9.11.4
Use Relative Paths
9.11.5
Build One Feature at a Time
9.11.6
Check Logs
9.11.7
Avoid Shiny-cide Functions
9.11.8
Publishing Your App
9.12
Conclusion
10
Dashboards
10.1
Summary
10.1.1
Learning Objectives
10.2
Dashboards
10.2.1
Definition
10.2.2
Good Dashboards
10.2.3
Bad Dashboards
10.2.4
Visual Emphasis
10.2.5
Dashboards and Pie Charts
10.3
Dashboards in R
10.3.1
flexdashboard
10.3.2
shinydashboard
10.4
Conclusion
References
By James Baglin
Sign out
Data Visualisation: From Theory to Practice
Data Visualisation: From Theory to Practice
James Baglin
2023-02-16
Preface
Acknowledgements