View source: R/do_viz_shots_scatter.R
| do_viz_shots_scatter | R Documentation |
Create a visualization of the left half of the court and annotates both the total and by zone shooting statistics. It can also show the location of each individual shot, with color-coding for makes and misses.
do_viz_shots_scatter(shots_stats, type, draw, size_lab_box = 2.8, size_lab_court = 3,
size_point = 3, language = "English")
shots_stats |
Shooting data associated with the filters given to |
type |
Options are 'team' for team statistics, 'player' for player statistics and 'all' for the whole league. |
draw |
Logical. TRUE to add the shots in their coordinates. FALSE to add just the number of mades and attempted field goals. |
size_lab_box |
Size of the text indicating the overall percentages (they are inside a box). |
size_lab_court |
Size of the text indicating the percentages by zone. |
size_point |
Size of the points. |
language |
Language of the titles. Valid options are 'English' and 'Spanish' so far. |
A plot.
Guillermo Vinue
do_divide_court_zones, do_filter_data,
do_shots_stats
## Not run:
df0 <- do_divide_court_zones(acb_shooting_data_2425)
df1 <- do_filter_data(df0, "2024-2025", "", "", "", "", "")
shots_stats <- do_shots_stats(df1, df0)
do_viz_shots_scatter(shots_stats, "all", FALSE)
do_viz_shots_scatter(shots_stats, "all", TRUE)
df1 <- do_filter_data(df0, "2024-2025", "", "", "", "", "D. Ennis")
shots_stats <- do_shots_stats(df1, df0)
do_viz_shots_scatter(shots_stats, "player", FALSE)
do_viz_shots_scatter(shots_stats, "player", TRUE)
do_viz_shots_scatter(shots_stats, "player", TRUE, language = "Spanish")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.