Getting Started with Quarto for Data Science Reports
Quarto
Tutorial
Reproducibility
A beginner’s guide to creating beautiful, reproducible reports using Quarto in your data science workflow.
What is Quarto?
Quarto is an open-source scientific and technical publishing system that lets you create:
- Documents (HTML, PDF, Word)
- Presentations
- Websites and blogs
- Books
It supports multiple programming languages including R, Python, Julia, and Observable.
Getting Started
Installation
Download Quarto from quarto.org.
Your First Quarto Document
Create a file named report.qmd:
---
title: "My First Report"
author: "Antoine Lucas"
date: today
format: html
---
## Introduction
This is my first Quarto document.
```{r}
library(ggplot2)
ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point() +
labs(title = "Car Weight vs. Fuel Efficiency")
```Rendering
quarto render report.qmdKey Features
Code Execution Options
#| echo: true # Show the code
#| eval: true # Run the code
#| warning: false # Hide warnings
#| fig-width: 8 # Figure width
#| fig-height: 6 # Figure heightCross-References
Reference figures, tables, and sections:
See @fig-scatter for the visualization.
```{r}
#| label: fig-scatter
#| fig-cap: "Scatter plot of weight vs mpg"
ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point()```
Callouts
Note
This is a note callout for additional information.
Warning
This is a warning callout for important caveats.
Benefits for Data Science
- Single source of truth — Code and narrative together
- Multiple output formats — One document, many formats
- Reproducibility — Anyone can re-run your analysis
- Version control friendly — Plain text format works well with Git
Conclusion
Quarto is an excellent tool for creating reproducible data science reports. Start with simple documents and gradually explore its advanced features.