π§βπ« Week 01, Day 02 - Lecture
Working with Data Types and APIs
requests
library to fetch data from a web API, v) Transform a semi-structured JSON response into a structured pandas DataFrame.
β° Date and Time: Tuesday, 15 July 2025 | 10.00am - 1.00pm π Location: CKK.2.06 (see LSEβs πΊοΈ campus map)
Welcome back!
Yesterday, we mapped out a data workflow at a conceptual level and in the afternoon, you revisited some basic Python concepts. Today, we will acquire data from an API and transform it into a DataFrame, the most standard way to store data for analysis.
We will also revisit the question from yesterday: could we get an AI to do the whole data processing and data analysis for us?
π£οΈ Lecture Overview
Todayβs session is a journey from a high-level question to the technical details needed to answer it properly:
- Why Data Types Matter: Weβll look under the hood to see how computers actually store data, and why this is fundamental to efficient data analysis.
- From Lists to DataFrames: Weβll see why managing multiple lists is cumbersome and how
numpy
andpandas
provide a more powerful solution. - Getting Data from APIs: Weβll learn what an API is and use one to fetch the live weather data we need to really answer our question.
π¬ Lecture Slides
Use your keyboard arrows to navigate the slides below. The first part of the slides will explain how computers store the data weβre about to work with. You can also view them in fullscreen.
Prefer a PDF? Download the slides here:
(Sometimes the PDF export is a bit buggy and some text may appear with different formatting.)
After the Lecture
You are now equipped with the βwhyβ. The lab session this afternoon is your chance to get hands-on with the βhowβ.
```