For this lab you will create a .zip
file called lab09.zip
which contains the following:
lab09.Rmd
- An RMarkdown file.lab09.html
- The results of knitting the RMarkdown file.lab09.Rproj
- An RStudio project file.data
- A directory containing data used in the exercises.Submit your lab (the .zip
file) to the corresponding assignment on Canvas. You have unlimited attempts before the deadline. Your final submission before the deadline will be graded.
Grading of this lab will largely be based on the ability of the grader to access and run your code. That is, the grader should be able to unzip your lab09.zip
file, open lab09.Rproj
, then finally open and knit lab09.Rmd
without any modification or errors. If they are able to do so, and the resulting lab09.html
contains the graphics described below, you will receive at least nine of the ten possible points for the lab.
The following video describes how to create all of the files described above. It will also walk through each of the exercises and describe and least one valid solution.
Before creating lab09.Rmd
you should first create an RStudio Project named lab09
. (The video above will demonstrate this.) This will also create a folder named lab09
. Create lab09.Rmd
and place it inside this folder. Additionally, create another folder named data
inside this folder.
Add the following code to your .Rmd
file which will load the tidyverse
. Throughout this lab you may need functions from dplyr
and ggplot2
.
library(tidyverse)
The purpose of this exercise is to demonstrate importing data using a package. To complete this exercise, first import the 2020 NFL Schedule into an R object named nfl_2020
.
load_schedules
function from the nflreadr
package.Next, create a graphic of your choice using ggplot2
with this data.
The purpose of this exercise is to demonstrate importing data from a file on the web. To complete this exercise, first load the GPA Data from the following GitHub repo into an R object named gpa
:
This data is used in Wade Fagen-Ulmschneider’s Grade disparity between sections at UIUC interactive data visualization.
Next, create a graphic of your choice using ggplot2
with this data.
The purpose of this exercise is to demonstrate importing data from a file locally. First, download the data here:
This data was originally downloaded from Open Powerlifting. Some subsetting was done to reduce the scope of the data.
Next, place the downloaded file within the data
folder you created in the setup exercise. Load this data into an R object named ipf
.
Lastly, create a graphic of your choice using ggplot2
with this data.
The purpose of this exercise is to demonstrate importing data from a file locally. First, download the data here:
This data was originally downloaded from the Illinois COVID-19 Testing Dashboard.
Next, place the downloaded file within the data
folder you created in the setup exercise. Load this data into an R object named covid
.
Lastly, create a graphic of your choice using ggplot2
with this data.