Quarto Project Template

A Quarto framework for research projects
paper · slides · poster · reproducible builds · reading notes

Cloning a template should give you more than folders. It should give you a way of working. This template organizes a research project from reading notes to the final poster around a single idea: write the analysis once, and let every output draw from it. When a model changes the week before a deadline, you re-render, and the code, figures, and tables update across the paper, the slides, and the poster at the same time.

written once

code/03_figures.R code/04_tables.R _quarto.yml references/refs.bib

↓make

The paper, rendered straight from the repository. ↓ download pdf


The framework

  1. Repo as a workflow template

    The whole repository is a workflow template. It comes with issue labels for organizing and planning work and for tracking every step of a research project. It also includes a small shell function that pulls a GitHub issue into issues/ as Markdown, so you can edit issues in your code editor and update them with the GitHub CLI.

    blocked bug code data presentation review writing todo
  2. Revise once, update everywhere

    Figures and tables are defined in R scripts under code/ and sourced by every document. The paper, the slides, and the poster always show the same results. There is no stale table left in last month's slides.

    ```{r}
    #| label: fig-scatter
    source("../code/03_figures.R")
    plot_hp_mpg()
    ```
  3. Shared foundations

    Authors, affiliations, ORCID, the date, and the bibliography are set once in _quarto.yml. The paper is split into numbered section files, and uses biblatex with cross-references for figures, tables, equations, and sections. Tagging a heading {.appendix} or {.supplementary} gives the back matter its own numbering (A1, S1, pages S-1, S-2…) and its own table of contents. The slides use a University of Michigan Beamer theme, and the poster uses a Gemini-based Quarto extension.

  4. Reproducible by design

    A makefile records how data, code, and documents depend on each other. Only the outputs whose inputs changed are rebuilt, and the same file is the start of a replication package. renv records the exact version of every R package the project uses in renv.lock, so anyone who clones it can restore the same package environment with one command.

    renv::restore()    # install the recorded package versions
    renv::snapshot()   # record new or updated packages
    
    make               # paper, slides, and poster
    make paper         # just the paper
    make clean         # remove cached results and outputs
  5. Reading notes as data

    Literature notes live in a plain readings.yaml file: version-controlled, searchable, and not stuck in someone else's app. A small Python tool, notes/org_table.py, can:

    • import papers from Zotero collections or Obsidian notes
    • show them as a filterable, sortable table in the browser that updates live as you edit
    • export the table to Excel
    • draw an interactive citation graph showing how your papers connect, and which papers you are missing that they cite or that cite them
    python org_table.py readings.yaml --from-zotero "RDD papers"
    python org_table.py readings.yaml --live
    python org_table.py readings.yaml --graph
    python org_table.py readings.yaml --xlsx

Get started

Click use this template on GitHub, or create a copy from the terminal. You will need Quarto (≥ 1.8), R with the renv package, and a LaTeX distribution (a full TeX Live or MacTeX install is recommended).

gh repo create my-project --template JozefRivest/project-template-quarto --clone
cd my-project
Rscript -e 'renv::restore()'
make

Acknowledgements

This project owes a lot to many people. Vincent Arel-Bundock, whose computational tools, including modelsummary, marginaleffects, and tinytable, have done so much for how social scientists work with and communicate their results. Yusaku Horiuchi, with whom I discussed an earlier draft of this workflow. His LaTeX template inspired part of the structure of this one. And the whole CLESSN crew, who first introduced me to these practices and with whom I've had many conversations about why a good workflow matters in the social sciences.