library(RSelenium)
## Warning: package 'RSelenium' was built under R version 4.4.3
library(rvest)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(xml2)
library(tidyr)
library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.4.2
## Warning: package 'ggplot2' was built under R version 4.4.3
## Warning: package 'lubridate' was built under R version 4.4.2
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats   1.0.0     ✔ readr     2.1.5
## ✔ ggplot2   3.5.1     ✔ stringr   1.5.1
## ✔ lubridate 1.9.4     ✔ tibble    3.2.1
## ✔ purrr     1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter()         masks stats::filter()
## ✖ readr::guess_encoding() masks rvest::guess_encoding()
## ✖ dplyr::lag()            masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors

First, I would like to provide you an opportunity to make powerful visualizations based on a broad prompt so that you can make what you want to make. Second, I want you to have a broad prompt so that you have lots of room to be intentional about your design choices. Third, I want you to have an exemplary piece of data visualization which you can include in a portfolio or personal website if you would like to do so when applying for jobs, graduate school, or other opportunities. What you’ll submit Your goal here is to tell a true story with data which is persuasive. You may use data that already exist or you may collect your own data. I’ll note here that since this is a large project, picking data that are interesting to you is especially important. Different stories will have different scopes, but I’d like for you to plan ahead when considering the size of your data. A rule of thumb is that you’ll want at least fifty observations of at least four quantitative and at least four categorical variables (and potentially MANY more of each). This project will be completed individually due to the third purpose listed above. You’ll submit your choice of either a poster (in PDF form) or a blog-style document (this would probably be html-based using Rmarkdown). Your submission will contain at least eight separate pieces of visualization. Two of these visualizations should be Shiny Apps with meaningful interactivity, at least one should be an animation, and at least one should be made using Plotly or Tableau. By this, I do not mean repeating the same plot in animated and non-animated ways to count as two plots, but rather eight distinct visualizations. Not all plots must come from the exact same dataset, but there should be a strong story that connects all the parts of your project. If you choose to include especially simple visualizations, your total number of visualizations should be higher than eight. The pdf or html document that you submit should have little or no visible code (in chunks or otherwise). You’ll submit a second file which contains all of the code you used to create each visualization, and a third file which explains a bit more about the intentional choices that you made in your visualizations. This last file can be no longer than six double-spaced (or three single spaced) pages, but it may have a list of sources used that do not count towards your page count. Keep track of your sources as you go! More on that in the AI and sources section below

dataset <- read.csv("C:/Users/julia/Downloads/STAT3280Project.csv", header = T)
dataset <- dataset[,-c(30:46)]
dataset$Date <- as.Date(dataset$Date, format = "%m/%d/%Y")
dataset <- dataset[-c(94,155,271,394,201,282,333,229,231),]
dataset %>% summarize_all(n_distinct)
##   Group Comp Date Class E_Judge EV EE  ET M_Judge MV ME  MT D_Judge DC DE DT
## 1   106   11   11     8       8 51 50 232       6 48 49 230       6 49 50 86
##   G_Judge1 GR1 GP1 GT1 G_Judge2 GR2 GP2 GT2  GT  ST Pen_Judge Pen Total
## 1       10  52  54  94       10  53  54  94 155 361         5  28   361
class_order <- c("IO", "IA", "SA1", "SA2", "SA3", "SRA1", "SRA2", "MS")
dataset$Class <- factor(dataset$Class, levels = class_order)

# dataset %>%
#   summarize(n_unique = n_distinct((across(c(E_Judge, M_Judge, D_Judge, Pen_Judge, G_Judge1, G_Judge2)))))
# 
# unique(c(dataset$Pen_Judge))

Score Distribution by Class

ggplot(dataset, aes(x = Class, y = Total, fill = Class)) +
  geom_violin() +
  labs(title = "Score Distribution by Class", y = "Total Score",
       subtitle = "AIA Winter Guard 2025") + 
  theme(legend.position = "none", 
        axis.text=element_text(size=12), 
        axis.title = element_text(size = 13),
        title = element_text(size = 15))