~/talk

Cracking open ggplot internals with {ggtrace}

Talkat rstudio::conf(2022) · 2022-07-25..07-28· [data-visualization]
name:June Choe
links:none on file
slides:none on file

Package ggtrace exposes ggplot2’s pipeline as four inspectable states and provides functions to snapshot and mutate the data between stat and geom so users can reason about hidden transformations. It demonstrates ggtrace_inspect_args() and ggtrace_inspect_return() on a Penguins bar plot and a boxplot where the goal is to label the second box’s upper whisker. Solution uses stage() to preserve y for the stat then remap y after_stat(ymax) so the geom_label draws the computed value; code and materials live on GitHub.

AI-written summary · about

  1. 0:00Start
  2. 4:07ggplot internals as data wrangling
  3. 4:55Layers as dataframes
  4. 10:21Walkthrough with a barplot
  5. 12:26After Stat
  6. 13:19Before Geom
  7. 17:31Multiple mappings with stage()
  8. 17:57ggplot internals for users
  9. 18:40Capture workflow
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.