← Back to Glossary

Quarto

Quarto is an open-source scientific and technical publishing system from Posit that renders documents combining prose with R, Python, Julia, or SQL code into reports, websites, and books.

Overview

Quarto is a multi-language publishing system built by Posit (the company behind RStudio) as a successor to R Markdown, extended to work across R, Python, Julia, and Observable JS in a single ecosystem. A Quarto document mixes narrative text with executable code chunks; running quarto render executes the code, captures its output (tables, plots, values), and weaves everything into a finished HTML page, PDF, Word document, website, or book, all from one source file.

Code chunks across languages

Each chunk in a .qmd file declares its engine — Python and R chunks are the most common, executed via Jupyter or knitr respectively — and a single document can combine multiple languages, useful for a report that does data prep in Python and modeling or visualization in R, or vice versa.

Copy code

```{python} import pandas as pd df = pd.read_csv("orders.csv") df.groupby("category")["order_total"].sum() ```

SQL chunks and DuckDB

Quarto also supports SQL as a chunk language, though it currently requires the knitr engine (R), since SQL execution in Quarto goes through R's DBI package rather than a standalone SQL runner. In practice, that means opening a DuckDB connection with the R duckdb package via DBI::dbConnect(), passing that connection object into the chunk's engine options, and then writing plain SQL — DuckDB executes the query and Quarto renders the resulting table inline in the document. This pattern is popular for reproducible analysis reports where the underlying data lives in DuckDB or Parquet files: the SQL, the R/Python analysis, and the narrative explanation all live in the same version-controlled .qmd file.

Related terms

FAQS

Yes, Quarto is free and open source, developed primarily by Posit.

Yes, but SQL chunks currently require the knitr (R) engine and a database connection object created with R's DBI package, such as a DuckDB connection via the duckdb R package.

Quarto is Posit's successor to R Markdown, extending the same literate-programming approach beyond R to Python, Julia, and Observable JS, with a unified command-line rendering tool instead of an R-package-based workflow.