TV Ratings Lab (Prototype)
This page is a prototype, not a finished lesson. It’s here to test one idea: can the exact same analysis code run on two completely different datasets, with nothing but the data itself swapped out? Everything below is live and editable — nothing is pre-rendered.
Pick your show
Run the block below as-is to work with Doctor Who. To switch to The Simpsons, change the file path on the first line and re-run this block and every block below it.
Try it out: Comment out the Doctor Who line, uncomment the Simpsons line, and re-run. Then re-run each block below — same code, different show.
Average rating by season
Which season had the most standout episodes?
Every episode, at a glance
The lesson code above never references “Doctor Who” or “The Simpsons” by name — it only depends on Season, EpisodeNumber, Ratings, and Quality columns existing. Any new show’s data can be added the same way: clean it into that shape, drop the CSV in data/, and it plugs into this exact lesson.