shotChart: Build a shot chart for a player

Description Usage Arguments Value Examples

Description

This function builds a shot chart from either the specified data frame or the specified parameters.

Usage

1
shotChart(d = NULL, params = NULL, color = "EVENT_TYPE")

Arguments

d,

a data frame resulting from a call to getGenericData("shotchartdetail", ...)

params,

a list of parameters for a call to "shotchartdetail" (see getEndpointParams("shotchartdetail") for valid options). Not all need to be specified as defaults will be used for unspecified parameters.

color,

the attribute on which to color the data points in the shot chart passed as a character vector

Value

A list containing a ggplot object with the shot chart and a data frame containing the raw data from which the shot chart was built.

Examples

1
2
3
4
default <- shotChart()
default$plot
####
andrew.bogut <- shotChart(params = list(PlayerID = 101106))

llefebure/nba-stats documentation built on May 21, 2019, 7:34 a.m.