Interactive Data Visualization in R
Preface
Why read this book
Structure of the book
Software information and conventions
Acknowledgments
About the Author
1
Introduction: Audiences, purposes, questions
1.1
Seeing meaning rather than numbers
1.2
Seeing more than summary statistics
1.3
Purposes and audiences of visualizations
1.4
What question to answer?
1.5
Storytelling with graphics
1.6
Data sources
1.7
Grammar of data manipulation
1.8
Grammar of graphics
1.9
Considering cognitive capabilities in graphic design
2
Visualization types and principles
2.1
Pairing questions and graph types
2.2
Percpetual processes to be supported: Comparison, Detection, Pattern identification
2.2.1
Read and judge values
2.2.2
Compare values
2.2.3
Detect and select
2.2.4
Identify groups and patterns
2.2.5
Narrative structure and sequence
2.3
Principles from general to specific
2.3.1
Identify audience, story, and key relationships (Few)
2.3.2
Focus attention and organize reading
2.3.3
Annotate to show cause and explain why
2.3.4
Concrete details engage and are memorable
2.3.5
Enable comparisons and put data in context
2.3.6
Map types of variables to graph features
2.3.7
Ensure proximity compatibility
2.3.8
Legibility and consistency
2.3.9
Maximize data/ink ratio
2.3.10
Manage clutter with grouping and layering
2.4
Overview of examples
3
Association–scatterplots
3.1
Basic elements of the grammar of graphics
3.2
Simple scatterplot
3.3
Scatterplot with additional mappings
3.4
Scatterplot with linear and loess fit
3.5
Global and local regression
3.6
Quantile regression and other functional relationships
3.7
Scatterplot with regression equation and marginal distributions
3.8
Categorical scatterplot
3.9
Table lens
3.10
Scatterplot with overplotting mitigation
3.11
A matrix of scatterplots
4
Distribution–histograms and density plots
4.1
Histograms and bin choice
4.2
Density and kernel adjustment
4.3
Histogram percentage rather than count
4.4
Histogram, density overlay, and normal overlay
4.5
Cummulative density
4.6
Quantile-quantle plot
4.7
Cummulative density
4.8
Distribution: 2-D distribution and overplotting revisited
4.9
Small multiple histogram with density and median reference lines
4.10
Ridge plot–An array of density plots
5
Comparison–barchart, boxplots, synaplots
5.1
Graph considerations for communication: aggregation, abstraction, complexity
5.1.1
Simple bar chart
5.1.2
Bar chart with error bars
5.1.3
dotplot and offset range plot
5.1.4
Statistical significance in context
5.2
Comparing distributions, box, violyn, and sina plot
5.2.1
Compare empirical and theoretical distribution
5.2.2
Tufte-inspired minimal bar chart
5.3
Comparing across many variables
5.3.1
Dot plots and reordering
5.3.2
Point range on x and y
5.3.3
Tufte boxplot for many variables
5.3.4
Tufte-inspired slope graphs
5.3.5
Parallel coordinate plot with similar items highlighted
5.4
Gliphs: Chernof face and radar plots
6
Proportion–Pie charts and pareto plots
6.1
Pie and bar chart
6.2
Waffle plot
6.3
Pareto plot: Whole part and and ranking
6.4
Stacked bar chart
6.5
Faceted Bar chart with overall reference distribution
6.6
Rose or Coxcomb plots
6.7
Stacked, dodged, and opposed bar chart
6.8
Likert scale plot
6.9
ternary (triangular) graph
6.10
Treemaps for whole-part of hierarchy
6.11
Circle packing
7
Fluctuation–timelines
7.1
Multiple time series
7.2
Time series with reference line
7.3
Cycle plot
7.4
Connected scatterplot
7.5
Step graph
7.6
Faceted zoom
7.7
Ridge plot
7.8
Stacked area and line graphs
7.9
Temporal heatmap
8
Connection–maps and network plots
8.1
Maps
8.1.1
Choropleth
8.1.2
County map
8.2
US county small multiples
8.3
State bins
8.4
World migration
8.5
Networks
8.5.1
World migration network
8.5.2
Hierarchy
9
Graphical tables–interactive tables, highlights, and sparklines
9.1
Heatmap table
9.2
Table lens with a integrated bar
9.3
Sparkline
10
Highlighting, annotating, polishing, and automating graphs
10.1
Highlighting datapoints to make a point
10.2
Labeling and annotation
10.2.1
Annotating data
10.2.2
Time series with lines labeled
10.2.3
Labelling lines, bars, points, and select points
10.2.4
Meaningful symbols
10.2.5
Annotating with an inset plot
10.2.6
Labels on lines
10.2.7
Adding and removing labels: title, axis labels, and facet labels
10.3
Position legend
10.3.1
Remove one or more legends
10.3.2
Setting limits on axis and position of graph
10.3.3
Adjust margin between points and edge of plot area
10.4
Color
10.4.1
Resources to explain the basis form color choice
10.4.2
Large and small area colors
10.4.3
Color for large and small areas
10.4.4
Continuous color scales
10.4.5
Discrete color mappings
10.5
Themes and theme options
10.5.1
Remove chart details
10.5.2
Predefined themes adjust many elements
10.5.3
Ordering theme layers
10.5.4
Pre-set theme options
10.5.5
Themes form other packages
10.6
Saving and printing plots to include in documents
10.6.1
PNG, JPEG, PDF, and SVG
10.6.2
Combining multiple graphs for publication
10.6.3
Faceted pagination
10.7
Functions with dplyr
10.8
Create functions for custom plot
11
Interaction–annotate, highlight, link, and animate
11.1
DT: Interactive tables
11.2
DT: Interactive tables with sparklines
11.3
ggiraph: Simple annotation
11.4
ggiraph: Highlighting and multi-plot linking
11.5
plotly: Map annotation with flexible tooltip annotation
11.6
plotly: Detailed annotation, legend-based selection, and brush to zoom
11.7
plotly: Linked plots
11.8
plotly: Highlight and annotate data and fit
11.9
plotly: Time series scatterplot animation
12
Shiny–Advanced interactive graphics
Appendix
A.1
Data sources
A.2
Visualization resources
References
B
References
Published with bookdown
Interactive data visualization
References