Degrees of Freedom

Empower learners with Quarto, WebR, and Pyodide

Ted Laderas, PhD

Data Science Lab, Fred Hutch Cancer Center

Helping Learners can be hard

  • R Class for workforce training
  • RStudio was overwhelming for a learner
  • They quit the course

How could we make the experience better?

Introducing WebR/Pyodide

WebR/Pyodide can Help

  • Lower cognitive load
  • Encourage active learning
  • Increase social learning

With each step - increase learner autonomy and freedom

Lower Cognitive Load

Thoughts in a Learner’s Brain

  • What is R actually?
  • Variable? What’s that?
  • Need to finish that report…
  • Got to pick up my daughter in an hour
  • Am I doing this right?
  • RStudio? OMG, I don’t get it

 

Cognitive Load

What can we help with?

  • What is R actually?
  • Variable? What’s that?
  • Need to finish that report…
  • Got to pick up my daughter in an hour
  • Am I doing this right?
  • RStudio? OMG, I don’t get it

Fear is Part of Cognitive Load

Am I Doing this Right?

  • Fear of doing something wrong
  • Everything we can do to alleviate fear, the less cognitive load learners will have.

RStudio / Positron Overwhelm

Lower Friction for New Learners

  • Imagine you are brand new to working with programming
  • Feedback is important

Exercise

  • Filter penguins so that it only shows penguins from the island of Biscoe (you’ll have to use the island variable). Assign it to biscoe_penguins.

Tip

#add your filter statement here biscoe_penguins <- filter(penguins, island == "Biscoe") #show number of biscoe_penguins nrow(biscoe_penguins)
#add your filter statement here
biscoe_penguins <- filter(penguins, island == "Biscoe")

#show number of biscoe_penguins
nrow(biscoe_penguins)

In-Class Exercise Design Considerations

Custom Grading Functions

  • Anticipate possible mistakes and answers
  • Have a response for each
```{webr}
#| exercise: ex_1_r
#| check: true
if (identical(.result, mean(1:10))) {
  list(correct = TRUE, message = "Nice work!")
} else {
  list(correct = FALSE, message = "That's incorrect, sorry.")
}
```
```{pyodide}
#| exercise: ex_1_py
#| check: true
n = range(1, 11)
mean = sum(n)/len(n)
feedback = None
if (result == mean):
  feedback = { "correct": True, "message": "Nice work!" }
else:
  feedback = { "correct": False, "message": "That's incorrect, sorry." }
feedback
```

R-Bootcamp

Increase Active Learning

What is Active Learning?

  • Learning by doing
  • Activities that cement knowledge by application
    • Meta-learning

Model Meta-learning

  • Learning how to learn
  • Help learners explore documentation

Exercise (R)

Use the desc() function.

penguins |> arrange(desc(body_mass_g))
penguins |>
    arrange(desc(body_mass_g))

Active Learning

  • WebR/Pyodide is excellent at this
  • Use as part of lectures for practice

Increase Social Learning

What is Social Learning?

  • Learning is a cognitive process with social context
  • We learn better when we learn together
  • Discussion with your neighbor

WebR/Pyodide for Social Learning

  • Paired programming exercises
  • Make your own design decisions
    • Better Tables
  • Share packages for demos
    • Data Snacks

Better Plots

  • Take a Paper Doll approach to improving plots
  • Design in in the eye of the beholder
    • Discuss what works for you
  • Sharing styling code with each other

Better Plots

Experiment with adding or removing to the graph, adding your own annotations.

If there’s a show that you want to highlight, try adding an annotation to highlight it. Or try adding an annotation at Roseanne’s lowest rating!

Data Snacks

What’s Next?

WebR/Pyodide is part of a technology spectrum

Note: Summative Assessment

  • Using WebR/Pyodide for summative assessment is difficult
    • Technically difficult
      • client side / source code is available in console
    • Come talk to George if you want to do this

Conclusion

WebR/Pyodide is a powerful technology that can help you to:

  • Reduce Cognitive Load
  • Increase Active Learning
  • Increase Social Learning

As you give students more freedom, they become stronger learners

Resources / Thanks!