The following post is from Dr Maryam Ahmed (@_datamimi) who is running the Coding Lab Python sessions at the Department of Digital Humanities, King’s College London. She is also a Journalist and Data Scientist at BBC News and was a winner of the Statistical Excellence in Journalism Awards in 2021.

Have the topics of political debate changed over time?

Which industries have large gender pay gaps?

Are landlords renting out homes illegally?

This year, students are tackling these questions and more in our Digital Humanities Python Lab. 

The Lab is a free, optional class for Digital Humanities students run in both Semesters, where they learn basic programming skills from expert instructors. 

This complements the formal teaching they receive on their degree programmes in Digital Culture, Digital Humanities, Digital Asset and Media Management, and Digital Economy. 

Why learn to code?

One important way to explore questions in the Digital Humanities is by collecting and analysing large datasets. These could contain text, numbers, or images.

Working with such large datasets can be very difficult and time consuming (if not impossible) to do manually. 

That’s why researchers, journalists and others are increasingly using Python in their research. And it’s why we think it’s an important skill to teach our students.

Over six sessions, students are learning how to:

  • Grab data from the web using APIs
  • Search for trends and outliers in large datasets
  • Make sense of text with Natural Language Processing
  • Tell stories with charts and maps

No previous knowledge of coding or Python is needed, and participants start writing their own code from the very first session. 

Each session consists of taught theory, practical exercises, and time for students to ask questions. 

That sounds very technical…

Our Python Lab isn’t just about calculations and data analysis. Students are also learning how to:

  • Frame sensible research questions
  • Pick the right methods to solve a problem
  • Interpret and communicate their results responsibly

Most importantly we’re encouraging students to be exploratory, playful,creative and reflective in the way they use Python. 

So much of the joy of coding is in tinkering, breaking things, fixing them and experimenting – all of which happens in our lab (together with lots of coffee).

What next?

Feedback has been positive so far, with the room packed to full capacity and students asking thoughtful questions about how they can apply Python to new problems – from analysing their own Spotify listening data to completing coursework.

The Lab will run once in Semester 1 and again in Semester 2, to give all students a chance to attend. We’re excited to see what they do with their new found Python powers!

Leave a comment

Your email address will not be published. Required fields are marked *