Project A — The Canteen Data Mini-Study

Individual or pairs (second semester appropriate) · Data you generate.

The brief

The canteen committee wants to know how students actually use it, but has no data. You will simulate three weeks of canteen sales with a documented generator, then analyse your own data as if it were real — including all the honesty problems that creates.

Part 1 — The generator (program)

Write generate.py producing sales.csv with columns day, item, price, count:

Part 2 — Clean and profile (program + report)

Write clean.py that reports (not silently fixes) every defect it finds: rows dropped, rows fixed, duplicates merged — each with a count and a rule. Produce a one-page profile: total sales, best day, best item, and the distribution of daily totals.

Part 3 — Answer three questions (report)

  1. Which item earns the most across the three weeks, and does the weekday effect survive the missing/duplicate handling?
  2. Is the "best day" stable if you re-run the generator with a different seed? (Run 5 seeds; report the spread.)
  3. What question about the canteen can this data not answer, and why?

Analysis section

Data rules