Digital Research Academy Train the Trainer program
February 13, 2024
Findable
Accessible
Interoperable
Reusable
“[…] when the same analysis steps performed on the same dataset […] produce the same answer.” (Turing Way)
Comes close to the Interoperability and Reusable principles:
By setting up your teaching materials in a reproducible manner, you demonstrate the value of reproducibility directly
taken from What is Quarto - A Quick Intro FAQ
Syntax | Output |
---|---|
*Italic* |
Italic |
**Bold** |
Bold |
~~strikethrough~~ |
|
[Link](url) |
Link |
i\hbar \frac{\partial \Psi}{\partial t} = -\frac{\hbar^2}{2m} \nabla^2 \Psi + V(\mathbf{r},t) \Psi |
\(i\hbar \frac{\partial \Psi}{\partial t} = -\frac{\hbar^2}{2m} \nabla^2 \Psi + V(\mathbf{r},t) \Psi\) |
```{r}
#| label: "iris-plot"
#| echo: TRUE
#| fig-format: svg
#| cache: TRUEs
data(iris)
plot(iris$Sepal.Length, iris$Sepal.Width,
main = "Scatter Plot of Sepal Length vs Sepal Width",
xlab = "Sepal Length (cm)",
ylab = "Sepal Width (cm)",
pch = 16, col = iris$Species)
```
defaults to knitr engine (you can override the engine with engine: jupyter
)
```{python}
#| label: fig-polar
#| fig-cap: "A line plot on a polar axis"
import numpy as np
import matplotlib.pyplot as plt
r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(
subplot_kw = {'projection': 'polar'}
)
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```
defaults to jupyter engine
You can use Python and R code together using the reticulate
package
viewof bill_length_min = Inputs.range(
[32, 50],
{value: 35, step: 1, label: "Bill length (min):"}
)
viewof islands = Inputs.checkbox(
["Torgersen", "Biscoe", "Dream"],
{ value: ["Torgersen", "Biscoe"],
label: "Islands:"
}
)
click Continue
Click New Project -> New RStudio Project
It should look like the image in the top right!
08:00
I will do a short demo (~4 min) about creating and updating a Quarto slide deck in RStudio Cloud. You do not need to follow along.
Then I will split the group into breakout rooms (3-4 per room) and you can try it yourselves (for about 15 min).
Instructions are on the next slides
give it a title, e.g. “Presentation”
click Create
this is your presentation
We are in Visual mode - you can type in and see changes in real time.
Slide list is on the right.
To add a slide, type in some text.
Set it to Header 2 - you will see it appear in the list.
Can do Visual mode or Source mode.
To see the slides we need to Render
This converts the Quarto code to slides you can look and and share (in HTML, you can also export as PDF).
Before we do this, we have an issue:
Click Install to install the library.
Then click
Slides will open in a new window.
Any questions before we start?
Then I will split the group into breakout rooms (3-4 per room) and you can try it yourselves. You have ~15 min.
Try some of the codes Unai introduced
Check out these links for more ideas:
You can do this on RStudio Cloud or your own copy of RStudio
You will need to download and install Quarto CLI:
Can also run in VS Code, Jupyter, Neovim or Text Editor
15:00
Strengths 💪
Weaknesses 😢
Images: Scriberia with The Turing Way community (License: CC BY 4.0)
💻 Slides: Slides are publicly available at github.com/jansim/dra-reproducible-materials
📦 Software: Reproducible slides build with Quarto and deployed to GitHub Pages using GitHub Actions (details in the Quarto docs)
Source: Source code is available at github.com/jansim/dra-reproducible-materials
🖲️ DOI: (generated using GitHub + Zenodo, see GitHub docs)
License: Creative Commons Attribution 4.0 International (CC BY 4.0)
💬 Contact: We welcome any feedback via email or GitHub issues. Thank you!