shot_chart: Visualize shots data

Description Usage Arguments See Also Examples

View source: R/shot_chart.R

Description

Create scatter charts or heatmaps from shots data download with get_shots_data_fibalivestats() or get_shots_data_livefibaeurope(). This function creates one shot chart from shots data. If you want to get multiple shot charts use shots_dashboard()

Usage

1
shot_chart(shots_df, title = "Shot chart", type = "Scatter")

Arguments

shots_df

data.frame, shots data downloaded with get_shots_data_fibalivestats() or get_shots_data_livefibaeurope()

title

character, shot chart title, 'Shot chart' set by default

type

character, type of shot chart to create, use 'Scatter' for scatter plot or 'Heatmap' for heatmap

See Also

shots_dashboard

Examples

1
2
3
4
5
6
7
8
9
#get heatmap for M. Ponitka from Basketball Champions League shots example
#get data using data(), it will be stored in cl_shots
data("cl_shots")

#subset M. PONITKA shots
shots = cl_shots[cl_shots$player == 'M. PONITKA',]

#plot heatmap
shot_chart(shots, title = 'M. Ponitka', type = 'Heatmap')

bziarkowski/euRobasket documentation built on Dec. 11, 2017, 5:35 a.m.