This workshop is designed to introduce participants to Python, a programming language widely used in the social sciences and the humanities, as well as in many scientific disciplines. No previous programming experience is required, though a modicum of technical sophistication is needed.
The workshop is organized around thematic units that, starting from the basic task of getting your computer setup, cover all the aspects of the language necessary to write sophisticated applications. The last unit is open-ended and structured around thematic coding samples that will enable workshop participants to acquire advanced specialized skills focused on their areas of interest.
The workshop takes a hands-on approach that encourages interactive exploration, with a Jupyter notebook, containing explanations and expository prose as well as live code examples, at the core of each unit. The units are designed so that participants can cover the included material, at a leisurely pace, over the course of two weeks, at the end of which the workshop will meet to review the key concepts covered and answer questions. Exercises to test yourself are provided for each unit as well as suggestions for further reading, additional tutorials, and links to other relevant resources.
Getting set up for the workshop should be fairly simple, you will need a working installation of Python on your computer and a basic knowledge of how Jupyter notebooks work.
This unit covers the fundamentals of working with variables, data types, and operators. It also introduces participants to Python’s basic data structures, such as lists, and dictionaries, and includes a practicum on basic techniques for string manipulation.
- Notebook
- Exercises: Variables | Data Types | Lists | Dictionaries
This unit shows participants how to use different types of loops and conditional statements to iterate across datasets and execute different blocks of code depending on pre-set conditions. It also covers the essentials of Python syntax.
This unit covers code reusability through the use of functions, classes, and objects, as well as the principles of code organisation into modules and packages. Participants will learn how to build their own functions as well as how to take advantage of built-in and external modules and packages. It also shows how to interact with external data sources (e.g. text files, spreadsheets, etc.).
- Notebook (zip file with data samples)
- Exercise | Dataset | GHP's Solution
This unit covers advanced Python concepts and patterns to help participants develop a structured and organized approach to solving complex problems by breaking them down into smaller, more manageable pieces, and develop algorithms to solve them with clean, modular, and reusable code. It includes a practicum focused on optimization techniques to make code run faster and more efficiently, and how to identify and eliminate performance bottlenecks and write code that is more scalable and responsive.
- Notebook
- Datasets
- Exercises
- Additional Resources
The notebooks in this unit contain examples of code used across a wide range of common real-world research problems. Some focus on general purpose applications, while others rely on highly specialized libraries and require a certain amount of subject expertise in the relevant area.
Notebooks:
- Working with Quantitative Data
- Parsing Semi-structured Text
- Web Scraping
- Introduction to Natural Language Processing
- Computer Vision Applications
- Basics of Machine Learning