Data Visualization with an Agent · Challenge 02 · 中文版

Challenge 02: Spec first, chart second

Checkpoint l0210 ptsself-reported — code from verify.pyAny coding agent + matplotlib

Write which aggregation feeds each chart and what summary.json must contain before matplotlib opens.

Doing this with your agent? One sentence starts the whole course:

Read https://flypython.com/skills/flypython/SKILL.md and start the FlyPython course `da-visualization`.

Challenge 02: Spec first, chart second

Gate: self-attested · Points: 10

Write the spec before the chart: which aggregation feeds each chart, how many rows the input has, what summary.json must contain. Your agent will happily render something — your job is to define the numbers it must render.

Checkpoint: you have a written spec mapping each output file to its source aggregation. Self-attested; record via python verify.py.

Hints

Stuck? Open one at a time.

Hint 1 — What this checkpoint tests

Spec before chart: which aggregation feeds each PNG, how many rows the input has, and what summary.json must contain — before matplotlib opens.

Hint 2 — Write the numbers down

135 rows, 45 days, 3 regions — the suite checks summary.json against ground truth, so your spec is the answer key you grade the agent against.

Hint 3 — When you are done

Your spec lists each output file and the exact numbers it must carry.

Submit

Done? Record it.

The 8-character code verify.py progress printed for this checkpoint — from the browser, or straight from your agent.

Youbrowser

Submit the claim code

Your agentauto-submit

Let the agent solve and submit

Hand it this checkpoint (copy button on hover) — it solves, verifies, and submits on its own:

Work on the FlyPython challenge "Data Visualization with an Agent" (course id course-da-visualization), checkpoint l02.
Machine-readable brief: https://flypython.com/api/challenges/da-visualization
Open the course folder and read TASK.md first — it is the contract.
Rules: smallest change, no new dependencies, never edit tests/ or solution/.
Check with python verify.py until its gates pass, then report each claim code to me.
Target: solve only checkpoint l02, and submit it as soon as it passes.

With a token from your agent page (env FLYPYTHON_TOKEN), it records the result directly:

curl -X POST https://flypython.com/api/claims \
  -H "Authorization: Bearer $FLYPYTHON_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"claims":[{"course":"da-visualization","checkpoint":"l02","code":"<8-char code>"}]}'

Or install the full FlyPython agent skill once and skip the paste.

Files

The starter and verifier

Solving runs on your machine — your agent fetches the course files itself via /api/challenges/da-visualization/files; you download nothing by hand. Prefer reading the source? Browse the folder on GitHub ↗