๐ฅ๏ธ Week 01, Day 04 - Lecture
From Data to Insight: A Visualisation Workshop
By the end of this session, you should be able to: i) Translate a sketched visualisation idea into functioning Python code using AI assistance, ii) Navigate and draw inspiration from professional data visualisation galleries, iii) Critically evaluate the effectiveness of a data visualisation, iv) Use an AI assistant to refactor and improve existing plotting code, v) Understand the workflow of progressing from raw data to a final, insightful visualisation.
Welcome back. Today we are doing something different. Instead of a traditional lecture with slides, weโre going to dive straight into a hands-on workshop. Our entire session will be built around a single, powerful idea: turning raw data into a compelling visual story.
Our goal today is not to master every single command in Matplotlib or Seaborn. Itโs to understand the workflowโthe journey from a question, to data, to an insight that you can share with others.
โฐ Thursday, 17 July 2025 | 10:00am - 1:00pm ๐ Location: CKK.2.06 (see LSEโs ๐บ๏ธ campus map)
Hour 1: The Destination First
10:00 โ 11:00
Iโm going to start by showing you the end result.Open up the NB03
notebook. You can download it here if you need to:
I suggest you save it to your me204-study-notes
repository that you created yesterday.
At the very bottom of the notebook, youโll find this plot:
There are TWO NOTEBOOKS today. This is just the polished one, the second one can be found in Hour 3 and will have a walkthrough of the data preparation steps.
Our task for this first hour is to work backwards. How did we get from a raw API call to these specific, insightful visualisations? We will walk through the NB03
notebook together, focusing on the pandas
transformations that make these plots possible.
โ๏ธ Coffee Break
11:00 โ 11:15
Hour 2: Building Visual Literacy
11:15 โ 12:00
Now itโs your turn to be the critic.
Group Activity
In your teams, your task is to find and critique data visualisations in the wild.
- Find Examples (15 mins): Look for charts, graphs, or maps in:
- Official reports (e.g., from the ONS, World Bank, or government bodies)
- News articles (e.g., The Financial Times, The Economist, BBC News)
- Academic papers in your field of interest.
- Critique (15 mins): For each visualisation, discuss:
- What works? What is the chartโs main message? Is it clear? Is the title effective?
- What doesnโt? Is it cluttered? Misleading? Could the colours be better? Is the key message buried?
- Share (10 mins): Each group will share one โgoodโ example and one โbadโ example with the class, explaining your reasoning.
๐คธ Quick Stretch Break
12:00 โ 12:10
Hour 3: From Raw Data to Insight
12:10 โ 13:00
This final hour is dedicated to a guided walkthrough of the LSE_ME204_W01D04_lecture.ipynb
notebook. We will work through it together, focusing on the critical data transformation steps that bridge the gap between a raw API response and a final, communicative plot.
Our focus will be on understanding the how and the why:
- Operationalising a Question: How do we translate a concept like โheatwaveโ into a concrete set of rules a computer can understand?
- The Logic of
.diff()
and.cumsum()
: Weโll dissect thepandas
code used to identify consecutive events in a time series. This is a powerful technique you can adapt for many other problems. - Creating the โFinal Dataframe Pre-Analysisโ: We will reinforce the core philosophy of the course: shaping your data into the exact format needed for your plot before you call the plotting function.
- The Full Workflow: Weโll connect the dots from the initial question, through the transformation, to the final visualisation, ensuring you understand the complete process.
๐ Further Learning & Resources
Here are some excellent resources to continue building your data visualisation skills.
Matplotlib Resources
- Plot Types Gallery: The best place to start. See all the different charts you can make.
- Anatomy of a Figure: A fantastic breakdown of all the named components of a plot.
- Tutorials: Deeper dives into specific aspects of the library.
Seaborn Resources
- Example Gallery: An inspiring collection of beautifully styled statistical plots.
- Official Tutorial: A comprehensive guide to the libraryโs main functions and features.
- API Reference: The definitive source for every function and its parameters.