View source: R/bref_teams_stats.R
| bref_teams_stats | R Documentation |
Get team season statistics from Basketball-Reference.
Scrapes a team stat table from the league season page. No API key is required.
Basketball-Reference rate-limits aggressive scraping (~20 requests/minute) –
space repeated calls with Sys.sleep().
bref_teams_stats(season = most_recent_nba_season(), table = "per_game")
season |
(integer required): Season, in 4-digit ending-year format
(e.g. |
table |
(character optional): Which team table to return. One of
|
A hoopR_data tibble with one row per team (columns vary by table;
common identifying columns shown – names are Basketball-Reference
data-stat keys):
| col_name | types | description |
| ranker | integer | Row rank. |
| team | character | Team name. |
| g | integer | Games played. |
| mp | numeric | Minutes played. |
| pts | numeric | Points (scaled to the chosen table). |
| season | integer | Season (echoes the season argument). |
Other Basketball-Reference Functions:
bref_awards(),
bref_draft(),
bref_injuries(),
bref_player_bios(),
bref_player_game_log(),
bref_players_stats(),
bref_standings(),
bref_team_roster()
try(bref_teams_stats(season = 2024, table = "per_game"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.