get_season: Scrape NBA player data by season

Description Usage Arguments Value Examples

View source: R/get_season.R

Description

This function retrieves NBA player data for a specific season, specified by year. There will be one row per player X team combination. That is, if a player played for multiple teams in one season, they will show up on multiple rows (one row for each team).

Usage

1
get_season(year)

Arguments

year

Which season do you want data for? If you want the 2016-2017 data, use the latter year (2017).

Value

A data.frame with a row for each player X team combo in that season.

The columns include:

player

Player name

pos

Position

age

Age in years

tm

Team

g

Games played

gs

Games started

mp

Minutes played

fg

Field goals made

fga

Field goals attempted

fg_pct

Field goal shooting percentage

three_p

Three point shots made

three_pa

Three point shots attempted

three_p_pct

Three point shooting percentage

two_p

Two point shots made

two_pa

Two point shots attempted

two_p_pct

Two point shooting percentage

efg_pct

Effective field goal percentage (adjusts for fact that 3 pointers are worth one more point than two pointers)

ft

Free throws made

fta

Free throw attempts

ft_pct

Free throw percentage

orb

Offensive rebounds

drb

Defensive rebounds

trb

Total rebounds

ast

Assists

stl

Steals

blk

Blocks

tov

Turnovers

pf

Personal fouls

pts

Points made

start_year

Year season began

end_year

Year seson ended

Examples

1
d <- get_season(2010)

mbjoseph/bbr documentation built on May 22, 2019, 12:20 p.m.