Skip to main content

2  Installation, Configuration, and Your First Document

A research assistant has been asked to summarize waiting times at a clinic. The first report is due tomorrow, but the clinic will send updated observations next week. A conventional workflow might involve calculating statistics in one application, copying them into a word processor, and repeating the process whenever the data change. A Quarto workflow instead connects the narrative, calculations, and output in a single source document. Before that workflow can become routine, however, the assistant needs a reliable computing environment. This chapter establishes that environment and guides you through your first publication.

2.1 Learning objectives

By the end of this chapter, you should be able to install and verify Quarto, distinguish an editor from a computational engine, configure R and Python, navigate a project directory, create a source document, render several output formats, and diagnose common configuration failures.

2.2 Understanding the publishing environment

Quarto is a command-line publishing system. An editor is the application in which you write source text; it is not necessarily the application that performs the computation. RStudio, VS Code, and other editors can invoke Quarto on your behalf. R and Python are programming languages with separate installations. Pandoc performs document conversion as part of the Quarto toolchain. Knitr and Jupyter provide mechanisms for executing computational content. A PDF toolchain supplies typesetting capabilities when you choose a LaTeX-based PDF output.

These distinctions are important because a failure in one layer does not imply a failure in every layer. A document containing only prose may render successfully even if Python is missing. A Python report may produce HTML successfully but fail to produce PDF because LaTeX is unavailable. Diagnosing problems therefore begins by identifying the layer responsible for the observed failure.

Component Responsibility Needed when
Quarto CLI Coordinates rendering Every Quarto publication
Editor Creates and modifies source files Writing and editing
R and knitr Executes R code R computational documents
Python and Jupyter Executes Python code Jupyter-based Python documents
LaTeX Typesets conventional PDF output LaTeX-based PDF rendering

2.3 Installing Quarto

Visit the official Quarto installation page and select the installer appropriate for your operating system. Use the official distribution rather than an unrelated package with a similar name. On Windows, run the installer and follow its prompts. On macOS, select the package appropriate to your machine and follow the installation instructions. On Linux, select the distribution-compatible package and follow the documented installation procedure; administrative permissions may be required.

After installation, close and reopen your terminal so that any changes to the executable search path take effect. In a terminal, enter:

quarto --version
quarto check

The first command reports the installed version. The second reports diagnostic information about the publishing environment. The exact output depends on the installed version and available tools. A missing optional component is not necessarily an obstacle: if you intend to write HTML documents without computation, you do not need to install every supported engine.

TipKeep an installation record

Record your operating system, Quarto version, editor, and the versions of any computational languages you install. This information is valuable when sharing a project or requesting technical assistance.

2.4 Choosing an editor

RStudio is a convenient choice for readers who already use R. Install R from CRAN and obtain RStudio Desktop from Posit. Some RStudio distributions include Quarto; nevertheless, check the version actually used by your terminal and editor. Create a Quarto document using the editor’s new-file menu, or create a plain text file with the .qmd extension. Menu labels may vary by release.

VS Code is a useful alternative for readers who work primarily with Python or multiple languages. Install VS Code and the Quarto extension from its extension marketplace. Install the Python extension if you plan to use Python. Open the entire project folder rather than a single file so that the integrated terminal and file explorer share a clear project context.

Jupyter users can also render notebooks with Quarto. A notebook stores cells and potentially saved outputs in a JSON-based .ipynb file. A .qmd file stores human-readable text and code. For this textbook we emphasize .qmd because it is easy to inspect, compare, and version-control. Notebook users need not abandon their familiar interface.

2.5 The terminal and the project directory

A terminal accepts commands as text. It is different from the R console, which evaluates R expressions, and from the Python interactive interpreter, which evaluates Python expressions. Enter quarto render in a terminal, not at the R prompt. In RStudio, the Terminal and Console tabs provide different interfaces.

Create a folder named first-quarto in a location where you have permission to write. Open that folder in your editor. The working directory is the location from which relative file paths are resolved by a command. In PowerShell, use Get-Location and Get-ChildItem to inspect the current directory. In macOS or Linux shells, use pwd and ls. The command cd changes directories in both environments. Quote paths containing spaces.

cd "first-quarto"
quarto --version

The cd example assumes your terminal starts in the parent directory. If it does not, use the actual path to your folder. Avoid placing passwords or confidential data in a project that may later be published.

2.6 Your first noncomputational document

Create a file named hello.qmd containing the following source. The first and last lines of the metadata block consist of three hyphens. The heading begins with two hash characters followed by a space.

---
title: "My First Quarto Document"
format: html
---

## Purpose

This document introduces reproducible publishing.

**Key idea:** Keep the source and the publication together.

Save the file. From the folder containing it, run:

quarto render hello.qmd

A successful render normally creates hello.html. Open the HTML file in a browser. Compare the source and the rendered result: the metadata becomes publication information, the heading becomes a section heading, and the asterisks produce bold text rather than appearing literally.

To preview changes while editing, run quarto preview hello.qmd. Stop the preview with Ctrl+C in the terminal when finished. Preview is a development convenience, whereas render creates an output artifact that can be shared. Editing the HTML directly is usually a poor strategy because a later render may overwrite those changes. Edit the source instead.

2.7 Configuring R

Install R before attempting R computations. In the R console, run:

R.version.string
install.packages(c("knitr", "rmarkdown"))

Package installation is an environment setup operation, not a routine step to repeat inside each report. Installing packages during rendering can cause failures on machines without internet access and may silently change dependencies. After installation, use quarto check knitr in the terminal to inspect the R execution environment.

The R package named quarto is optional: it provides convenient R functions for invoking the CLI but does not replace the Quarto installation. The Render button in RStudio and the CLI both support document rendering; see the official R computation guide.

2.8 Worked example: a clinic waiting-time report in R

Suppose five synthetic waiting times, measured in minutes, are 12, 18, 15, 25, and 10. The clinic wants a descriptive summary, not a claim about all future patients. Create clinic-r.qmd with the following content.

---
title: "Clinic Waiting Times"
format: html
engine: knitr
---

## Descriptive summary

```{r}
wait <- c(12, 18, 15, 25, 10)
length(wait)
mean(wait)
median(wait)
```

## Distribution

```{r}
#| fig-width: 6
#| fig-height: 3
stripchart(wait, method = "stack", pch = 19,
           xlab = "Waiting time (minutes)")
```

Render with quarto render clinic-r.qmd. The sample size is 5, the mean is 16 minutes, and the median is 15 minutes. The dot plot displays individual observations, making it suitable for such a small dataset. The mean exceeds the median slightly because the observation of 25 minutes pulls the arithmetic average upward. This does not establish a population distribution or a causal explanation for delays.

The braces around r identify an executable cell. A fenced block marked simply r, without braces, displays code without executing it. This distinction is essential in a textbook about Quarto: examples of source syntax must sometimes be displayed rather than run.

2.9 Configuring Python

Install Python from python.org or use an existing managed Python installation. A virtual environment isolates project dependencies from other Python projects. In Windows PowerShell, the following commands create and populate an environment without requiring activation:

py -m venv .venv
.\.venv\Scripts\python.exe -m pip install jupyter matplotlib
$env:QUARTO_PYTHON = (Resolve-Path .\.venv\Scripts\python.exe).Path
quarto check jupyter

On macOS or Linux, use:

python3 -m venv .venv
.venv/bin/python -m pip install jupyter matplotlib
export QUARTO_PYTHON="$PWD/.venv/bin/python"
quarto check jupyter

The environment variable selects the Python executable used by Quarto’s Jupyter tooling for the current terminal session. If your editor launches rendering from a different process, it may not inherit that variable; render from the configured terminal or configure the editor environment appropriately. Consult the Python computation guide for additional environment options.

2.10 Worked example: the same report in Python

Create a separate file named clinic-python.qmd. Keeping the R and Python examples separate avoids unnecessary complexity while learning how execution engines work.

---
title: "Clinic Waiting Times"
format: html
jupyter: python3
---

## Descriptive summary

```{python}
from statistics import mean, median
wait = [12, 18, 15, 25, 10]
print(len(wait), mean(wait), median(wait))
```

## Distribution

```{python}
import matplotlib.pyplot as plt
plt.scatter(wait, [0] * len(wait))
plt.yticks([])
plt.xlabel("Waiting time (minutes)")
plt.tight_layout()
plt.show()
```

Render with quarto render clinic-python.qmd. The numerical results should agree with the R report. Agreement is a useful cross-check but does not prove that the data are correct. Both reports could reproduce the same incorrect input. Reproducibility and validity are related but distinct goals.

2.11 Rendering multiple formats

A single source can target multiple audiences. HTML is useful for browser-based reading and interactive content; PDF is useful for stable page layout; Word is useful for collaborators who use tracked changes. Add the following metadata to a standalone document, replacing its original format field:

format:
  html: default
  pdf: default
  docx: default

Then render each target independently:

quarto render hello.qmd --to html
quarto render hello.qmd --to pdf
quarto render hello.qmd --to docx

For conventional PDF rendering, install a supported LaTeX distribution. Quarto offers quarto install tinytex as one option. If you already have a working LaTeX distribution, a second installation may be unnecessary. Check the resulting PDF for clipped tables, long code lines, and missing fonts. A successful HTML render does not guarantee a successful PDF render. Interactive HTML widgets may need static alternatives in print formats.

2.12 Organizing a small project

As documents grow, a consistent folder structure becomes valuable. A small project might contain report.qmd, data/clinic.csv, figures/, and README.md. A _quarto.yml file at the project root can define shared settings. Start with the following configuration:

project:
  type: default
  output-dir: output
format: html

In this project, quarto render from the root renders the project. Keep the source data separate from generated outputs. Do not assume that moving a document into a subfolder preserves every relative path. Verify paths from the actual execution directory, and consult the project configuration when changing execution settings.

2.13 Troubleshooting systematically

Symptom Likely layer First diagnostic
Command not recognized CLI or PATH Reopen terminal; run quarto --version
File not found Working directory List files and verify extension
YAML parse error Metadata Check indentation and colons
Missing R package R environment Check package in R console
Missing Python module Python environment Check interpreter and pip installation
PDF fails but HTML works PDF toolchain Inspect LaTeX error log

Read the first meaningful error rather than the last line of a long log. Reduce the document to a minimal example. First render prose, then add one code cell, then restore the remaining content. Change one variable at a time. This strategy is more informative than repeatedly reinstalling all software.

2.14 Guided practice

2.14.1 Activity 1: Environment audit

Record your operating system and Quarto version. Run quarto check and identify which components are available. Explain which missing components matter for your intended output. Save the audit as a short text file.

2.14.2 Activity 2: First publication

Create the noncomputational document above, add a second heading and a short paragraph, and render it. Change the title in the source and render again. Explain why the output changes without editing HTML.

2.14.3 Activity 3: Updating a computational report

Add a sixth waiting time of 20 minutes to either computational report. Predict whether the mean will increase or decrease before rendering. Compare the new mean and median with the original results. Explain why a report should not retain a manually typed old summary after its data change.

2.14.4 Activity 4: Diagnosing a deliberate error

In a copy of hello.qmd, remove the colon after title in the YAML block. Render the document, record what happens, and restore the valid syntax. Next try rendering a nonexistent filename. Compare the two failures and identify their different causes.

2.15 Installation laboratory: establish a known-good baseline

The goal of this laboratory is not to install the largest possible collection of software. It is to establish a small environment whose behavior you understand. A student preparing a calculus worksheet needs a different environment from a researcher fitting a statistical model. Begin with Quarto and a text editor, then add computational engines and publication formats as the work requires them. Keep a record of each successful test. If a later step fails, that record tells you which components were already working.

2.15.1 Windows laboratory

Download the Windows installer from the official Quarto site. Save your work, run the installer, and reopen PowerShell. On a managed university computer, ask the technology support team to install software if administrative privileges are required. Do not bypass institutional security controls. Use the following commands to identify the executable and confirm that it runs.

Get-Command quarto
quarto --version
quarto check
New-Item -ItemType Directory -Path first-quarto
Set-Location first-quarto
Get-Location

If the directory already exists, skip the creation command. In File Explorer, enable display of filename extensions. A surprisingly common first-document failure occurs when a file named hello.qmd.txt is mistaken for hello.qmd. Save the document as plain text, not as a Word document renamed with a different extension. Use UTF-8 encoding to preserve accented characters and mathematical prose.

2.15.2 macOS laboratory

Choose the official installer appropriate to your processor and operating system. The About This Mac panel identifies the machine architecture. Open Terminal after installation and use the commands below. If the installer succeeds but the terminal cannot find Quarto, compare the executable locations reported by the terminal and your editor before modifying shell configuration.

command -v quarto
quarto --version
quarto check
mkdir -p first-quarto
cd first-quarto
pwd

2.15.3 Linux laboratory

Select the package appropriate to your distribution and architecture. For a Debian-compatible distribution, a downloaded official .deb package can generally be installed using sudo apt install ./PACKAGE.deb, replacing the placeholder with the actual filename. Other distributions require their own package procedures. On a shared research server, consult the administrator about supported installation locations. A user-level installation may be appropriate when system installation is unavailable. Confirm the executable with command -v quarto and run the same baseline tests as on macOS.

2.15.4 Acceptance test

A version number is evidence that the executable can start; it is not evidence that every computational engine is configured. Render the prose-only hello.qmd example before installing additional dependencies. Record the command, date, output filename, and whether the browser opens the expected content. This creates a useful separation between installation success and document success.

2.16 Configuring independent computational environments

2.16.1 R: interpreter, libraries and execution engine

Install R before attempting to execute R code. In the R console, inspect the version and library paths. Install missing packages once in the console rather than embedding installation commands in every report.

R.version.string
.libPaths()
install.packages(c("knitr", "rmarkdown"))
stopifnot(requireNamespace("knitr", quietly = TRUE))
sessionInfo()

From the terminal, run quarto check knitr. A successful check indicates that Quarto can discover the R execution environment. If RStudio can execute a command but Quarto cannot, compare the R installations and library paths. An object created interactively in the console is not a reliable input to a rendered document. Define the object in the source or read it from a documented data file.

For a longer project, consider using renv to record package versions. Initialize it in a dedicated project, install the required packages, and create a snapshot after successful verification. A collaborator can restore the recorded package environment, although system libraries and the R version may still require separate configuration. Never assume that a lockfile guarantees identical numerical results on every machine.

2.16.2 Python: interpreter, virtual environment and kernel

A virtual environment isolates the packages for one project from packages used by other projects. For example, a textbook may need a different version of a plotting library than a research dashboard. Isolation reduces accidental changes when installing new software.

On Windows PowerShell, create the environment and use its interpreter directly. This approach does not require changing PowerShell execution policy.

py -m venv .venv
.\.venv\Scripts\python.exe -m pip install jupyter pandas matplotlib
.\.venv\Scripts\python.exe -m ipykernel install --user --name quarto-ch02 --display-name "Quarto Chapter 2"

On macOS or Linux:

python3 -m venv .venv
.venv/bin/python -m pip install jupyter pandas matplotlib
.venv/bin/python -m ipykernel install --user --name quarto-ch02 --display-name "Quarto Chapter 2"

The kernel registration points Jupyter to the environment’s interpreter. Use a distinct kernel name for each project. A document can select the registered kernel using jupyter: quarto-ch02 in its YAML metadata. Ensure Quarto can discover Jupyter as well: activate the environment in your shell or set QUARTO_PYTHON to the environment interpreter for the current terminal session. Run quarto check jupyter and inspect the output. In the first executable cell, print sys.executable to confirm which interpreter actually ran the code.

A dependency record should be created from the environment that successfully rendered the report. For a simple teaching project, a short requirements file naming direct dependencies is easy to maintain; for a frozen release, record resolved versions as well. Do not copy the entire virtual environment into GitHub. Recreate it on the destination machine.

ImportantOne engine at a time

For the introductory laboratory, keep the R and Python reports in separate source documents. This makes engine selection explicit and prevents a missing Python installation from blocking an otherwise valid R exercise. Later chapters explain more advanced multilingual workflows.

2.17 Editor laboratory: the same source in different interfaces

In RStudio, open the laboratory folder as a project or navigate to it using the file browser. Create a Quarto document, save it, and use Render. The Console is useful for testing an R expression; the Terminal is useful for running Quarto commands. The source editor is where permanent changes belong. After experimenting in the console, move the necessary expressions into the source file and render again.

In VS Code, open the folder, install the Quarto extension, and open hello.qmd. Use the integrated terminal to render the file. For Python documents, select the intended interpreter and check the notebook kernel separately. The interpreter selected by the editor and the interpreter selected by Jupyter need not be identical. Verify rather than infer their identity from a status bar.

In JupyterLab, a notebook can be an appropriate exploratory interface. Save the notebook, then use Quarto to render it from the terminal. Saved notebook outputs may be reused unless execution is requested; use quarto render notebook.ipynb --execute when a fresh computation is required. A notebook that works only after running cells in an unusual order is not yet a dependable research artifact. Restart the kernel and run all cells in order as a preliminary test.

The underlying source and output should not depend on a particular editor. To test this principle, render the same prose document from an editor and from a terminal. Compare the visible content rather than expecting byte-identical HTML, which can contain generated identifiers or other changing metadata.

2.18 Extended laboratory: a clinical measurement report

A fictional outpatient clinic is evaluating the distribution of appointment delays. Six visits have recorded delays of 8, 12, 15, 9, 21 and 13 minutes. The operational question is whether delays frequently exceed 15 minutes. The data are synthetic, and no inference about a real clinic is intended. The unit of observation is one visit, not necessarily one unique patient. Define the threshold as strictly greater than 15 minutes; an observation equal to 15 does not exceed it.

The companion folder examples/ch02/extended-lab/ contains a CSV file and independent R and Python reports. Copy this folder outside the textbook project before rendering. Keeping the dataset beside the reports makes the relative path simple and portable. The CSV header identifies the visit identifier and the measurement in minutes. The reports verify that identifiers are unique and that delays are nonnegative and observed.

The arithmetic mean is the sum of the six observations divided by six. Here the sum is 78 minutes, so the mean is 13 minutes. The sorted values are 8, 9, 12, 13, 15 and 21; the median is the average of the third and fourth values, or 12.5 minutes. Exactly one observation exceeds 15 minutes. The observed proportion is therefore one sixth, approximately 16.7 percent. The mean describes the arithmetic center, the median describes the middle of the ordered data, and the proportion answers the operational threshold question. These measures are complementary rather than interchangeable.

2.18.1 R implementation

visits <- read.csv("delays.csv")
x <- visits$delay_min
stopifnot(!anyDuplicated(visits$visit_id),
          all(is.finite(x)), all(x >= 0))
mean(x)
median(x)
mean(x > 15)
stripchart(x, method = "stack", pch = 19,
           xlab = "Appointment delay (minutes)")
abline(v = 15, lty = 2)

2.18.2 Python implementation

import pandas as pd
import matplotlib.pyplot as plt

visits = pd.read_csv("delays.csv")
x = visits["delay_min"]
assert visits["visit_id"].is_unique
assert x.notna().all() and (x >= 0).all()
print(x.mean(), x.median(), (x > 15).mean())
plt.scatter(x, [1] * len(x))
plt.axvline(15, linestyle="--")
plt.xlabel("Appointment delay (minutes)")
plt.yticks([])
plt.show()
Six synthetic appointment delays and the operational threshold.
Figure 2.1: Six synthetic appointment delays and the operational threshold.

The figure displays individual observations rather than hiding the small sample behind a smooth density curve. The vertical reference line represents the operational threshold, not the mean. A reader can independently count the observations to its right. If two visits had the same delay, stacking or jittering points would make their multiplicity visible.

2.18.3 Rendering and interpreting the report

Run quarto render report-r.qmd --to html or quarto render report-python.qmd --to html from the laboratory folder. Inspect the title, data summary, plot, caption, and interpretation. The source should contain the calculation rather than a pasted screenshot of a console. The report should make clear that a small convenience sample cannot establish the long-run performance of the clinic. The proportion is descriptive and is not a probability estimate with demonstrated generalizability.

2.19 Multi-format publication laboratory

A report intended for a colleague may need editable Word output, while a report intended for a course website may need HTML. A printed handout may require PDF. Specify multiple formats in the document metadata, then render one at a time during development.

format:
  html:
    toc: true
  docx: default
  pdf: default

The default entries request the format’s standard configuration. They do not install the dependencies required to produce it. A conventional PDF workflow needs a LaTeX distribution; Quarto offers quarto install tinytex as one installation route. On managed computers, obtain permission before installing additional software. Render with quarto render report-r.qmd --to pdf only after verifying the HTML edition. For Word, use --to docx. Open each generated file in an appropriate viewer and check that equations, captions, tables and page breaks remain readable. A successful command is not a substitute for visual inspection.

2.20 Troubleshooting laboratory: controlled experiments

Scenario 1: the wrong directory. A student receives a file-not-found error even though the source appears in the editor. Inspect the terminal’s current directory and list its contents. Change to the source folder or use the full quoted path. Do not create a duplicate source merely to satisfy an incorrect working directory.

Scenario 2: the wrong kernel. A Python report cannot import pandas, although pip reports that it is installed. Compare sys.executable in the report with the interpreter used for installation. Install into the intended environment or select the correct registered kernel. Recheck Jupyter discovery and render again.

Scenario 3: an inconsistent data file. Replace one delay with a negative value in a disposable copy of the CSV. The validation should stop the report. A failed validation is desirable because it prevents publication of an impossible measurement. Restore the original file and document the test. Do not disable validation simply to obtain output.

Scenario 4: a PDF-only failure. HTML succeeds but PDF reports a missing TeX package. Preserve the successful HTML result, inspect the first meaningful LaTeX error, and check the TeX installation. This is evidence of a format-specific problem, not proof that the statistical analysis is incorrect.

Scenario 5: stale output. The report shows the old mean after the CSV changes. Check whether you opened the correct output file, whether execution was cached or frozen, and whether the report reads the intended data path. Rerender explicitly and compare the output against an independent calculation. Record the source revision and data version used.

2.21 Additional guided laboratory exercises

  1. Create an installation evidence log containing the operating system, Quarto version, editor, and available engines. Explain which optional tools are unnecessary for a prose-only HTML document.
  2. Create a folder whose name contains spaces. Render a document using a quoted path and explain why the quotation marks matter.
  3. Render the clinical measurement report using one computational engine. Identify the interpreter, input file, source file, and generated output.
  4. Change the threshold from strictly greater than 15 to greater than or equal to 15. Predict and verify the new proportion. Explain why the wording of the research question must change.
  5. Add a seventh visit with a delay of 20 minutes. Predict the direction of change in the mean and calculate the new mean, median and proportion exceeding 15 minutes.
  6. In a disposable copy, introduce a duplicate visit identifier. Record the validation failure, correct the data and rerender.
  7. Render a second publication format if available. Compare the visual appearance of the figure and table with HTML. Document any unavailable tool rather than claiming success.
  8. Exchange the laboratory folder with a partner. Ask the partner to reproduce the report using only the README and supplied files. Revise the README based on the partner’s experience.

2.22 Extended project: a portable publishing workstation

Prepare a reproducible starter project for a new research assistant. Include a prose-only test document, a synthetic dataset, an executable R or Python report, an environment record, dependency instructions, and a short troubleshooting log. Demonstrate at least one intentional failure and its correction in a disposable copy. Produce HTML and, when feasible, a second format. The assessment prioritizes evidence of reproducibility over the number of installed applications.

Criterion Points
Installation evidence and clear environment instructions 6
Portable source, data and dependency organization 6
Correct numerical results and interpretation 6
Documented diagnosis and correction 6
Rendered output and independent reproduction evidence 6
Total 30

2.23 Chapter summary

Quarto coordinates document conversion and computation, but it relies on other tools for specific tasks. A minimal HTML document is the best starting point for verifying installation. R and Python reports require their own execution environments. Rendering produces a publication from source; preview supports iterative development. A reproducible project records dependencies, uses organized paths, and separates source files from generated outputs.

2.24 Review exercises

  1. Explain the difference between Quarto and an editor.
  2. Why might an HTML report render while a PDF report fails?
  3. Distinguish the terminal from the R console.
  4. Explain the purpose of quarto check.
  5. What is the difference between .qmd and .html?
  6. Explain why an executable cell uses braces around its language name.
  7. Why should package installation usually occur outside a report?
  8. What problem does a Python virtual environment address?
  9. Compute the mean and median after adding a waiting time of 20 minutes.
  10. Explain why matching R and Python results do not establish data validity.
  11. Describe how to diagnose a missing-file error.
  12. Give two reasons to choose Word instead of HTML.
  13. Explain why manually editing generated HTML is risky.
  14. Describe a minimal test for a suspected engine configuration failure.
  15. Explain why relative paths may break after reorganizing folders.
  16. Identify two pieces of environment information useful in a bug report.

2.25 Applied project: Your first clinical summary

A clinic records six synthetic appointment delays: 8, 12, 15, 9, 21, and 13 minutes. Create a Quarto report with a title, author, purpose, executable code, a numerical summary, a labeled visualization, and a cautious interpretation. Use either R or Python. Render HTML and one additional format if the required tools are available. Include a README explaining how to reproduce the report. Submit the source and generated output, not just screenshots. Do not describe these synthetic observations as real patient records.

Criterion Points
Correct source and metadata 4
Reproducible computation 6
Appropriate labeled visualization 4
Accurate interpretation 5
Rendered output and README 6
Total 25

2.26 Further reading

2.27 Supplemental assessment

  1. Conceptual (4 points). Explain why a working Python terminal does not guarantee a working Quarto kernel.
  2. Technical (8 points). Create a virtual environment, install jupyter, and record the output of quarto check and python –version.
  3. Applied (8 points). Diagnose a report that works on one computer but cannot import pandas on another.

See the student assessment packet in the source package for submission guidance and any required datasets.

2.28 Looking ahead

Use the working environment to explore structured documents in Chapter 3.

2.29 Interactive learning lab

Explore the activity below, then explain what changed and why.

Open the activity in its own page.