Using Quarto to share and publish your research

David Mawdsley

1 September 2022

Overview

  • What is Quarto?
  • Advantages over Jupyter notebooks
  • Output formats
  • Demo

What is Quarto?

  • Combine text content and executable code into:
    • Presentations (e.g. this)
    • Websites
    • Journal articles
    • Books
  • Supports multiple languages
    • Python
    • R
    • Julia

What is Quarto? (2)

  • Supports multiple output formats:
    • PDF
    • HTML
    • Word (.docx)
    • Powerpoint (.pptx)
    • epub

Benefits over Jupyter notebooks

  • Can produce anything between:
    • All text, hidden code (i.e. a paper, a web page)
    • All the code visible (i.e. a Jupyter notebook)
  • .qmd document is human readable
    • Markdown and code delimiters
    • Results are not embedded in the .qmd document; only in the output
    • no chunks of unreadable json
    • Works better with version control

Demo

This presentation is written using Quarto

Here is some R code, showing the code:

1 + 1
[1] 2

And without

[1] 2

Graphs

Interactive graphs

Using Plotly

Python

Can do the same with Python:

1 + 1
2

Or just the results:

2

Graphs

Using matplotlib

Plotly (Python)

Other output formats

  • Journal articles:
quarto use template quarto-journals/acm

Example article

  • Website:

Example website

Risks/Issues

  • New technology
    • Version 1 released July 2022
    • Was in beta for a long while
    • Based on (well proven) RMarkdown and Pandoc
  • Good to keep rendering time for .qmd to a minimum

Summary

  • Flexible way of sharing and presenting your work
  • Including code with text means they stay in sync
  • Works well with version control
  • A nice evolution of the Jupyter notebook