Team Name: L1 Team Members: Conor McGrath, Tina Wang, Tiffany Tseng, Michael Mayor, Brock Gallagher
## Warning: package 'tidyverse' was built under R version 4.0.4
## 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.1 v dplyr 1.0.4
## v tidyr 1.1.2 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.3
## Warning: package 'tidyr' was built under R version 4.0.4
## Warning: package 'dplyr' 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: package 'plotly' was built under R version 4.0.4
##
## 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
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## `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")