Teaching data visualization with R
entirely in Quarto

Claus O. Wilke

2025-08-28

No matter how much you prepare, things will go wrong

Components of an R-based data science class

  • Slides with code and output
     

  • Website
     

  • Interactive exercises
     

  • Student assignments
     

  • Demo/support apps
     

Components of an R-based data science class

  • Slides with code and output
    xaringan / beamer / …

  • Website
    distill / blogdown / …

  • Interactive exercises
    learnr

  • Student assignments
    RMarkdown templates

  • Demo/support apps
    shiny apps

Many of these technologies pose challenges

Challenges: Interactive exercises

  • The learnr package requires a running webserver
  • Alternatively, students can run learnr documents locally
    (confusing and ugly)

Challenges: Student assignments

  • In general, pdf is the best format for submissions
  • Converting markdown into pdf is complicated

Challenges: Demo/support apps

  • Same problems as learnr documents, we need a webserver or run locally

All the pieces fell into place at Posit::conf(2024)

All the pieces fell into place at Posit::conf(2024)

All the pieces fell into place at Posit::conf(2024)

Charlotte Wickham introduces typst

All the pieces fell into place at Posit::conf(2024)

Charlotte Wickham introduces typst

All the pieces fell into place at Posit::conf(2024)

George Stagg introduces webR and Quarto Live

All the pieces fell into place at Posit::conf(2024)

George Stagg introduces webR and Quarto Live

Components of an R-based data science class

  • Slides with code and output
     

  • Website
     

  • Interactive exercises
     

  • Student assignments
     

  • Demo/support apps
     

Components of an R-based data science class

  • Slides with code and output
    Quarto + revealjs

  • Website
    Quarto + website

  • Interactive exercises
    Quarto Live

  • Student assignments
    Quarto + typst

  • Demo/support apps
    Quarto + Shiny Live

Quarto provides a single, unified framework for both instructor and students

I completely reworked my class for spring 2025

A simple template to get you started

Is this approach right for you?