|
|
@@ -12,8 +12,8 @@ season <- read_csv("data/2017-18_pbp.csv")
|
|
|
# ~read_csv(.x),
|
|
|
# .id = "filename")
|
|
|
|
|
|
-# construct a new ID column which is a combination of EVENTNUM and GAME_ID
|
|
|
-# and only retain a subset of the original columns
|
|
|
+# construct a new dataframe which is a subset of the original
|
|
|
+# also ensure that SCOREMARGIN is a number and create an integer gameID
|
|
|
season_subset <- season %>%
|
|
|
dplyr::select(GAME_ID, EVENTNUM, HOMEDESCRIPTION, VISITORDESCRIPTION,
|
|
|
SCORE, SCOREMARGIN, PCTIMESTRING, PERIOD) %>%
|