Directions

For this lab, you will create a single .R file called lab08.R. The following exercises will ask you to write code. Place all requested code in this .R file separated by comments which indicate which code corresponds to which exercise.

Submit your lab to the corresponding assignment on Canvas. You have unlimited attempts before the deadline. Your final submission before the deadline will be graded.


Grading

This lab will be graded largely based on completion.


Exercise 1 (Scorigami)

To complete this lab, you should first watch this video which will present some necessary background:

Next, explore the visualization in a more static website format:

Lastly, follow along as Dave walks through the “lab” which is to re-create the visualization discussed in the above video:

The following code is referenced in the video and should be included in your .R file. After that, you can follow along and submit the code written in the video, but also consider adding some of your own variations.

library(tidyverse)
nfl = nflreadr::load_schedules(seasons = 1999:2021)
impossible = tibble(
  los_score = c(0, 1, 1, 1, 1, 1, 1),
  win_score = c(1, 1, 2, 3, 4, 5, 7)
)

for (i in 0:100) {
  temp = tibble(
    win_score = i,
    los_score = (i + 1):100
  )
  impossible = bind_rows(impossible, temp)
}