Capstone · lesson 7 of 10
Parts in this lesson
Aquarto render report.ipynb --execute10.2: a clean report, rerun first
B#| label: fig-regionsa figure Quarto can number and refer to

Writing it up

Last updated

The report is what most people will see of your capstone. In this lesson you'll write it in story order, with the answer first and the evidence after, render it with Quarto from a notebook that reruns from the top, and write the limitations section: what the data can't say, and what else could explain what you found.

By the end of this lesson you can

  • Write a report in story order from a notebook
  • Write limitations that are specific and honest
  • Render the report with Quarto, rerun from the top

The outline

Write the report as a new notebook, report.ipynb, which reads the clean data and the measures from C.5. Its first cell is a raw cell with Quarto's options, and the rest follows the story order from 10.1:

---
title: "Rice prices across the regions, 2018 to 2025"
author: "Your name"
date: today
format:
  html:
    embed-resources: true
execute:
  echo: false
---

## Summary              the answer, in three or four sentences
## The national picture   point 1, with @fig-national
## Where it hit hardest   point 2, with @fig-regions
## The gap between regions
## The season
## How sure we are       intervals, and what changes the answer
## Limitations
## Data and method       sources, cleaning log, the notebooks; link the repository

Write the summary last, when you know exactly what the evidence supports, and put it first. Each later section makes one point, with its chart (C.6), its number, its comparison and how sure you are.

Give each chart cell a label starting fig-, a caption, and its alt text:

#| label: fig-regions
#| fig-cap: "Change in real well-milled rice prices by region, 2022 to 2024"
#| fig-alt: "Real well-milled rice prices rose in every region; ..."
fig = region_change_chart(rice)
fig

Then refer to it in the text as @fig-regions, and Quarto writes "Figure 2" and links to it. Renumbering is automatic when you add or move charts.

Limitations

Every analysis has limits. Saying them clearly is what makes the rest believable. Vague limitations ("the data may contain errors") say nothing; specific ones help the reader judge:

Writing a limitation
VagueSpecific
CoverageThe data may not be complete.Prices are averages of the markets the PSA surveys in each region; prices in small towns may differ.
GapsSome data is missing.[Two regions] have no prices for [six months]; comparisons involving those months leave them out.
CausesCorrelation is not causation.Prices fell after a policy change; if world prices fell over the same months, this data can’t separate the two.
BreaksMethods may have changed.If the list of markets surveyed changed in one year (check the notes), the change across that year is less certain.

Go through the list from C.5 step 4, and your surprises from C.4: each one either got resolved in the analysis, or becomes a limitation. (The examples above show the form; write yours from what your data's notes actually say.)

Render it

Render with --execute (10.2), so the report is rerun from the clean data every time:

quarto render report.ipynb --execute

Then read it as a stranger would, start to finish, on a phone as well as a computer:

  • Does the summary give the answer, with numbers, in a few sentences?
  • Does every chart have a title that's a finding, a caption, alt text and a source line?
  • Is every number in the text computed (an f-string or an inline output), not typed?
  • Are the limitations specific?
  • Is there any code, warning or traceback left on the page?

Ask one other person to read it, someone who knows nothing about the data, and ask them to tell you the answer in their own words. If they can't, the summary needs work.

Check what you learned

When should you write the report’s summary?
Which limitation is most useful to a reader?

Sources

Every example on this page was run with Python 3.14, and its output and error messages are copied from it. These pages cover the same ground in more depth.

All sources for Simple Data Analysis