πŸ§‘β€πŸ« Week 02 Lecture

Python Collections & First Steps with APIs

Author

Dr Jon Cardoso-Silva

Published

30 January 2025

πŸ₯… Learning Goals
By the end of this lecture, you should be able to: i) Understand how Python stores and manages lists & dictionaries. ii) Compare and manipulate data using collections and nested structures. iii) Explain what APIs are and why they are essential for data retrieval. iv) Use the requests package to fetch and process real-world data from Open-Meteo.
DS105W course icon

Last Updated: 30 January 2025, 09:00 GMT

πŸ“Time and Location: Thursday, 30 January 2025 from 4-6 pm at MAR.1.04.

Today, we continue building our Python foundations by working with collections (lists & dictionaries) and learning to fetch data from APIs, a crucial skill for real-world data science.


πŸ“‹ Preparation

To get the most out of this lecture:

  1. Complete the πŸ“ W02 Formative Exercise.
  2. Review the key concepts from πŸ’» W01 Lab.
  3. Familiarise yourself with Markdown syntax and Python collections (lists & dictionaries).
  4. Check the πŸ“” Syllabus for this week’s plan.

🎬 Lecture Slides

Use keyboard arrows to navigate. Select the slides below or view fullscreen.

Or download the slides directly as a PDF:

πŸ“₯ Post-Lecture Actions

  1. Revisit today’s slides and experiment with API requests.
  2. Attend the πŸ’» W02 Lab for hands-on API work.
  3. Try modifying the API request: can you retrieve, say, wind speed or rain levels?
  4. Use the #help channel β€” ask, discuss, and learn together.

⏭️ Next week: How do we store API data efficiently? Let’s find out!