Skip to content

feat: data & graphing science week + bar-graph/pictograph renderers - #93

Merged
clates merged 1 commit into
mainfrom
feat/graphing-science-week
Aug 3, 2026
Merged

feat: data & graphing science week + bar-graph/pictograph renderers#93
clates merged 1 commit into
mainfrom
feat/graphing-science-week

Conversation

@clates

@clates clates commented Jul 27, 2026

Copy link
Copy Markdown
Owner

What

A 5-day "Data Detectives" science week for grades 1–2 with a heavy focus on making and interpreting graphs, narrated by Dot the Ladybug (a tiny "data detective").

Causal arc: observe & count → record data in a table → show data as a pictograph → show & read data as a bar graph → run a full experiment and graph the results.

Each day is hands-on: kids collect their own data (a counting hunt, a Ramp Race, a Paper Airplane Contest), graph it, and then read what the graph says (most / least / how many more / how many altogether).

Why a renderer change

None of the existing HTML worksheet kinds can draw a graph, and content fields are HTML-escaped — so a week about graphing couldn't show a graph to read or a grid to plot on. This PR adds two new kinds to the shared worksheet_html_renderer.py (also usable by the API weekly-plan flow):

  • barGraphWorksheet — axed, titled plot with countable gridlines. Blank mode = student colours bars from their data; pre-filled mode = student reads the bars. Optional interpretation questions.
  • pictographWorksheet — keyed picture graph with per-symbol scaling (e.g. each 🐛 = 2). Blank (draw) and pre-filled (read) modes. Optional questions.

Standards touched: CCSS.Math 1.MD.C.4 & 2.MD.D.10 (represent & interpret data); NGSS K–2 practices (analyzing/interpreting data, fair tests).

Files

  • src/worksheet_html_renderer.py — two new render fns + CSS + dispatch entries (additive; existing kinds untouched).
  • tests/test_html_graph_worksheets.py — 6 tests (blank/pre-filled bar graph, scaled pictograph, dispatch registration, value clamping).
  • scripts/generate_data_week_series.py — the week generator (student packet + embedded teacher guide). Output dir is gitignored; the script fully reproduces the week.

Validation

  • venv/bin/python scripts/generate_data_week_series.py → 15 pages, exit 0.
  • Full suite: 143 passed. ruff + black clean.
  • Rendered all 15 pages with Playwright and eyeballed the graph pages — bars land at the right heights, y-ticks align to gridlines, blank grids are countable, pictograph keys scale correctly.

🤖 Generated with Claude Code

Adds a 5-day "Data Detectives" science week (grades 1-2, narrator Dot the
Ladybug) with a heavy focus on making and interpreting graphs. Arc:
observe & count -> record in a table -> pictograph -> bar graph -> run a
full experiment and graph the results (Ramp Race, Paper Airplane Contest).

To render real graphs, extends the shared HTML renderer with two new
worksheet kinds used by the packet (and available to the API weekly-plan
flow):
- barGraphWorksheet: axed/titled plot with countable gridlines; blank mode
  (student colours bars from their data) and pre-filled mode (student reads
  the bars); optional interpretation questions.
- pictographWorksheet: keyed picture graph with per-symbol scaling; blank
  (draw) and pre-filled (read) modes; optional questions.

Includes renderer tests for both kinds and an embedded teacher guide with
answer keys, misconceptions, and extensions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@clates
clates merged commit c700149 into main Aug 3, 2026
3 checks passed
@clates
clates deleted the feat/graphing-science-week branch August 3, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant