NBA Compare

Carlos Mercado

July 17, 2017

Definitions

“Game Score was created by John Hollinger to give a rough measure of a player’s productivity for a single game. The scale is similar to that of points scored, (40 is an outstanding performance, 10 is an average performance, etc.).”

The Pitch

Slide with R Output

library(ggplot2)
#Taken directly from the Shiny App 
dataURL <- "https://raw.githubusercontent.com/RafaJones/NBA/master/allNBA.csv"
download.file(dataURL, destfile = "./allNBA.csv")
allNBA <- read.csv("./allNBA.csv",stringsAsFactors = FALSE)
allNBA <- allNBA[,c(10,31,33)]
colnames(allNBA) <- c("Results","GameScore","Player")
allNBA <- as.data.frame(allNBA)

g <- ggplot(aes(x = GameScore, y = Results, color = Player), data = allNBA)
        gg <- g + geom_point() + geom_smooth(method = "lm") + labs(title = "Is Basketball a Team Game?",
                                                      x = "Individual Game Score",
                                                      y = "Point Difference")

Slide with Plot

# See the NBA Compare Shiny APP to get interactive features!
gg