get_playtype: Download Playtype data for Players and Teams

Description Usage Arguments Value Author(s) Examples

View source: R/get_playtype.R

Description

Download and process NBA.com Playtype data from http://stats.nba.com/players/playtype/isolation/

Usage

1
2
3
4
5
6
7
8
9
get_playtype(
  season,
  type,
  playtype,
  type_grouping = "offensive",
  season_type = "Regular+Season",
  per_mode = "PerGame",
  verbose = TRUE
)

Arguments

season

Number of the year in which season started

type

Specify if data is for Team or Player c("P,"T")

playtype

Pick one of the playtypes provided by stats.nba.com. c("Postup","Transition","Isolation","PRBallHandler","PRRollman","Spotup","Handoff","Cut","OffScreen","OffRebound","Misc")

type_grouping

Specify if data is for offensive or defensive side of the floor. c("offensive","defensive") Warning! 'Transition','Cut','OffRebound', 'Misc' do not work for defensive!

season_type

Choose data for preseason, regular season or postseason ("Regular+Season","Playoffs")

per_mode

Specify PerGame or Totals c("PerGame","Totals")

verbose

Defalt TRUE - prints additional information

Value

Dataset from stats.nba.com

Author(s)

Patrick Chodowski, Chodowski.Patrick@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
get_playtype(2018,"P","Isolation")

season <- 2016
type_grouping <- c("offensive","defensive")[1]
type <- c("P","T")[1]
per_mode <- c("PerGame")[1]

playtype <- c("Postup",
              "Transition",
              "Isolation",
              "PRBallHandler",
              "PRRollman",
              "Spotup",
              "Handoff",
              "Cut",
              "OffScreen",
              "OffRebound",
              "Misc"
              )[1]

season_type <- c("Regular+Season","Playoffs")[1]

df <- get_playtype(Season,Type,Playtype,TypeGrouping,SeasonType,PerMode)

PatrickChodowski/NBAr documentation built on April 20, 2021, 10:21 p.m.