get_bio: Get player biography data

Description Usage Arguments Details Value See Also Examples

Description

Retrieves the player biography data from stats.nba.com subject to the filters recognised by statsnbaR, and returns it as a data.frame.

Usage

1
get_bio(filters = filter_bio(), method = NULL, ...)

Arguments

filters

A named list of key-value filters constructed by filter_bio. Full list of avaiable filters that statsnbaR recognises is given in the documentation the filter constructor.

method

Optional user-supplied function to retrieve JSON from stats.nba.com

Details

Provides player data given as per-season measurements. For a given league and season, this will return basic and advanced statistics for all the active players.

The query filters are constructed by the filter_bio function. The list of filters available is given in the documentation for that constructor. The units that the values/data is aggregated into is determined by the per filter, which can be set to either total for the total values or game for per-game values. This won't affect the percentage statistics returned.

The filters may include season segments, such as the playoffs, date filters or versus opponents and so on, and the values returned will reflect the performance and data collected in only those selected periods or whatever filter is applied.

Value

A data.frame containing the player biography data with columns converted to the data types specified by statsnbaR's internal YAML.

person_id

integer - ID of the player, used in many other datasets

player_name

character - the player's first and last name

team_id

integer - the team_id of the team the player plays for according to the season selected (see filter_bio)

team_abbr

character - abbreviated team name

age

integer - age of player in the season selected (see filter_bio)

height

integer - listed player height in inches

weight

integer - listed player weight in lbs

college

character - name of college or prior affiliation

country

character - name of country of origin of player

draft_year

integer - year player was drafted (NA if undrafted)

draft_round

integer - round player was drafted in (NA if undrafted)

draft_number

integer - number player drafted at (NA if undrafted)

games

numeric - games played within the selected filters

All other returned columns are described in the glossary provided at http://stats.nba.com/help/glossary.

See Also

http://stats.nba.com/help/glossary/

Examples

1
2
3
4
5
## Not run: 
    df <- get_bio(filter_bio(season=2014))
    tail(df)

## End(Not run)

stephematician/statsnbaR documentation built on May 30, 2019, 3:17 p.m.