View source: R/plot.shotperformance.R
plot.shotperformance | R Documentation |
Plots a bubbleplot representing the data contained in the dataframe produced by the function 'shotperformance'
## S3 method for class 'shotperformance'
plot(x, title = "Shooting performance", ...)
x |
an object of class |
title |
character, plot title. |
... |
other graphical parameters. |
A ggplot2
object
Andrea Fox
P. Zuccolotto and M. Manisera (2020) Basketball Data Science: With Applications in R. CRC Press.
P. Zuccolotto, M. Manisera and M. Sandri (2018) Big data analytics for modeling scoring probability in basketball: The effect of shooting under high pressure conditions. International Journal of Sports Science & Coaching.
# Draw the plot for the performances on 2 point shots, when the high pressure situation is
# the one regarding shots taken when \code{shotclock} is between 0 and 2
PbP <- PbPmanipulation(PbP.BDB)
PbP <- scoredifference(PbP, team_name = "GSW", player_data=Pbox, team_data = Tadd)
PbP <- shotclock(PbP, sec_14_after_oreb = FALSE, team_data = Tadd)
players_perf <- shotperformance(PbP, shotclock_interval = c(0, 2),
player_data=Pbox, team_data = Tadd,
shot_type = "2P", teams = "GSW")
plot(players_perf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.