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 presentation1. 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.
- Toggle into Print View using the
E
key (or using the Navigation Menu) - Open the in-browser2 print dialog (CTRL/CMD+P).
- Change the Destination setting to Save as PDF.
- Change the Layout to Landscape.
- Change the Margins to None.
- Enable the Background graphics option.
- Click Save 🎉
Schedule
Lecture |
TopicWelcome! Introduction To R and RStudio |
Supplementary Reading |
|
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 |
Labs
Lab number | Topics |
---|---|
Lab 4/Assignment 3 | Data wrangling + ggplot |
Lab 5/Assignment 4 | Classification |
Lab 6/Assignment 5 | Classification II: Evaluation + Tuning |
References
- Timbers, T., Campbell, T., Lee, M. (2022). Data Science: A First Introduction. United States: CRC Press. https://datasciencebook.ca/
- Grolemund, G. (2014). Hands-On Programming with R: Write Your Own Functions and Simulations. United States: O’Reilly Media. https://rstudio-education.github.io/hopr/
- Wickham, H., Grolemund, G. (2016). R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. United States: O’Reilly Media. https://r4ds.had.co.nz/
- Wickham, H., Çetinkaya-Rundel, M., Grolemund, G. (2023). R for Data Science: Import, Tidy, Transform, Visualize, and Model Data. (2e). United States: O’Reilly Media. https://r4ds.hadley.nz/
- Peng, R. D. (2016). R Programming for Data Science. United States: Lulu.com. https://bookdown.org/rdpeng/rprogdatascience/
- Xie, Y., Dervieux, C., Riederer, E. (2020). R Markdown Cookbook. United States: CRC Press. https://bookdown.org/yihui/rmarkdown-cookbook/
Footnotes
You can also open the navigation menu by pressing the
M
key.↩︎Note: This feature has only been confirmed to work in Google Chrome and Chromium.↩︎