| SOCR ≫ | DSPA ≫ | DSPA3 Topics ≫ |
library(ggplot2)
library(dplyr)
library(tidyr)
library(patchwork) # panel composition, replaces gridExtra / par(mfrow)
library(plotly) # interactive figures and ALL 3-D graphics
library(DT)How this chapter uses graphics
Every two-dimensional figure is drawn with
ggplot2and rendered statically. Immediately after each one you will find the equivalentplot_ly()code in a chunk markedeval=FALSE, echo=TRUE, the code is printed in these notes but not executed, so you can copy it into a live session for an interactive demonstration without inflating the size of this document.Every three-dimensional figure, surfaces, 3-D scatter, image stacks, volumetric neuroimaging, interactive dendrograms and scatterplot matrices — is drawn with
plot_ly()and evaluated, because rotation and zoom carry information no static image can. Those figures are live in the rendered HTML.The rationale is perceptual, not aesthetic: static images are reproducible, printable, and diffable; interaction earns its cost only when the reader must navigate rather than read (§2.10).
After completing this chapter you will be able to:
Estimated time: 8–10 hours including exercises.
Prerequisites: Chapter 1, in particular the
reproducibility conventions (§1.6.6) and the dspa_read()
loader (§1.6.7), both of which this chapter reuses.
The DSPA3 Labs include a number of interactive webapps, which are build as portable, self-contained, and browser accessible applications. These apps demonstrate various concepts discussed in this chapter, including:
(Ch 2 · 2.3): Imputation Misconceptions and Missingness Mechanisms: MCAR, MAR, MNAR.
(Ch 2 · 2.4): Breakdown Points Explorer: Which Summaries Survive Noise Contamination?.
Every analysis begins by moving bytes into memory and losing information in the process. The question is only whether you know which information you lost.