View source: R/get_shooting_plot.R
get_shooting_plot | R Documentation |
This plot represents the number of shots attempted and scored by every player of the same team, together with the scoring percentage. The players are sortered by percentage.
get_shooting_plot(df_stats, team, type_shot, min_att, title, language)
df_stats |
Data frame with the statistics. |
team |
Team. |
type_shot |
Numeric with values 1-2-3: 1 refers to free throws, 2 refers to two point shots and 3 refers to three points shots. |
min_att |
Minimum number of attempts by the player to be represented in the plot. |
title |
Plot title. |
language |
Language labels. Current options are 'en' for English and 'es' for Spanish. |
Graphical device.
Guillermo Vinue
## Not run:
compet <- "ACB"
df <- do_join_games_bio(compet, acb_games_1718, acb_players_1718)
df1 <- do_add_adv_stats(df)
df2 <- do_stats(df1, "Total", "2017-2018", compet, "Regular Season")
get_shooting_plot(df2, "Valencia", 3, 1,
paste("Valencia", compet, "2017-2018", sep = " "), "en")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.