| get_sticker | R Documentation |
This function creates players' cards (a kind of sticker) that bring together for each player three of the concepts considered most important in basketball analytics. These are efficiency (how many points the team scores and receives per 100 possessions with the player on the floor), the shooting context (from where and with what percentage they shoot) and the use of possessions (how they end the possessions they execute).
get_sticker(data_player_eff, data_team, player_sel, language = "English",
change_hjust_perc = FALSE, size_head = c(0.4, 0.3, 5.6, 3.5),
size_eff = 2, size_cont_us = c(2.3, 1.7), size_plot_tit = 8,
hjust_title = 0.1, xjust_vt = c(0.392, 0.3), size_netrtg = 20)
data_player_eff |
Data frame with the efficiency statistics. |
data_team |
Data frame with the context and usage statistics. |
player_sel |
Player of interest. |
language |
Language of the titles. Valid options are 'English' and 'Spanish' so far. |
change_hjust_perc |
Logical to change the position of the win percentage sentence. |
size_head |
Vector with the sizes of headers text. |
size_eff |
Size of the text related to the winning percentage and player's efficiencies. |
size_cont_us |
Vector with the sizes of context and usage text. |
size_plot_tit |
Size of the plot titles. |
hjust_title |
Adjust the title of the net efficiency. |
xjust_vt |
Adjust the text of the team's winning percentage and efficiencies. |
size_netrtg |
Size of the colored net efficiency value. |
A plot.
Guillermo Vinue
## Not run:
# The efficiency data frame must have this type of structure:
data_player_eff <- data.frame(team = "Real Madrid",
win_perc = "83.3% (5/6)",
pts_poss = 114,
pts_poss_opp = 104,
net_rtg = 10)
get_sticker(data_player_eff, acb_sticker_data_2526, "A. Abalde", language = "English")
get_sticker(data_player_eff, acb_sticker_data_2526, "A. Abalde", language = "Spanish", TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.