DS105 2025-2026 Winter Term Icon

๐Ÿ’ป Week 01 Lab

Exploring Daily Temperatures with pandas

Author

Dr Jon Cardoso-Silva

Published

23 January 2026

๐Ÿฅ… Learning Goals

By the end of this lab, you should be able to: i) Open and run a Jupyter Notebook in Nuvolos VS Code, ii) See what raw daily temperature data looks like and understand how it connects to yearly aggregated data, iii) Load a CSV into a pandas DataFrame and apply basic operations (selection, filtering, sorting), iv) Recognise patterns in daily temperatures and connect them to the Week 01 Practice summary data, v) Describe at a high level the steps to transform daily observations into yearly counts.

This lab builds directly on the ๐Ÿ“ Week 01 Practice and the ๐Ÿ–ฅ๏ธ Week 01 Lecture. You will explore the raw daily temperature data behind the yearly heatwave counts.

DS105

DS105 Whisperer @DS105 ยท 22 January 2026 7:35am

๐Ÿ’ก Pro-tip: if you like to use AI when studying, donโ€™t use it during the lab, use AI after, to help you check your understanding. You will thank me in the future!

The DS105 Claude bot can help you check if you are all caught up with this weekโ€™s material, create quizzes for you etc. Just fire it up and say: Help me check if Iโ€™m all caught up with this weekโ€™s material

โค๏ธ 8 likes

Slack 15 Slack conversations

๐Ÿ“‹ Preparation

๐Ÿ›ฃ๏ธ Lab Roadmap

Part Activity Type Focus Outcome
Part I ๐Ÿ—ฃ๏ธ TEACHING MOMENT From daily data to yearly insights Understand the link between daily temps and ๐Ÿ“ Week 01 Practice yearly counts
Part II ๐ŸŽฏ ACTION POINTS Finding hot days (โ‰ฅ 28ยฐC) Use selection, filtering, and sorting with pandas
Part III ๐Ÿ—ฃ๏ธ TEACHING MOMENT Making the connection Describe steps to aggregate daily data into yearly counts
Self-Study ๐ŸŽฏ ACTION POINTS Extra exploration Extend analysis with categories and seasons

๐Ÿ—ฃ๏ธ Introductions (15 min)

Your class teacher will run brief introductions in their preferred style.

๐Ÿ‘‰ NOTE: Whenever you see a ๐Ÿ‘ค TEACHING MOMENT, this means your class teacher deserves your full attention!

Part I: From Daily Data to Yearly Insights (15 min)

This part of the lab is also a TEACHING MOMENT

Your class teacher will demonstrate how to open the notebook in VS Code, run cells the cells for Section 1: From Daily Data to Yearly Insights and explain what the code does.

Follow your class teacher as they:

  • Open W01-NB02-max-temperature.ipynb in VS Code inside Nuvolos.
  • Run through the code in the notebook.

๐ŸŽฏ ACTION POINTS

Fill out the block in the notebook that says:

Q1: How is this different from the yearly heatwave data you saw in W01 Practice?

Part II: Finding Hot Days (โ‰ฅ 28ยฐC) (30 min)

๐ŸŽฏ ACTION POINTS

On your own, follow the steps below and raise your hand to your class teacher if you need help understanding something.

  1. Run all the code cells in Section 2: Finding Hot Days (โ‰ฅ 28ยฐC)

  2. Try to see if you can understand what the code does.

    We DO NOT expect you to understand much of the code at this point. Even when your class teacher is explaining code, we do so you can familiarise yourself with the syntax (how Python code looks like and how intuitive - or not - it is to read and understand.)

  3. Answer the questions in the notebook:

    • Q2: What fraction of all days are โ€œhot daysโ€ (โ‰ฅ 28ยฐC)?
    • Q3: Do you notice any obvious patterns in the dates of the hot days?
  4. Take a moment to reflect (you can create a new Markdown cell for this):

    • Even if you donโ€™t know anything about Python: are there things in the code that seem understandable? Similarly, are there things in the code that seem too abstract and odd?

    Make a note to yourself to come back to this notebook in two weeksโ€™ time and see if you can understand more of the code.

Part III: Making the Connection (30 min)

This part of the lab is also a TEACHING MOMENT but your class teacher will decide on the best way to run it.

They might ask you to work in pairs or you would all - the entire class plus the class teacher - build a solution together.

๐ŸŽฏ ACTION POINTS

  1. Read the instructions in the Section 3: Work on the Data Science Workflow โ€˜by handโ€™ block in the notebook.

  2. When creating your numbered list, try to be as precise as possible and think about everything that can โ€œbreakโ€ your logic.