Description Usage Arguments See Also Examples
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()
1 | shot_chart(shots_df, title = "Shot chart", type = "Scatter")
|
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 |
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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.