Python for Economic and Social Data Science/Python for Sociologists

Labs, Department of Sociology, University of Oxford, and JCER, Xi'an Jiaotong University, 2024

This course introduces students to the basics of Python for Data Science.

The material is designed to last for about twenty hours, split across five ‘lectures’.

  1. Lecture One: Basic object types and an introduction to collections (Day One, 13:00-1700)
  2. Lecture Two: Iterating over a collection, Boolean logic, advanced loops, user input and error handling (Day Two, 13:00-17:00)
  3. Lecture Three: Pseudocode, functions, file I/O, programming outside of Python, Numpy (Day Three, 13:00-17:00)
  4. Lecture Four: Random numbers, webscraping, Pandas (Day Four, 13:00-16:00)
  5. Lecture Five: Matplotlib, statsmodels, RobustiPy, NLTK, scikit-learn (Day Five, 13:00-17:00)

The classes should each take between three to four hours. The first part of each of the second through fifth days will be a review of the homeworks. The class on Day Four needs to end one hour earlier. One ‘lecture’ doesn’t necessarily correspond to one day: if we finish one lecture earlier on a specific day, we can move the next lecture. If we finish all five days of content early, we can spend the remaining time working on and discussing your own specific projects which you want to use Python for. At the end of each section of the notebooks, we will take a break from the lecture and you can play around in the notebooks following the set example question (which will then be live coded afterwards when the lectures resume). All teaching material is available here.

Date first taught: 2016-10-01.

Date last taught: 2024-07-31.