nba_density: NBA Schedule Density

View source: R/NBA_density.R

nba_densityR Documentation

NBA Schedule Density

Description

Accepts the result of 'nba_travel()' & returns a dataframe with some common arbitrary schedule density related metrics such as back-to-back(b2b), 3in4, 4in5, etc.

Usage

nba_density(df)

Arguments

df

A dataframe. The object storing the result of 'nba_travel()'

Value

A data frame with the following columns:

Season

A chracter string. The season(s) downloaded.

Phase

A character String. The phase of the season. RS or PO.

Date

Date object. The date of the game.

Team

A character String. The name of the team.

Opponent

A character String. The name of the opponent.

Location

A character string. Location of the game. (Home or Away)

'W/L'

A character string. Outcome of the game. (W or L)

'B2B'

A character string. B2B-1st (first game in B2B games) or B2B-2nd (second game in B2B games.)

'B2B-1st'

A character string. If yes, it is the first game of a back-to-back.

'B2B-2nd'

A character string. If yes, it is the second game of a back-to-back.

'3in4'

A character string. If yes, it is the third game in 4 days.

'4in5'

A character string. If yes, it is the fourth game in 5 days.

'5in7'

A character string. If yes, it is the fith game in 7 days.

Examples

datos <- nba_travel()
nba_density(df = datos)


josedv82/airball documentation built on June 27, 2023, 2:51 p.m.