Learn R Programming

nhlscraper (version 0.4.2)

x_game_shot_locations: Save an X (Twitter) share-able shot-location plot for a game

Description

x_game_shot_locations() saves an X share-able shot-location plot for a given game.

Usage

x_game_shot_locations(game = 2023030417, team = "home", model = 1, save = TRUE)

x_game_shot_locs(game = 2023030417, team = "home", model = 1)

Value

NULL

Arguments

game

integer ID (e.g., 2025020275); see games() for reference

team

character of 'h'/'home' or 'a'/'away'

model

integer in 1:3 indicating which expected goals model to use (e.g., 1); see calculate_expected_goals_v1(), calculate_expected_goals_v2(), and/or calculate_expected_goals_v3() for reference

save

logical only FALSE for tests

Examples

Run this code
# May take >5s, so skip.
x_game_shot_locations(
  game  = 2023030417, 
  model = 1, 
  team  = 'H',
  save  = FALSE
)

Run the code above in your browser using DataLab