| .normalize_coordinates | R Documentation |
.normalize_coordinates() normalizes the x and y coordinates for all the events (plays) in a play-by-play such that they all attack towards +x. If homeTeamDefendingSide is not available, the home defending side in period 1 is inferred using zoneCode, isHome, and xCoord.
.normalize_coordinates(play_by_play)
play_by_play |
data.frame of play-by-play(s); see |
data.frame with one row per event (play) and added columns xCoordNorm and yCoordNorm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.