Description Usage Arguments Details Value See Also Examples
Retrieves all team game logs from stats.nba.com for a given season and league.
1 | team_game_logs(league, season, season_type, method = NULL, ...)
|
league |
A character value of league e.g. 'nba', 'd-league'. |
season |
A numeric value of the base season, e.g. 2015 for the 2015-2016 season and so on. |
season_type |
A character value for the type of season, valid types are
|
method |
Optional user-supplied function to retrieve JSON from stats.nba.com |
This function returns a set of measurements of a team for each game in a
given league
, season
and season_type
which indicates
whether to query the regular season, playoffs, allstar game or preseason.
All games will be returned twice, one for the home team entry and the other
for the away team.
Each game returned has a unique game_id
which can be used for queries
to play-by-play or shot-chart datasets.
The team statistics returned are given as total values for the game.
A data.frame containing the data for each game and team with columns converted to the data types specified by statsnbaR's internal YAML.
integer - an id code for the season, e.g. 22015 for the 2015-16 regular season, 12015 for the pre-season and so forth
integer - unique identifier of the team
character - abbrev. name of the team
character - name of team that player belonged to in the game
numeric - unique numeric identifier of the game
date - date game was played (or scheduled)
logical - home (true) or away game (false)
logical - win for the team (true) or loss (false)
numeric - minutes the team played on court in game
All other returned columns are described in the glossary provided at http://stats.nba.com/help/glossary.
player_game_logs
http://stats.nba.com/help/glossary
1 2 3 4 5 6 7 | ## Not run:
df <- player_game_logs(league='nba',
season=2013,
season_type='playoffs')
tail(df)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.