

π» Week 01 Lab
Exploring Daily Temperatures with pandas
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.
π Preparation
- Review the π Week 01 Practice
- Revisit the slides from the π₯οΈ Week 01 Lecture
- Ensure you can access Nuvolos and launch VS Code:
Nuvolos - First Time
π£οΈ 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 insideNuvolos.
- 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.
Run all the code cells in Section 2: Finding Hot Days (β₯ 28Β°C)
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.)
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?
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
Read the instructions in the Section 3: Work on the Data Science Workflow βby handβ block in the notebook.
When creating your numbered list, try to be as precise as possible and think about everything that can βbreakβ your logic.
Appendix | Resources, links, etc.
Useful Links
Support this week
- Slack: Post questions to
#help
- Office Hours: Book via StudentHub