← Code

Data detective

A real data set in Python: read a CSV, count, average and find the biggest, draw a bar chart, clean messy data and check it with test cases, then build a dashboard.

Start1. Rows of data

Reading data

Read a CSV file into a list of dictionaries, then count, filter, total and average it.

Charts and checking

Draw a bar chart from counts, then clean messy data and check your code with test cases.

Dashboards and live data

Put the data behind a small app, then ask a real API for live data (optional).

5A data dashboardNot started
6Ask an API OptionalNot started

Ask a real weather service for the week's forecast, read the JSON it sends back, and fall back to a saved copy when there is no connection.

  1. Predict
  2. Run
  3. Investigate › The question you send
  4. Investigate › When it fails
  5. Investigate › Spot the bug
  6. Modify › The hottest day
  7. Modify › Rain
  8. Two places
  9. Where this leads
Start lesson

Progress is saved in this browser only. Nothing is sent anywhere.

For teachers: Teacher guide (notes, answers, solutions, slides and worksheets)