Using Quarto to Make and Organize Teaching Materials

Joint Statistical Meeting

Maria Tackett

August 7, 2023

Outline

  • What can I create with Quarto?

  • Why use Quarto?

  • How do I get started?

  • Notes:

    • Change background color for header slides

    • Change bullet points to check marks?

What can I create with Quarto?

Teaching materials in Quarto

Course website

Slides

Teaching materials in Quarto

Long-form notes

Assignment instructions

Interactive documents with webR

“Run R code in the browser without the need for an R server to execute the code”


Caution

WebR is in early development. Learn more at github.com/coatless/quarto-webr

Why use Quarto?

Benefits for instructor

  • Reproducible course materials that are easier to update

  • Integrate narrative, executable R code, images, and interactive elements

  • Easily share course materials with students and more broadly

  • Regularly use the same technology as your students

Benefits for students

  • Option to export PDF of slides

  • Navigation menu on all documents to easily to find content

  • Search capabilities to more easily find materials

  • Read course materials on multiple devices

Slides

Slide menu

  • Slide navigation

  • Annotation

  • Chalkboard

  • Print to PDF

  • Speaker view

Getting started - YAML - UPDATE WEBSITE

---
title: "Lecture 01"
subtitle: "Statisics course"
author: "Dr. Maria Tackett"
date: "August 7, 2023"
format: revealjs
---
---
title: "Lecture 01"
subtitle: "Statisics course"
author: "Dr. Maria Tackett"
date: "August 7, 2023"
date-format: long
footer: "WEBSITE!"
format: 
  revealjs:
    theme: slides.scss
    multiplex: true
    transition: fade
    slide-number: false
    incremental: false 
    chalkboard: 
      theme: whiteboard
    code-link: true
editor: visual
execute: 
  eval: true
  echo: true
---

Code + Output

rng = np.random.default_rng(seed = 1234)

cl1 = rng.multivariate_normal([-2,-2], [[1,-0.5],[-0.5,1]], size=100)
cl2 = rng.multivariate_normal([1,0], [[1,0],[0,1]], size=150)
cl3 = rng.multivariate_normal([3,2], [[1,-0.7],[-0.7,1]], size=200)

pts = np.concatenate((cl1,cl2,cl3))

Mathematical notation

Slide recreated from SLR: Mathematical models for inference in Regression Analysis taught by Dr. Maria Tackett.

\[ \begin{aligned} Y &= Model + Error \\ &= f(X) + \epsilon \\ &= \mu_{Y|X} + \epsilon \\ &= \beta_0 + \beta_1 X + \epsilon \end{aligned} \]

where the errors are independent and normally distributed:

  • independent: Knowing the error term for one observation doesn’t tell you anything about the error term for another observation
  • normally distributed: \(\epsilon \sim N(0, \sigma_\epsilon^2)\)

Websites

course websites

Gif demo-ing the website or show some example slides

File structure?

[Maybe show the file structure or behind the scenes look?]

How do I get started?

Get started

Show the line of code to get started

Lessons learned + best practices

  • Learning curve so take time, especially the first time doing it

  • Takes time to convert slides from xaringan to Quarto

  • Start with a website you love

    • Use it as a template

    • Give attribution!

Publishing materials

GitHub pages

quarto publish gh-pages


Quarto pub

quarto publish quarto-pub


Netlify

quarto publish netlify

…and more. See Publishing Basics on quarto.org for more information.

Teaching materials created using Quarto

Getting started!

Thank you!

🔗 URL for Slides

🔗 URL for Repo

📧 maria.tackett@duke.edu