ggbasketball: 'ggplot2' Based Visualization of Basketball Data
This package provides easy plotting for basketball data.
Install from Github:
if(!require(devtools)) install.packages("devtools")
devtools::install_github("ys-xue/ggbasketball")
ggcourt(orientation = "wide")
# simple shot chart
data(shotdata)
harden <- shotdata[shotdata$Name == "James Harden", ]
ggshotchart(harden, x = "loc_x", y = "loc_y")
#' # vary the color and shape by shot result
#' ggshotchart(harden, x = "loc_x", y = "loc_y", result = "result_str")
# with contours
ggshotintensity(green_intensity, x = "x", y = "y", value_col = "mean")
-
Hu, G., Yang, H.C., Xue, Y. (2020) Bayesian Group Learning for Shot Selection
of Professional Basketball Players. Stat 10(1), e324
-
Hu, G., Yang, H.C., Xue, Y., Dey, D.K. (2021) Zero Inflated Poisson Model with Clustered Regression
Coefficients: an Application to Heterogeneity Learning
of Field Goal Attempts of Professional Basketball. Canadian Journal of Statistics, forthcoming
-
Jiao, J., Hu, G., Yan, J. (2021) A Bayesian Marked Spatial Point Processes Model for
Basketball Shot Chart. Journal of Quantitative Analysis in Sports 17(2)