Week by week schedule
Contents
Week by week schedule#
Hereâs the schedule so far. The In class sections list the things weâll be doing in class that week. At home sections tell you what you should do at home before that weekâs class. For example, you should complete Exercise 1 at home prior to the Week 2 class.
This schedule is subject to update. I will be staying ahead of you by at least 2 weeks, meaning if you want to get an early start on the next 1 or 2 assignments, you can do it without worrying that something will change while you are working on it. If there an error, I will correct it and alert the class through Slack.
Prior to first class#
Sign up for the class Slack group. The link was sent to your @wisc email.
Follow âDownload and Installâ instructions (see sidebar on left). The instructions are slightly different depending on whether you have a PC or Mac.
If youâve never used a Linux shell (or Mac terminal), watch this video. Even if youâve used a terminal before, go through this basic linux commands notebook as a refresher.
Sign up for Github if you donât already have an account. We will be using the very basic capabilities of git: cloning, committing, checking out, and pushing.
If youâve never used git and github, I recommend walking through two tutorials: This one focuses on working with git locally. This one describes pushing and pulling from remote repositories. Confused about the difference between git and github? See here. This video walkthrough is also very nice.
If youâre shaky on what a computer file is, how files are stored, how your operating system knows that sound.wav is a sound file and sound.txt is a text file, watch this short video.
Lastly, please look through the very basics of Python notebook to get you ready for the first class. If you donât understand something in that notebook, donât worry about it, but come prepared to ask questions.
Week 1 (Sept 7): Getting oriented#
In class#
What do we do when we program?
How to run Python scripts.
Intro to Python and PsychoPy
Week 2 (Sept 14): Programming basics#
At home#
Submit test assignment by Friday (Sept 8) at 9pm.
Read Think Python Sections 1.1-1.8
Go through the first three self study guides on the class site (see the navigation pane on the left)
Read/skim Think Python Sections 5.1-5.7, 7.1-7.8, 8.1-8.12, and 10.1-10.9
Finish Exercise 1 and push it to your github classroom repository
Sort out any remaining installation/environment issues. Work on customizing your coding environment and learn some keyboard shortcuts!. Also see this helpful video
In class:#
Code review of Exercise 1
Special attention to variable names!!
Questions about self-study guides
Revisiting the exercise in algorithmic thinking from Week 1
Spend rest of the time working on Exercise 2
Week 3 (Sept 21)#
At home#
Go through and understand Review of Fundamentals A
Go through the Dictionaries and Intro to functions self-study guides.
Read about reading and writing files
Make sure youâve gone through the Primer on writing files
Read about writing readable code
Finish Exercise 2 while heeding the advice in the previous step.
Tip
You are encouraged to use the Linting feature of Visual Studio Code (I recommend pycodestyle) to help you write code that adheres to Python stylistic standards
In class#
Exercise 2 Code Review
More about functions
Randomization and iteration activities: creating simple trial lists
Week 4 (Sept 28)#
At home#
Go through the List Comprehension and Randomization/Iteration/trial generation self-study guides
I strongly recommend that you try out the dictionary exercises that we didnât get to in class
Read about Namespaces and variable scope
Complete Exercise 3
In class#
Review of importing & calling functions
Catching errors (exceptions) with try/except
Code review for Exercise 3
Some more practice with dictionaries
Intro to Exercise 4 - modularize your Exercise 3 code & add speech recognition!
Week 5 (Oct 5)#
At home#
Review exception handling
Review Fundamentals A - test yourself!!
Complete Exercise 4.
In class#
Warm-up debugging activity
Get together with another group and review Exercise 4 Code Review (25 mins; groups review each otherâs code)
Go through Exercise 4 solution
A little extra flourish - Saving state through pickling. Example code
Intro to (Exercise 5)
Working with external files (globbing and preloading)
Week 6 (Oct 12)#
At home#
Look carefully through
my_first_function_library.py
function library in the Exercise 5 repository and try to understand the code. Play with it. Explore.Finish Exercise 5, using appropriate functionality from
my_first_function_library.py
Ensure your R-studio environment works and that you have the following libraries installed:
tidyverse, broom, ggplot2, psych, psychTools, lme4
. R notebooks donât run that well inside Visual Code Studio, so weâll be running them inside R Studio instead.Generate stroop data for Exercise 4 by running yourself on the Stroop task:
git checkout Exercise_4_collect_data
from the solution repository (Exercise_4 branch) and runexercise_4.py
. Use your github name as the subject code andkey
as the response type. If you were born in an odd month (Jan, Mar, etc.) run yourself on .25 prop incongruent. Otherwise, run yourself on .50 incongruent. When the window opens, it will be maximized and the script will run you on 120 trials. Thereâs a break in the middle. Please try to do the best you can. Upload your data here. If you worked in a team Each team member should run themselves and upload their data.
In class#
Code review of Exercise 5
Data Wrangling Crash Course (1/3) - weâll start here a. Understanding the logic behind the tidyverse b. GGPlot plotting basics
Begin Exercise 6 - analyzing your Stroop data!
Week 7 (Oct 19)#
At home#
Finish Exercise 6. Make sure to include a knitted-to-HTML notebook along with your submission.
In class#
Review of Exercise 6
Graphing for insight: quick overview of some DOs and DONTâs of data visualization
Exploring the General Social Survey
Clone this repo
Week 8 (Oct 26th)#
At home#
Review data types and review Ordered vs. unordered factors.
Follow the instructions here to import all the GSS data using the
gssr
package (The reason I am directing you to an outside resource is that this mirrors real-world situations, so itâs important to get used to it).Finish Exercise 7
In class#
Review of Exercise 7: What was hard? What was interesting? What did you want to do, but didnât know how?
Brief discussion of final projects
Week 9 (Nov 2nd)#
At home#
Finish Exercise 8
Form a team for your project (2-3 people)
In class#
Review of Exercise 8
Intro to regular expressions
Intro to basic natural language processing
Week 10 (Nov 9th)#
At home#
Finish going through the regular expressions notebook (thereâs also a linked additional tutorial that you may want to look over).
Make sure the NLTK library is installed in your environment. If not, install using
pip install nltk
. Then in an interactive python window in the psych750 environment, execute the following
import nltk
nltk.download(["names", "stopwords", "state_union", "twitter_samples", "movie_reviews", "averaged_perceptron_tagger", "vader_lexicon", "punkt"])
Finish Exercise 9 and test your solutions to make sure they match the strings they should and donât match the strings they shouldnât.
In class#
Install pytest
pip install pytest
Review Exercise 9 with attention to unit testing.
Example of regular expressions on the command line
Introduction to Pythonâs Natural Language ToolKit (NLTK)
Quick case study of using NLTK to access WordNet
Begin Exercise 10
Week 11 (Nov 16th)#
At home#
Look over this intro to NLTK tutorial.
Look over this more extended tutorial to using WordNet with NLTK
Optionally, look over this tutorial of sentiment analysis with NLTK
Finish Exercise 10
In class#
Review Exercise 10
Runtime and memory considerations (intro to the Big O)
Introduction to classes and object-oriented design
Week 12 (Nov 23rd)#
No class! Happy Thanksgiving! đŚ#
Week 13 (Nov 30th)#
At home#
Finish going through the classes notebook
Finish Exercise 11
Schedule brief in-person or zoom meeting with me to check in on project progress.
In class#
Review of Exercise 11
Intro to webscraping
Webcraping with Beautiful Soup in-class activity
Example of scraping images from Bing Search
Using APIs (Case study: PRAW)
Week 14 (Dec 7th)#
At home#
Work on Projects
In class#
Project presentations: Prepare a 7-8 minute presentation (10 minute slots including Q&A). For experiment projects, your presentation should include a rationale, a demo of your experiment, what you are hoping to learn from it. Feel free to also mention what challenges you faced implementing it. For data-analysis projects, your presentation should likewise include rationale (why did you pick to analyze these data), a walk through of your findings, and a discussion of next steps if you were to pursue this project at a larger scale.
A few tips for an effective presentation:
Tip
Remember that the slides are for the audience, not for you. You should not be reading from your slides and should limit text (ideally, to a title, axis labels, and a few take home points at the end.
Make sure what you show is legible. Make it big!
For a short presentation like this, you donât need an outline telling us what youâre going to be telling us. Just get right into it.
Try to think about each slide from the audienceâs perspective. Will they understand it given what youâve told them so far? Is the following slide answering the question they are likely to have next?
Humans love stories. Your presentation should have a narrative arc.
Have fun with it! If youâre having fun giving it, the audience will have fun listening.
Project submission info#
Due date for the final project materials is Dec 16th 9pm. Accept the assignment on GitHub Classroom.
For experiment projects, your submission should include your presentation slides, executable experiment code and necessary materials, and a brief (think 2-3 pages at most) narrative explaining the project rationale and design. Your code should be written adhereing to the PEP8 style guide. Make sure to use informative variable names. Document your functions using DOCSTRINGS. Regular python comments should be reserved for code that you think is not self-explanatory.
For data-analysis projects, your submission should include your presentation slides, raw data that youâre working with, R (or Python) notebooks both raw and compiled/knitted (HTML or PDF). If youâre using R, use Rmd. If youâre using Python, use Jupyter (.ipynb). I personally recommend using Python for pre-processing your data and sticking with R for actual analysis. The markdown file should contain sufficient narrative to explain your analyses and graphs. Please do not just have a sequence of R code blocks. Include text above/below explaining whatâs going on, sequencing it in a logical way so that a reader can proceed from the beginning and understand what each analysis and graph that follows is conveying. Please do organize the markdown file neatly using nested headings (#, ## etc.). For compactly reporting several very similar results, using tabsets is a good idea.