Help & Info
Instructors
Schedule
Day 1
9:00–9:15 am Introduction and Course Plan
9:15–11:00 am Intro to Command Line
11:00–11:15 am Break
11:15–1:00 pm Intro to Python
Day 2
9:00–11:00 am Dive into Python part 1
11:00–11:15 am Break
11:15–1:00 pm Dive into Python part 2
Day 3
9:00–10:15 am Web Scraping
10:15–10:20 am Break
10:20–11:35 am API Querying
11:35–11:45 am Break
11:45–1:00 pm Topic Modelling
Day 4
9 am–1 pm Office hours
Day 5
9:00–11:00 am Project Presentations
11:00–11:15 am Break
11:15–1:00 pm Project Presentations
Project selection
There will be an independent study project as part of the course, for which we will assign small groups (2–3 people depending on shared interests). We have built a google form to help us assign groups and projects. Please fill out the form no later than May 14th as this will allow us to plan for projects and groups ahead of time and tailor content accordingly.
Google form for project selection
If you don't have a project in mind you would like to complete there are several suggestions to choose from on the form:
Web scraping
This is an automated way to pull specific data from webpages. So this could be text, links, images etc., but the key is that this data is kept on web pages in a format and quantity such that it is difficult or time consuming to gather manually. Consider, you want to gather all the public health notices on all public health canadian websites that mention "lockdown". there are going to be several websites with information that is not in an easily exportable form. Perhaps you want to do this repeatedly over time. Python allows you to write a script that can gather this data for you automatically.
API querying
This is similar to web scraping and is also all about gathering data. Some websites (like twitter) have an application programming interface (API) . This is basically a little application over the big application (twitter for example) that can extract data from the big application and respond to commands from programs like python. Lots of social media platforms and many popular websites have APIs that can be used to gather curated datasets. (ex. I want all the tweets in the last month containing "snow in April").
Topic modelling
This is a tool that came out of machine learning, and it uses an algorithm to sort textual data at the individual word level. It treats the textual data like a "bag of words" or "several bags of words" for multiple manuscripts and collects the text words into topics. These topics are defined by a set number of keywords, and gives the researcher an insight into the kinds of words that are clustering together in their textual dataset.
Interactive game 1
Build a text based adventure game based on a theme of your choice.
Interactive game 2
Build an interactive rock-paper-scissors (-lizard–Spock) game.
Interactive game 3
Build a mad libs generator.
Custom notification
Build a desktop notification application which gives you notifications based on your specific criteria.
Software installation (optional)
If you want to use Python on your machine, instead of/in addition to using it on our training cluster, you will need to install the following:
Python and Python packages
The simplest way to install Python and a number of very useful packages and tools is to install Anaconda. Follow the instructions from that link for your operating system.
Terminal
Linux and MacOS users already have a terminal. So this section is for Windows users only.
Windows users should install Git for Windows. While we will not use Git in this course, this software comes with a good Bash emulation called "Git Bash".
JupyterLab
Once you have a terminal and Anaconda installed, you will be able to install JupyterLab. As this installation requires the use of the command line, we will help you with this at the start of the course if you have any issues.
A good text editor
Microsoft Word and other word processors are not text editors: they add a lot of invisible formatting to the text you type. For this course, you need a text editor, so they are not suitable.
Notepad—which comes with Windows—is a text editor, but it is too limited.
Examples of good free text editors suitable for beginners are Visual Studio Code, Atom, Notepad++, Sublime Text. Once you have installed one, it would be a good idea to familiarize yourself with it.
Access to our training JupyterHub
Resources
There are many books on Python, several of which can be accessed online for free, either directly, or through your university.
Books by O'Reilly
- Think Python, 2nd Edition, by Allen B. Downey
- Python Pocket Reference, 5th Edition, by Mark Lutz
- Introducing Python, by Bill Lubanovic
- Python in a Nutshell, 3rd Edition, by Alex Martelli, Anna Ravenscroft, and Steve Holden
- Learning Python, 5th Edition, by Mark Lutz
- Python Cookbook, 3rd Edition, by David Beazley and Brian K. Jones
- The Hitchhiker's Guide to Python, by Kenneth Reitz and Tanya Schlusser
- Fluent Python, by Luciano Ramalho
- High Performance Python, by Micha Gorelick and Ian Ozsvald
- Web Scraping with Python, by Ryan Mitchell
- Python Data Science Handbook, by Jake VanderPlas
- Python for Data Analysis, by Wes McKinney
- Foundations for Analytics with Python, by Clinton W. Brownley
- Data Wrangling with Python, by Jacquiline Kazil and Katharine Jarmul
- Data Visualization with Python and Javascript, by Kyran Dale
- Natural Language Processing with Python, by Steven Bird and Ewan Klein
- Thoughtful Machine Learning with Python, by Matthew Kirk
- Python for Finance, by Yves Hilpisch
Books by No Starch Press
- Automate the Boring Stuff with Python, by Al Sweigart
- Python Crash Course, by Eric Matthews
- Python Playground, by Mahesh Venkitachalam
- Doing Math with Python, by Amit Saha
- Invent Your Own Computer Games with Python, by Al Sweigart
Other books
- Python Machine Learning, by Sebastian Raschka
- Practical Programming: An Introduction to Computer Science Using Python 3, by Paul Gries, Jennifer Campbell, and Jason Montojo
- Python for Dummies, by Stef Maruch and Aahz Maruch
- Python Essential Reference, 4th Edition, by David Beazley
- Head First Python, by Paul Barry
- Python for Data Science for Dummies, by John Paul Mueller and Luca Massaron
- Beginning Programming with Python for Dummies, by John Paul Mueller
- Python for Everybody, by Charles Severance