Section 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

    • Course Instructors

      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.

      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 (www.chorusanalytics.co.uk), a data collection and visual analysis package for social science research on Twitter. Phillip also co-convenes the Programming-as-Social-Science (PaSS) network (www.jiscmail.ac.uk/PaSS) 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'.

      • Course Resources

        You will need to access certain files and resources throughout the course to get the most out of the activities. You can find them all here. 

      • Video Transcripts

        You can access all video transcripts here.

      • Pre-Course Self Assessment

        Before you dive into this course, spend a few moments reflecting on your familiarity with the topic and your current level of skills confidence. 

        You will then re-visit the same questions in our Post-Course Self Assessment and reflect on how the course has helped you develop in confidence and grow your skills. 

        • 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.
        • Post-Course Self Assessment

          Now you’ve completed the course, spend a few moments reflecting on where your familiarity with the topics and your confidence skills le vels are at now. 

          Has the course helped you develop new skills and grow your confidence?

          You'll need to complete the Post-Course Self Assessment in order to download your certificate. If you didn't do the Pre-Course Self Assessment before starting the course, please go to the top of the page and reflect on your familiarity with the topic and your level of skills confidence before you started the course.

          • Completion: Certificate

            Completing all modules (plus the pre and post-course assessments) will unlock the course certificate, which you can then download here. Your course certificate will only be made available once you have completed all these sections.

            If you have difficulty accessing your certificate, please contact the Sage support team at: onlinesupport@sagepub.co.uk. You can also check out this FAQ page which may be helpful.

            • Give Feedback About This Course

              Did you enjoy the course? Please take two minutes to share your feedback. We use learner feedback in future course updates and developments to provide an excellent learning experience.

            • Accessibility, Diversity, Equity and Inclusion

              We have high standards of accessibility on Sage Campus and as of May/June 2024 all activities within this course are keyboard and screen reader compatible. For more details on accessibility standards, please see the Sage Campus Accessibility Guide.

              For those using assistive technology, please note that within this course:

              • Tab components: JAWS and NVDA behave slightly differently. For NVDA to keep reading, it is best to exit focus mode and go back to browse mode. 
              • Matching: JAWS does not read out question label on dropdown focus. 

              Additionally, please refer to our Diversity, Equity, and Inclusion statement which outlines our commitment to high standards of DEI on Sage Campus.