Activity
Mon
Wed
Fri
Sun
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
What is this?
Less
More

Memberships

Athlete Lab

Public • 105 • Free

1 contribution to Athlete Lab
Coding Questions
Please ask or answers any coding questions you have! Anybody is welcome to contribute...please be respectful!
2
12
New comment Mar 14
2 likes • Mar 5
Hey everyone, I guess someone has to be the first one to ask a question. I am trying to create a spray chart within an app. I am using Colin's course data TestTrackMan. I can get the spray chart to show up in the app but will not filter through my inputs. I feel like this is a very simple fix I am just not getting. Here is my output coding. output$Spray_Charts <- renderPlot({ TestTrackMan%>% filter(BatterTeam == input$BatterTeam, Batter == input$Batter) ggplot(TestTrackMan, aes(x = (sin(pi/180*Bearing)*Distance), y = (cos(pi/180*Bearing)*Distance))) + geom_point(aes(color = ExitSpeed), size = 3) + scale_color_gradient2(low = "blue", high = "red", midpoint = mean(85))+ xlim(-295,295)+ylim(0,450)+ geom_segment(x = 0, xend = -315, y = 0, yend = 315, size = 1.2)+ geom_segment(x = 0, xend = 315, y = 0, yend = 315, size = 1.2) + geom_curve(x = -315, xend = 315, y = 315, yend = 315, curvature = -.35, size = 1.2)+ geom_curve(x = -90, xend = 90, y =88, yend = 88, curvature = -.45, size = 1.2)+ coord_fixed() + theme_bw()+ theme(plot.title = element_text(hjust = 0.5, face = "bold", size = 16))+ labs( color = " ", title = "Spray Chart")+ theme(axis.title.x = element_blank(), axis.title.y = element_blank())+ theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.background = element_blank()) }) }
0 likes • Mar 5
@Collin Murray yes, and to do some I double checked by highlighting them
1-1 of 1
Leo Sykucki
1
3points to level up
@leo-sykucki-9931
GSU Graduate with work experience in MiLB Stadium operations looking to move areas to player operations

Active 41d ago
Joined Mar 4, 2024
powered by