View source: R/get_donut_usage_action.R
| get_donut_usage_action | R Documentation |
This function creates a donut chart that displays the percentage of possessions that each player of a team ends with a particular action (turnover, field goal attempted or free throw attempted) while being on the court.
get_donut_usage_action(data_usage_act, team_sel, type_play,
language, min_poss, min_perc, size_orl,
size_irl = 4, vjust_title = 1)
data_usage_act |
Data frame with the number of possessions that each player ended and the particular action used. |
team_sel |
String with the team's full name. |
type_play |
Play type. Options are 'one' for free throws, 'two' for two-point field goals and 'three' for three-point field goals and 'tov' for turnovers. |
language |
Language of the titles. Valid options are 'English' and 'Spanish' so far. |
min_poss |
Minimum number of possessions played. |
min_perc |
Minimum percentage achieved. |
size_orl |
Size of the outer ring labels. |
size_irl |
Size of the inner ring labels. |
vjust_title |
Adjust the title vertically when representing turnovers. |
Donut charts are an alternative for pie charts, which have a hole in the middle, making them cleaner to read than pie charts.
A donut chart.
Guillermo Vinue with the help of ChatGPT.
get_donut_usage
## Not run:
get_donut_usage_action(acb_usage_act_data_2526, "Valencia Basket", "two", "English", 1, 1, 3)
# For example, the interpretation here is that Sako finishes the 66.67% of his possessions
# scoring a two-point shot.
get_donut_usage_action(acb_usage_act_data_2526, "Valencia Basket", "tov", "English", 1, 1, 5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.