Teaching data visualization with R
entirely in Quarto

Claus O. Wilke
The University of Texas at Austin

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

Hodgepodge of different technologies; many can pose challenges

Example of the types of challenges we may encounter

We can use learnr for interactive exercises

But:

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

Similar challenges arise throughout

How can we streamline and simplify all of this?

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)

George Stagg introduces webR and Quarto Live

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)

Charlotte Wickham introduces typst

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

Charlotte Wickham introduces typst

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

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

  • 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

The site contains the slides for my talk

The site contains the slides for my talk

And an example worksheet

And an example worksheet

There’s also a shiny app

There’s also a shiny app

All sources are on GitHub

Some things I’ve learned

Some things I’ve learned

  1. Live HTML pages need separate themeing

Some things I’ve learned

  1. You need to write a lot of CSS code for your slide decks

Some things I’ve learned

  1. Deploying shiny apps is super easy

However, it’s not all roses

Is this approach right for you?

Thank you!


Claus O. Wilke acknowledges support by the Blumberg Professorship at The University of Texas at Austin