Skip to main content

Make sense of a messy table

Inspect a messy synthetic spreadsheet, spot missing rows and unit traps, and check whether the summary matches the numbers.

1. Scenario

Pick a work role starter with synthetic material, or switch to Bring your own.

Pallet weight manifest with mixed kg and lb rows

Operations · Synthetic material

You are checking whether a five-pallet load stays under the 3,200 kg van payload limit.

pallet_id,supplier,weight_value,unit,zone
PAL-01,North Mill,520,kg,A
PAL-02,North Mill,480,kg,A
PAL-03,Harbor Foods,1100,lb,B
PAL-04,Valley Dairy,610,kg,A
PAL-05,Harbor Foods,990,lb,B

2. Work area

Edit the briefs or setup below before you run.

Only the header row, inferred column types, and at most 20 sample rows leave your device. The analysis function runs in your browser on all rows.

5 columns · 24 total rows · 20 sample rows leave device

Answer and chart

Example. No model ran.

Refrigeration accounts for 6 of the 9 breached tickets across all sites.

Inline SVG chartRefrigeration6Loading Bay2Heating1Lighting0
Steps in plain words
  1. 1. Group all 24 tickets by category and count total versus SLA-breached tickets.
  2. 2. Sort categories by breached count so the operations lead sees the top bottleneck first.
  3. 3. List the breached rows so the count can be checked against the dispatch board.
Inspect the analyze(rows) code that ran in your browser
function analyze(rows) {
  const byCategory = {};
  let totalBreached = 0;

  for (const row of rows) {
    const cat = String(row.category || "Other");
    if (!byCategory[cat]) {
      byCategory[cat] = { category: cat, total: 0, breached: 0 };
    }
    byCategory[cat].total += 1;
    if (String(row.status) === "breached") {
      byCategory[cat].breached += 1;
      totalBreached += 1;
    }
  }

  const table = Object.values(byCategory).sort((a, b) => b.breached - a.breached);
  const chart = table.map((item) => ({ label: item.category, value: item.breached }));
  const top = table[0] || { category: "None", breached: 0 };

  return {
    answer: top.category + " accounts for " + top.breached + " of the " + totalBreached + " breached tickets across all sites.",
    table,
    chart,
    checkOne: {
      label: "Tickets with breached status",
      figure: totalBreached,
      column: "status",
      equals: "breached",
      mode: "count"
    }
  };
}

Check one number by hand

Reported: 9 · Rows found: 9

Tickets with breached status: Filter where status equals breached. Below are all 9 matching rows from the 24-row spreadsheet so you can count or sum them yourself.

1. ticket_id: TK-301 · category: Refrigeration · site: North Depot · status: breached · hours_open: 14
2. ticket_id: TK-304 · category: Refrigeration · site: South Depot · status: breached · hours_open: 16
3. ticket_id: TK-306 · category: Refrigeration · site: North Depot · status: breached · hours_open: 12
4. ticket_id: TK-307 · category: Loading Bay · site: South Depot · status: breached · hours_open: 11
5. ticket_id: TK-310 · category: Heating · site: Central Office · status: breached · hours_open: 15
6. ticket_id: TK-311 · category: Refrigeration · site: North Depot · status: breached · hours_open: 18
7. ticket_id: TK-314 · category: Refrigeration · site: South Depot · status: breached · hours_open: 13
8. ticket_id: TK-319 · category: Loading Bay · site: North Depot · status: breached · hours_open: 10
9. ticket_id: TK-320 · category: Refrigeration · site: South Depot · status: breached · hours_open: 15

3. Run

Nothing leaves your browser until you press Run.

Sends only the column header and at most twenty sample rows when you press run. to job data_code (claude-sonnet-5-5, effort medium). Raw text is processed in memory and not stored.

4. Inspect

See what left the browser, which model ran, and the receipt.

Example. No model ran. · source: offline
What left the browser

Nothing sent yet. When you run, only headers and at most 20 sample rows leave this device.

What stayed on device

All 24 rows stay in your browser and run inside the sandboxed Web Worker.

Model and job

data_code · claude-sonnet-5-5 (effort medium, max 1600 tokens). Haiku reads the schema and sample rows to propose checks you can verify against the full table.

Runs and source

0 runs used · source: offline · Example. No model ran.

5. Judge

Did the calculation convert PAL-03 (1,100 lb) and PAL-05 (990 lb) into kilograms before summing?

80%

50 is a coin flip. 99 is certain. Honest confidence scores best.

6. Debrief and Keep

What to check next time, the matching lesson, and keeping this setup as a recipe.

What to check next time

Summing a number column without checking the unit column next to it is one of the commonest spreadsheet traps. Converting Harbor Foods' pound rows shows the load is well under 3,200 kg.

Keep as a recipe

Save the stronger brief and scenario setup to your device so you can reuse or adapt it in Keep.

Open Keep