GetHeatmapCoords: Get the heatmap coordinates for certain events in the...

Description Usage Arguments Value Examples

View source: R/db_retrieval.R

Description

This function will take in a team_id and a list of game_ids, and a list of events to looks for, and resturn a list of x, y coordinates, transformed to be attacking zone on the left of the rink, and defending zone on the right of the rink. Some anomalies due to how the NHL tracks positions

Usage

1
GetHeatmapCoords(team_id, gids, events_list)

Arguments

team_id

Int, id of the team to transfrom for

gids

Int, list of game ids to check for events

events_list

Character, string of events to select from the database Note that events must be quoted in single quotes inside the string

Value

List, containing all x, y pairs for events and additional metadata

Examples

1
2
SetDbPath(example = TRUE)
GetHeatmapCoords(10, 2019020001, "'Shot', 'Goal'")

nhlscrape documentation built on March 26, 2020, 5:29 p.m.