Lessons / Part 3. Checking what an assistant tells you
18 Ask where the numbers came from before charting them
A chart whose numbers were downloaded from a named source and saved raw, not typed in from memory.
What people usually ask
Chart monthly electricity prices for my region over the last two years.
What comes back
A notebook with a tidy chart under a clean title, fed by an array of 24 prices typed into a cell by hand, with no sign of where they came from.
Ask this instead
Make a notebook that charts the monthly average electricity price for <region> over the last 24 months.
The only source is <source URL>. One step per cell:
1. Download the file from that URL and save it unchanged as data/raw/prices_<YYYY-MM-DD>.csv, with today's date in the name.
2. Load the saved file. Print the first five rows, the row count, the first and last dates, and the column names.
3. Plot price against month. Put the source URL and the download date in the caption.
If the download fails, print the request that was tried and the error that came back, then stop. Do not fill the gap with numbers from memory or with placeholder values; not one number in this notebook may be typed by you.
Attach: Nothing; the source URL goes in the prompt.
Why it works: the saved raw file and the printed head tie every point on the chart to a download that can be opened and read again.
Drafted with Fable 5.1 from my notes; chosen and edited by me.