Description Usage Arguments Value Examples
Creates a boxplot of the categorical variable of interest on the y-axis and the stat of interest on the x-axis.
1 | nba_boxplot(dataset, position = NULL, teams = c(NULL), stats)
|
dataset |
dataframe This dataframe is created after using the nba_scraper.R function or if the csv has already been loaded, read the csv in and pass it as the parameter. |
position |
string To specify as "POS" if you want to look at Position boxplot. |
teams |
string The names of teams you want to create boxplot for. *Note you can only choose one of position or teams as a variable to vizualize |
stats |
string The numeric variable of interest examples: Points, 3_Pointers, Turnovers |
ggplot boxplot
1 2 | nba_2018 <- data.frame(POS= c("C", "FOR", "PO","FOR", "C"), Team = c("ORL", "UTAH", "LAC", "MIN", "BOS"), GP = c(3, 5, 5, 2, 1))
nba_boxplot(nba_2018, position= "POS", teams= NULL, stats= "GP")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.