View source: R/bref_player_game_log.R
| bref_player_game_log | R Documentation |
Get a player's game-by-game log for a season from Basketball-Reference.
No API key is required. Basketball-Reference rate-limits aggressive scraping
(~20 requests/minute) – space repeated calls with Sys.sleep().
bref_player_game_log(player_id, season = most_recent_nba_season())
player_id |
(character required): Basketball-Reference player id slug
(e.g. |
season |
(integer required): Season, in 4-digit ending-year format
(e.g. |
A hoopR_data tibble with one row per regular-season game (column
names are Basketball-Reference data-stat keys):
| col_name | types | description |
| ranker | integer | Season game number. |
| player_game_num_career | integer | Career game number. |
| date | character | Game date. |
| team | character | Team abbreviation. |
| location | character | @ for away games, empty for home. |
| opp | character | Opponent abbreviation. |
| result | character | Result with final score (e.g. W (+12)). |
| is_starter | integer | 1 if the player started. |
| mp | character | Minutes played. |
| pts | numeric | Points. |
| trb | numeric | Total rebounds. |
| ast | numeric | Assists. |
| game_score | numeric | Hollinger game score. |
| plus_minus | numeric | Plus/minus. |
| player_id | character | Player id (echoes the player_id argument). |
| season | integer | Season (echoes the season argument). |
Full shooting / box columns (fg, fga, fg_pct, fg3, ft, orb,
drb, stl, blk, tov, pf, ...) are also returned.
Other Basketball-Reference Functions:
bref_awards(),
bref_draft(),
bref_injuries(),
bref_player_bios(),
bref_players_stats(),
bref_standings(),
bref_team_roster(),
bref_teams_stats()
try(bref_player_game_log(player_id = "jokicni01", season = 2024))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.