r— title: “Points Earned & Time Spent” author: “Jessica Bethea” date: “October 3, 2022” output: html_document: code_folding: hide code_download: TRUE —

library(tidyverse)

data_to_viz <- read_csv("data/data-to-explore.csv")

p <- ggplot(data_to_viz) +
  geom_point(aes(x = time_spent, y = total_points_earned, color = subject))
  
p + ylim(0, 2500) + 
facet_wrap(~subject, ncol = 3) + 
labs(title = "Total Points Earned vs. Time Spent", 
     y = "Total Points Earned", 
     x = "Time Spent on Course", 
     caption = "Is there a correlation between the time spent and the total points earned?") + 
  
theme_minimal() + 
scale_color_brewer(palette = "Spectral") + 
theme(legend.position = "none") 

The scatter plots above show the correlation between total points earned and time spent on course for each of the five subjects. Though there are some outliers, there is an overall positive correlation between the two variables, meaning that as the time spent in the course increases, so does the total points earned. Further analysis is needed to determine more information regarding the outliers, as well as if there are any activities that are being done outside of the online course that may directly contribute to grades.