Materials for Introduction to Python workshop, first presented in May of 2018, at the annual meeting of the Association for Psychological Science. It has been given repeatedly since that time and these materials have been updated (somewhat). Please get in touch if you notice something that's not quite right.
Python is a free, general-purpose programming language. Two of Python's main assets are its beginner-friendly syntax and its expansive library of third-party packages. This ecosystem of packages provides behavioral scientists with what amounts to an end-to-end data-collection and data-processing pipeline. The packages in this pipeline provide functionality including the creation of behavioral experiments (both those conducted in the laboratory and online), data wrangling (e.g., dealing with missing data, outliers, etc.), data exploration (both desciptive and visual), statistical analysis (both frequentist and Bayesian), machine learning techniques (e.g., classification, clustering, etc.), and even the generation of publication-quality figures.
This workshop targets a general audience, assuming no prior familiarity with Python. Structurally, the workshop includes an introduction to the Python language and associated environment, followed by a systematic series of illustrative examples that follow a single data set as it makes its way through the pipeline. Ways in which researchers can integrate only a portion of the pipeline into their existing data flow (e.g., importing/exporting a variety of data formats) are highlighted as are tools of particular use in teaching contexts.
- Cultivate an awareness and an appreciation of the benefits of Python (for academic behavioral scientists)
- Highlight functionality provided by Python and its ecosystem
- Note how these tools, in part or in whole, can be integrated into one's existing workflow
In other words, the things you can acomplish if you adopt these tools.
- Ability to program Python without any further learning
- Encyclopedic knowledge of ecosystem, APIs, etc.
In other words, the nitty-gritty details of using these tools on a day-to-day basis.
Materials | ||
---|---|---|
1. Overview | slides | |
2. Ways of using Python | slides | |
3. Python basics | slides | notebook |
4. Data set overview | slides | |
5. Data wrangling | slides | notebook |
6. Statistics | slides | notebook |
7. Plotting | slides | notebook |
8. Experiment creation | slides | code |