Topic outline

  • Course Overview

    This course is intended to be an introduction to the Python programming language. Through the use of taught material and practical examples, you will build up the skills needed to perform various tasks using Python

    Learning Outcomes

    This course will help you to:

    1. Develop skills with core elements of the Python programming language, and gain an appreciation of how these can feed into social scientific work (e.g., researching with digital data)
    2. See how to make methodologically appropriate decisions when designing and developing research where programming skills are deployed, including harvesting and organising data
    3. Understand how to approach a social science research question using Python, and have the capacity to devise a solution to such problems where programming skills can be deployed to reveal social scientific insight

    Your exclusive discount for Phillip Brooker’s new Python book

    Learners on Introduction to Python get an exclusive discount for the course instructor, Phillip Brookers’ new book; Programming with Python for Social Scientists. If you would like to further your Python skills after the course with Phil’s book, you get 30% off when purchasing via the SAGE website with the code SAGE2019. Please note this code doesn’t work in Australasia. If you’re based in Australia you can purchase the book via, you get 30% off with the code SAGEBOOKS30.

    • Course Authors

      • Dr Rob Mastrodomenico

        Dr Rob Mastrodomenico obtained a BSc in Mathematics and Statistics and PhD in Statistics at the University of Reading. He has spent his career working as a data scientist in the sports sector, building predictive models for sporting events. In 2011 he set up Global Sports Statistics which provides consultancy and modelling services to clients in the sports sector. Aside from statistics, Rob’s other interest is in programming. He has years of experience in many different languages but has become an advocate for Python and all that it can do to support all aspects of dealing with and modelling data.

        View Bio
      • Dr Phillip Brooker

        Dr Phillip Brooker is an interdisciplinary researcher in the field of social media analytics, with a background in sociology and sociological research methods (incorporating ethnomethodology, conversation analysis, science and technology studies, computer-supported cooperative work, and human-computer interaction). He has previously contributed to the development of Chorus (, a data collection and visual analysis package for social science research on Twitter. Phillip also co-convenes the Programming-as-Social-Science (PaSS) network ( which explores computer programming as a subject and methodological tool for social research and teaching. Phillip is currently employed as a Research Associate on CuRAtOR (Challenging Online Fear and Othering), which aims to investigate how online interactions result in 'cultures of fear'.

        View Bio
      • Module One: Getting Started with Python and Understanding the Basics

        This module covers:

        1. Introduction to the course and a short explanation of the value of Python for data analysis and social science 
        2. Installing Python 
        3. Working in the shell and using an editor 
        4. Difference between assignment and equality, using comparison operators 
        5. Assigning one or more variables, overwriting and modifying variables
      • Module Two: Data Types and Data Containers

        This module covers:

        1. The three different data types and operations that can be performed on them 
        2. Creating and manipulating lists, list functions and mapping 
        3. String use and manipulation in Python 
        4. Function and use of the tuple data container 
        5. Function and use of dictionaries
      • Module Three: Control Statements and Dealing with Files

        This module covers:

        1. What IF, ElSE and Elif statements are and how to use them 
        2. Constructing and using loops and IF statements to check conditions and change the behavior of a program 
        3. Using and/or conditions 
        4. Dealing with files
      • Module Four: Writing Scripts, Functions, Classes and Working in the Web

        This module covers:

        1. Pulling data from web content 
        2. Purpose and use of functions 
        3. Splitting code into multiple scripts 
        4. Creating a class and using objects 
        5. Considerations when planning tasks to do using code, task flow etc.