| ig_game_shot_locations | R Documentation |
ig_game_shot_locations() fetches one GameCenter play-by-play, scores its
shot attempts with calculate_expected_goals(), filters to the selected home
or away team, and renders a 1080-by-566-style PNG shot map. Points are
jittered for readability, shaped by event result, and colored by capped xG.
ig_game_shot_locations(
game = 2023030417,
team = "home",
model = NULL,
save = TRUE
)
ig_game_shot_locs(game = 2023030417, team = "home", model = NULL)
game |
integer ID (e.g., 2025020275); see |
team |
character of 'h'/'home' or 'a'/'away' |
model |
deprecated legacy model selector; ignored |
save |
logical; use |
NULL, invisibly
# May take >5s, so skip.
ig_game_shot_locations(
game = 2023030417,
team = 'H',
save = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.