Week 4 laboratory

Write the paper from files, then rebuild

A research report is not a number you type once. It is three files that stay in sync: Markdown you write, a Python script that computes, and a LaTeX document that typesets. Tonight you run that loop on your Week 2 or Week 3 CSV.

edit → run the script → read the output → edit again Do not type a mean by hand. If the number is wrong, fix the script or the file.
Markdown

What you claim

report/REPORT.md is the readable paper. Prediction and limitation are yours. The results block is generated.

Python

What you compute

report/scripts/summarize.py reads the CSV and writes output/numbers.md and output/numbers.tex. Standard library only.

LaTeX

What you typeset

report/main.tex \inputs the generated snippet. A PDF is a bonus if pdflatex is present; the .tex is enough.

In the private repository

Copy the starter, then run the loop

If your studio repo does not yet have a report/ folder, copy it from this handbook (report/README.md). Put your CSV in data/. In a Codespace:

cd report
python3 -m venv .venv
source .venv/bin/activate
bash build.sh ../data/YOURFILE.csv

Read the generated block in REPORT.md. Change one sentence, or one line of the script (exclusion bounds, or a second statistic). Run build.sh again. The optional descriptives page is still here if you want a histogram; it is not this week’s report.

Practice loop · on this page

Run, read, change, run

Load a file, write a prediction, then rebuild.

Generated Markdown

Run the script to fill this block.

Generated LaTeX

\input{output/numbers}
Remix

Arts and Science

Arts: the prose. After the first build, rewrite the title, prediction, and limitation until a stranger can state the claim in one sentence. Do not invent a prettier mean.

Science: the script. Change the exclusion rule or add a second descriptive (median, or first half versus second half). Rebuild so output/ updates. Paste the old and new generated sentences in the report.

Weekly report

What to submit

Paths to report/REPORT.md (or lab-notes/week04.md), report/scripts/summarize.py, report/output/numbers.md or numbers.tex, and report/main.tex. Name one change you made after the first build. Due Tuesday 29 September (no class on the 30th).

Class night

Agenda

18:00 Introduction
A report is a pipeline. The number in the paper must come from a file the script can read again.
18:25 Demonstration
Instructor runs build.sh on a sample CSV, reads the PDF or Markdown, changes one line, runs it again.
18:40 Exercise
Copy the starter if needed. Point the script at your own CSV. Write the prediction first.
19:25 Results
Show the generated block and one limitation. No draft exchange.
20:05 Modification
Arts: the sentences. Science: the script, then rebuild.
Reading
report/README.md and the note on agentic coding.

Report: the four paths, and one iteration you can describe. The mean you typed by hand does not count.