Team Name: L1 Team Members: Conor McGrath, Tina Wang, Tiffany Tseng, Michael Mayor, Brock Gallagher
## Registered S3 methods overwritten by 'tibble':
## method from
## format.tbl pillar
## print.tbl pillar
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.3 v purrr 0.3.4
## v tibble 3.0.3 v dplyr 1.0.2
## v tidyr 1.1.3 v stringr 1.4.0
## v readr 1.3.1 v forcats 0.5.1
## Warning: package 'ggplot2' was built under R version 4.0.4
## Warning: package 'tidyr' was built under R version 4.0.4
## Warning: package 'forcats' was built under R version 4.0.4
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
## Warning: Missing column names filled in: 'X20' [20]
## Parsed with column specification:
## cols(
## .default = col_double(),
## last_name = col_character(),
## first_name = col_character(),
## X20 = col_logical()
## )
## See spec(...) for full column specifications.
## Warning: Missing column names filled in: 'X20' [20]
## Parsed with column specification:
## cols(
## .default = col_double(),
## last_name = col_character(),
## first_name = col_character(),
## X20 = col_logical()
## )
## See spec(...) for full column specifications.
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
ggplot(BaseballFinal, aes(x=EVDiff, y=HRperABDiff)) + geom_point(aes(color=AvgHR)) + geom_smooth() + scale_color_manual(values = c("red", "green")) + theme_minimal()## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
ggplot(BaseballFinal, aes(x=LADiff, y=HRperABDiff)) + geom_point(aes(color=AvgHR)) + geom_smooth() + scale_color_manual(values = c("red", "green")) + theme_minimal()## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
ggplotBB3 <- ggplot(BaseballFinal, aes(text = paste("Player Name:", Name, "<br>Change in HR per AB ratio:", HRperABDiff, "<br>Change in Avg EV:", EVDiff, "<br>Change in Avg LA:", LADiff, "<br>Avg HR:", AvgHR), x=EVDiff, y=LADiff, color = AvgHR)) + geom_point() + scale_color_manual(values = c("red", "green")) + ggtitle("Effects of Launch Angle and Exit Velocity", subtitle = "Source: Baseball Savant") + theme_minimal()
ggplotly(ggplotBB3, tooltip = "text")