SCRUG: Using Markdown and Quarto to make reproducible reports

Emily Markowitz and Megsie Siple

2023-09-26

Quarto and Markdown

Quarto and Markdown enable you to weave together content and executable code into a finished product.

These slides were also made with Quarto.

More Quarto

A screenshot from the intro page to Quarto.

The Quarto.org page has some solid “starting out” material

The rainbow of reproducible options 🌈

Low investment

  • One-pagers
  • Drafts of reports (layout and indexing are done, but more edits needed to publish)

Features

Data are accessible, minimal wrangling needed. Minimal hierarchy and repeats.

High investment

  • Fully automated reports
  • Very carefully formatted things

Features

  • Parent and child docs, conditional situations, and special formatting.

Demo: A one-pager on snailfish

Clone the repo at https://github.com/scruglife/automated-reports-2023/.

Components

code/parent.qmd is a main reproducible doc. It is capable of having “child” docs referenced within, or it can exist as a standalone.

code/child_intro.R is a “child” document that inherits aesthetics and parameter values from parent.qmd

More stuff

How to use parameters in reports

Resources

Examples from your peers

It can be helpful to see quarto and rmarkdown in practice. There are many reports being created by our colleges who post their code on GitHub.