Graph
Two variables have been used for the scatter plot. 1. Average Points per game (X Axis). 2. Total games won during the regular season (Y Axis).
The graph contains data for all teams from both conferences from 2009-2010 to 2017-2018 regular seasons.
Most successful teams have been Golden State Warriors and Houston Rockets with the highest number of victories and average points per season.
Ggplot Code
p<- ggplot(data,aes(x=PTS, y=W, group=Conference, colour= Conference,
text =paste('Team: ', TEAM,'</br>Season:', Season_1,
'</br>Points: ', PTS,
'</br>Wins: ', W)))
+ geom_point()
+ scale_colour_brewer(palette="Set1")
+ ggtitle('NBA Team Analysis - Wins VS Points') + xlab('Points') + ylab('Wins')
+ theme(legend.title=element_blank())
+ geom_smooth(method = loess, method.args = list(family = "symmetric"), se=FALSE)
graph<- ggplotly(p, tooltip=c("text", "colour"))
R Packages used
optional caption text
Code, questions and feedback
The code for this article is publish in my github account.
For RPubs link. Resolution is not great.
Please feel free to reach out for any question or feedback.