The following sports are supported by collegeballR
library(dplyr) library(huxtable) library(collegeballR) table <- huxtable(sport_df,add_colnames = T) %>% theme_article %>% set_top_border(1, 1, 1) caption(table) <- "Table 1. Sports supported by collegeballR" table
The team mapping function helps identify the team_id associated with specific teams for different sports. This is vital to know when using player_stats
or team_stats
.
teams <- team_mapping(2016,"Men's Basketball") head(teams,6)
Let's look at a quick example for the Texas A&M Women's Soccer team.
tamu_ws <- team_stats(697, 2015, "Women's Soccer",by="Season") table2 <- huxtable(tamu_ws,add_colnames = T) %>% theme_article %>% set_top_border(1,1,1) caption(table2) <- "Table 2. TAMU Women's Soccer 2015" wrap(table2) <- TRUE table2
Here is a simple example of how to extract player stats, you can navigate to the other vignette for a more advanced example using purrr.
tamu_p_mbb <- player_stats(697, 2015, "MBB",by="Season") table3 <- huxtable(tamu_p_mbb,add_colnames = T) %>% theme_article %>% set_top_border(1,1,1) caption(table3) <- "Table 3. TAMU Men's Basketball 2015 - Player Stats" wrap(table3) <- TRUE table3
```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.