Slides: bit.ly/2025-rss-quarto
Access to the virtual environment (if you don’t want to install anything):
Master password: passionfruit-pineapple
https://quarto-rss.jumpingrivers.training/welcome/
Password: passionfruit-pineapple
Background in Astrophysics & Data Science.
Principal Data Scientist @ Jumping Rivers:
Project management.
Python & ML support for clients.
Maintain and teach courses in Python, SQL, ML.
Enjoy hiking and travelling.
↗ jumpingrivers.com 𝕏 @jumping_uk
JR is an official partner of Posit, who maintain:
Posit maintains free and open source frameworks including:
Compatible with R, Python and more!
In RStudio
File > New File > Quarto Document
Set title and author
Click Create
Save and click Render
Quarto has a visual mode to make it feel more like you’re editing a Word document
For this workshop we will use the source mode and edit the qmd source code directly
See the “Source” and “Visual” buttons above the file editor window
All Quarto documents have:
YAML header - configuration
Markdown - document body
YAML: Yet Another Markup Language
Revealjs - HTML, interactive, optimised for web
PowerPoint
Beamer - LaTeX presentation
Open source HTML presentation framework
Anything you can do on the web, you can do in your presentation
CSS styling
Interactive visualisations
Even Shiny apps…
A lot of features, we won’t get through them all!
In the Markdown body
Use single or double hash to start a new slide
In the Markdown body
Use single or double hash to start a new slide
File > New File… > Quarto Presentation
Save to the “dynamic_presentations_with_quarto/” folder
Update the YAML header:
Add one title slide and two normal slides
Click Render
Applicable to ANY output format (PDF, HTML, revealjs, …)
Or type into a Quarto document:
Use the Visual editor - click Insert –> Figure/Image
Or type into a Quarto document:
Add a slide containing some bullet points.
Add a second slide with a link to the Duke Lemur Center https://lemur.duke.edu/.
Add the image of the Mongoose Lemur (mongoose-lemur.png).
Quarto allows us to combine plain text and code
The code can be executed when the document is rendered
Plots and figures can be dynamically generated
Let’s load some data using R:
If we’re just loading in packages, perhaps we should collapse the code…
… do some data wrangling, and print the output as a table…
| sex | weight_g | age_at_wt_mo |
|---|---|---|
| M | 1086 | 125.82 |
| M | 1190 | 129.93 |
| F | 947 | 131.11 |
| F | 1174 | 135.42 |
| M | 899 | 100.64 |
| M | 917 | 101.06 |
…or include some exploratory plots!
```{r}
#| message: false
#| output-location: slide
#| fig-cap: "Age vs weight of lemurs"
#| fig-alt: "Scatter plot showing positive relationship between lemur age and weight split by sex"
#| out-width: 150%
ggplot(data = df,
mapping = aes(x = age_at_wt_mo,
y = weight_g,
colour = sex)) +
geom_point(alpha = 0.1) +
geom_smooth(method = "lm") +
labs(title = "Weight of lemurs",
x = "Age (months)",
y = "Weight (g)")
```We can also include code inline, rather than as a separate chunk.
The number of observations is `r num_obs`.
The number of observations is 82609.
You can also include Python code chunks!
Fence code cells with {python} instead of {r}.
VS Code and Jupyter are both supported by Quarto.
Inline code has a different syntax in Python.
See Python Quarto docs: quarto.org/docs/computations/python.html
In a new slide, add a code block to load the data and libraries (see task-3.R chunk 1).
Hide any output messages from the code chunk.
In the next slide, add a hidden code chunk which generates a scatter plot (see task-3.R chunk 2).
Add a caption to the plot with the fig-cap code chunk option.
In the next slide, add a final code chunk to output the average weight.
::::{.columns}
:::{.column width="70%"}
Content for my left column
:::
:::{.column width="30%"}
Content for my right column
:::
::::Highlight / step through lines of code in chunks
Use the code-line-numbers option
Add an “_extensions” folder
Allows to define custom styles using CSS
Set the font types, font sizes, font colours, background colours, logo, and more
Easy to share within your team (useful for branded presentations)
Change the output format to jrSlides-revealjs - this uses the _extensions/jrSlides/ folder provided
Add a slide with two columns (60% and 40% width):
Include bullet points in the left column
Add the Mongoose Lemur image to the right column
In one of the code slides, use code line highlighting
Any questions?
Join us for Shiny In Production (8-9 Oct), Newcastle Upon Tyne
A half day of workshops followed by a day of talks on all things Shiny
Discount code (30% off): RSS2025
Jumping Rivers is organising free, monthly webinars!
Upcoming topics include Scalable Shiny Apps, Machine Learning with Python, Introduction to the Posit Ecosystem
Next webinar: 18 September
Find out more at jumpingrivers.com/blog/jumping-rivers-webinar-launch/
Follow “Jumping Rivers Ltd” on LinkedIn to keep up to date
Slides: bit.ly/2025-rss-quarto
GitHub repo: github.com/jumpingrivers/2025-rss-quarto
Jumping Rivers: jumpingrivers.com
Quarto documentation: quarto.org
Awesome Quarto: github.com/mcanouil/awesome-quarto
Shiny In Production shiny-in-production.jumpingrivers.com (RSS2025 for 30% off)
It’s easy to share your documents!
Quarto Pub is free to use for public documents and sites.
Hosting public HTML sites via GitHub pages (available to free GitHub accounts).
Publish to Posit Connect for restricted visibility.
Top tip: creating an HTML with no external dependencies