Find the story hiding in a real data set.
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.
Standards, in general: main focus: Trace algorithms for errors (8P06), Acquire and validate data (8P01), Analyse and visualise data (8P02), Validate algorithms and programs (10P06), Acquire, store and validate data (10P01), Analyse and visualise data (10P02); touches on: Model structured data (8P03). What this means
Read a CSV file into a list of dictionaries, then count, filter, total and average it, then do the same jobs in pandas, with an optional look at numpy.
Read a CSV file into a list of dictionaries, one per row, then pick out the rows you want.
Add up a column, divide for the average, and keep the biggest so far, one row at a time.
Do the last two lessons again with pandas: read the CSV into a table, then take an average, a maximum and a filtered table in one line each.
Start lessonTurn a list of song lengths into a numpy array, then do sums on every number at once: times 60, an average, and a test that keeps only the long songs.
Start lessonDraw a bar chart from counts, then clean messy data and check your code with test cases.
Count every genre at once with a dictionary, then draw each count as a bar of
Real data is messy. Write a function that cleans one value, check it with test cases, and skip the rows it cannot fix.
Put the data behind a small app, then ask a real API for live data (optional).
Read the table with pandas and put it behind a Gradio app: choose a genre, see its songs as a table and a bar chart.
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.
Help for your own project. Open the one you need.
Progress is saved in this browser only. Nothing is sent anywhere.
For teachers: Teacher guide (notes, answers, solutions, slides and worksheets)