15:00
rstudio::conf(2022)
Designing the data science classroom
Maria Tackett
Question types
gradethis for automated feedback
Recording student responses using minute papers and learnrhash
Sharing tutorials with students
Learnr tutorials are written in an R Markdown document (.Rmd
)
The syntax and structure is very similar to a Quarto document (.qmd
)
These documents primarily differ in some arguments in the YAML
---
title: "Learnr Demo"
output:
learnr::tutorial:
progressive: true
allow_skip: true
css: "css/style.css"
runtime: shiny_prerendered
---
runtime: shiny_prerendered
: Turns R Markdown into interactive appprogressive: true
: Display one subsection at a timeallow_skip: true
: Able to skip exercises in a sectioncss: "css/style.css"
: Apply custom formattingFollow along options:
Local:
Cloud: Go to the workspace for this course and start the assignment called 04 - Learnr.
Deployed tutorial: https://minecr.shinyapps.io/learnr-demo
RStudio Cloud > “Module 4 - Learnr” > learnr-demo.Rmd > Part 2: Your turn!
Add three questions to the tutorial:
Stretch goal: Add hints to the coding exercise.
You can write your questions in Part 2: Your turn! section of learnr-demo.Rmd
.
Compare your answer with your neighbor. Then type the code for one of your exercises.
15:00
The gradethis package makes it feasible to check coding exercises in a learnr tutorial. There are two basic methods for checking:
grade_this_code()
: Compare student code to model code (strict check)
grade_this()
: Compare student result to model result (flexible check)
RStudio Cloud > “Module 4 - Learnr” > learnr-demo.Rmd > Part 4: Your turn!
Add automated feedback to your coding exercise.
Stretch goal: Consider 2 -3 common errors students may make. Write specific feedback for those errors.
You can write your responses in Part 4: Your turn! section or modify the code in Part 2 of learnr-demo.Rmd
.
Compare your answer with your neighbor. Then type the code for one of your exericses.
10:00
Add a link to a form at the end of the tutorial for a “minute paper”
Write about one or two questions you didn’t get right initially but were able to solve after a few tries. What was difficult about them? What did you ultimately learn?
OR
If you got every single question correct on the first try, write one question you would still like clarified on the topics covered in this quiz.
Use the learnrhash package to collect student responses from learnr tutorials.
Students submit responses using a “hash” submitted in an online form.
Deploy on
Distribute tutorials as a package
Example: dsbox R package includes a set of learnr tutorials
More about developing packages in a later session
Creating learnr tutorials
Sharing tutorials
We have completed Day 01! Please answer the following using your sticky notes:
Purple sticky note: What is going well / what has been your favorite part of the workshop so far?
Orange sticky note: What is still unclear or confusing?