I’m usually interested in the NHL game stats, but rarely pay enough attention to the broadcast when stats are announced. For example, the hockey team’s record when that team scores the first goal of the game. Or what is the number of blocked shots for a team. I captured some game data during the first round of the NHL 2017 Playoffs.
- Go to the following github repository
- Go into R-nhl_2017_playoffs directory
- Download all files into working directory -> C:\R
First, change RStudio’s working directory to c:\R directory
After RStudio’s working directory is set, then run the R script to set up environment.
nhlGamesREnvSetup.R script is a quick way to load nhl 2017 playoff game data and all scripts associated with different statistics. You could load the game data, then just load an individual script.
NHL 2017 Playoff Statistics
R function calls that are available
playoffMatchup(games, “MIN”, “STL”)