Organizing, publishing, and sharing of course materials

posit::conf(2023)
Teaching Data Science Masterclass

Mine Çetinkaya-Rundel

Recap

So far

  • In the modules so far, you got a taste of both the student and the instructor experiences
  • This module is primarily from the point of view of the instructor

This module

  • Creating slides with Quarto
  • Creating a course website with Quarto
    • File organization & storage
    • Deploying materials

Creating course slides with Quarto

Why use Quarto?

Benefits for instructor

  • Integrate narrative, executable R code, images, and interactive elements
  • Create slides using Markdown syntax or visual editor
  • Reproducible slides that are easier to update
  • Annotation capabilities

Benefits for students

  • Option to export PDF of slides
  • Navigation menu to find content
  • Read slides on multiple devices

How?

YAML

---
title: "Visualising data with ggplot2"
subtitle: "Data Sci 101"
author: "Dr. Mine Çetinkaya-Rundel"
format: revealjs
---
---
title: "Presentation title"
subtitle: "Data Sci 101"
author: "Dr. Mine Çetinkaya-Rundel"
footer: "[🔗 data-sci-101.github.io](https://data-sci-101.github.io)"
logo: "images/logo.png"
format: 
  revealjs:
    theme: simple
    transition: fade
    slide-number: true
    incremental: false 
    chalkboard: true
execute:
  freeze: auto
  echo: true
---

Follow along!

Posit Cloud > Quarto presentation

Demo:

  • Make slides with format: revealjs

  • Sidebar tools

  • New sections and slides with H1 and H2 headings

  • Chalkboard with chalkboard: true under revealjs

  • Multiplex slides with multiplex: true under revealjs

  • Show code with echo: true under execute

  • Move output with output-location in chunk option

  • Highlight lines of code with code-line-numbers

  • Show fences with echo: fenced in chunk option

  • Add code annotation

Creating course websites with Quarto

Why?

  • Easily share course materials, particularly for online courses

  • Search capabilities, so students can more easily find materials

  • Reproducible website that is easier to update

  • Learn by doing!

Course website

🔗 data-sci-101.github.io

Follow along!

Posit Cloud > Quarto website

Demo:

  • Overall structure

  • Google sheet / schedule workflow

  • Freeze

Publishing

  • Simpler: Render locally, publish on QuartoPub or GitHub Pages (requires your project to be hosted on a GitHub repo)

    quarto publish quartopub
    quarto publish gh-pages
  • More complex: Render on the cloud, via a GitHub action (e.g., this one), requires environment management with renv or similar.

Adding webR to your course website

  • Install the Quarto webR extension:

    quarto add coatless/quarto-webr
  • For each document, place the webr filter in the document’s header:

    filters:
      - webr
  • In addition, add the following, listing all packages to be loaded in the page:

    webr:
      channel-type: "post-message"
      packages: ['tidyverse', 'scales', 'unvotes']
  • Then, place the R code for webR in a code block marked with {webr-r}

Learn more!

Wrap up

A curriculum in a box

🔗 datasciencebox.org

Discussion

  • Chat GPT / LLM-based tools in the context of education

  • Any other topics?

Workshop feedback

Please go to pos.it/conf-workshop-survey to fill out the workshop feedback survey. Your feedback is crucial! Data from the survey informs curriculum and format decisions for future conf workshops and we really appreciate you taking the time to provide it.