Data 101: Making Predictions with Data

Welcome

All of the course material can also be accessed through Canvas. The syllabus can be found in the Syllabus tab in the Navigation bar.

Lectures

Lectures will be uploaded here. Quarto includes a built in version of the reveal.js-menu plugin. You can access the navigation menu using the button located in the bottom left corner of the presentation. Clicking the button opens a slide navigation menu that enables you to easily jump to any slide.

Print/Save to PDF:

Reveal presentations can be exported to PDF via a special print stylesheet.

  1. Toggle into Print View using the E key (or using the Navigation Menu)
  2. Open the in-browser print dialog (CTRL/CMD+P).
  3. Change the Destination setting to Save as PDF.
  4. Change the Layout to Landscape.
  5. Change the Margins to None.
  6. Enable the Background graphics option.
  7. Click Save 🎉

Schedule

Lecture Topic Supplementary Reading
1 Welcome! Introduction To R and RStudio
2 Getting Familiar with R
3 R Programming: Comparison and Logical Operators, Conditionals: (e.g. if statements, else if statements), base R wrangling (e.g. conditional indexing), Loops
4 Getting data into R: File formats and location, Functions for reading data into R (read.csv() and read_csv()), Working Directories (absolute vs. relative paths, Dates and Times, the tidyverse package. Peng (2016) Ch 11
Timbers et al. (2022) Section 1.5
Wikham et al. (2023) Ch 6, 8
5 Data Wrangling with the dplyr functions: select, filter, arrange, rename, mutate, transmute, group_by, summarize and the piping operator (%>% and |>)
6 Data Wrangling Part 2 vignette("pivot") , Timbers et al. Chapter 3
7 Plotting with base R
8 Data Visualization with ggplot2

Timbers et al. Chapter 4

Extra resources: R graphics cookbook, posit basics,

9 Classification with k-nearest neighbours (KNN) Timbers et a. Chapter 5
10 Fitting and assessing KNN using tidymodels Timbers et a. Chapter 5/6.1-6.5
Review Session 2
11 Cross-validation Timbers Ch. 6
12 KNN regression Timbers Ch. 7
Review Session 3
13 Linear Regression Timbers Ch. 8
14 Clustering [R code] Timbers Ch. 9, tidymodels.org
Review Session 4

Labs

Lab number Topics Solutions
Lab 4/Assignment 3 Data wrangling + ggplot
Lab 5/Assignment 4 Classification
Lab 6/Assignment 5 Classification II: Evaluation + Tuning
Lab 7/Assignment 6 Regression Assignment 6
Lab 8 Linear Regression

References

Footnotes

  1. You can also open the navigation menu by pressing the M key.↩︎

  2. Note: This feature has only been confirmed to work in Google Chrome and Chromium.↩︎