The workshop will run from January 8th to 10th before spring classes begin. This three-day workshop will provide the students with no prior experience the basic programming skills required to take full advantage of YSE course offerings. The workshop will heavily focus on the programming language R, but it will introduce students to version control with GitHub (something that should be used with any programming project) and introduce students to Python (to demonstrate that the fundamental concepts hold across any programming language).
Each day will consist of two lectures in the morning (60-90 minutes with a 30-minute break between), a mini problem set to practice the skills being learned, and open office hours in the afternoon for students to ask clarifying questions.
- Class time: 9:00 to 12:30, with a 30-minute break around 10:30
- Room: G01 in Kroon
The workshop is prepared and taught by Andie Creel.
- andie.creel@yale.edu
- Office hours: 2 - 5 pm
- Office: Sage 8A
The teaching fellow is Eliana Stone
- Lecture one: Thinking Like A Computer
- what's programming
- definitions
- problem definition and solution
- why code
- pseudo-code
- debugging
- Lecture two: Base R
- write and run scripts
- basic data types
- ways to make collections of data
- variable assignment
- Functions
- Loops
- If Else statements
- Script written during class
-
Lecture three: Data Manipulation with Tidyverse
if_else()mutate()filter()select()group_by()summarize()left_join()pivot_longer()pivot_wider()
-
Lecture four: Data Management and Visualization
- find data here
- Creating and R Project
- File Structure
- Importing Data
- Data Visualization
- Results Export
- Best Practices for Data Vis
-
Lecture Five: Coding is Coding
- Same material as Lecture 2, but in Python
-
Lecture Six: Version Control with GitHub
- Why use GitHub
- Create a GitHub account
- Install, Set Up and Integrate Git with R Studio
- "Clone" a GitHub "Repository" to your local machine
- Make change, write commit messages and "push" back to GitHub
- "Pull" changes from GitHub to local computer
- "Fork" someone's GitHub Repository so you can make changes to their files locally
-
Bonus Lecture Seven: Data Cleaning and Visualization in Python (notes only)
Navigate to the problem set folder to find the pdf and r markdown versions of the mini problem sets. They are designed to take around one hour and no more than two hours.