sportvu_df: Convert SportVU json to Data Frame.

Description Usage Arguments Value Examples

View source: R/sportvu_df.R

Description

Convert SportVU json file of NBA player tracking data to a data frame. Note, due to the size of the player tracking data a single game can take a few minutes to convert.

Usage

1
sportvu_df(path)

Arguments

path

Path to SportVU json file as a string.

Value

A data frame that includes motion tracking information for a game. Variables quarter, game_clock, and shot_clock are self explanatory. Variables x and y denotes the spatial location of the ball, and z denotes the height of the ball. For the remaining variables, the first letter in the variable name is either a for the away team or h for the home team. Variables a*_team and a*_ent are the team and player identifiers. The spatial coordinates of each player are denoted by a*_x and a*_y.

Examples

1
2
3
4
## Not run: 
game <- sportvu_df("~/path_to_file/0021500411.json")

## End(Not run)

imadmali/NBAsportvu documentation built on May 17, 2019, 9:12 a.m.