Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 1.39 KB

L03.md

File metadata and controls

33 lines (28 loc) · 1.39 KB
id course-da-visualization-l03
type course
title Challenge 03: Three charts and a summary
summary Implement the contract in starter/charts.py — Agg before pyplot, parsed dates, real PNG bytes.
lang en-US
content_version 1
status reviewed
reviewed_on 2026-09-12
hints
title body
What this checkpoint tests
`python verify.py starter` — `load_sales`, `summary`, the three chart functions, and `main`, all green.
title body
Agg before pyplot
`matplotlib.use('Agg')` must run before importing pyplot or the script dies on display-less machines. And parse `date` first — `groupby` on unparsed strings sorts lexically.
title body
Files must be real PNGs
The suite checks magic bytes, not that a file exists — write with `savefig` to the `out/` paths the contract names, and emit `summary.json` UTF-8 indent 2 with a trailing newline.

Challenge 03: Three charts and a summary

Gate: objective — starter suite · Points: 10

Implement the contract in starter/charts.py. Notes for driving the agent:

  • matplotlib.use("Agg") must run before importing pyplot, or the script dies on machines with no display.
  • groupby("date") on unparsed strings sorts lexically — parse dates first.
  • Tests check PNG magic bytes: a file that is not a real PNG fails.

Checkpoint: python verify.py starter exits 0. Claim code via python verify.py.