The function tidy_goalies_stats() is meant to be a user-friendly way of getting the NHL year-by-year statistics of selected goalies

tidy_goalies_stats(
  players_id,
  regular = TRUE,
  playoffs = TRUE,
  keep_id = FALSE,
  return_datatable = getOption("tidynhl.data.table", TRUE)
)

Arguments

players_id

Integer vector indicating the NHL ID of goalies for whom the statistics will be returned.

regular

(optional) Logical indicating if the regular season statistics should be returned. Default to TRUE.

playoffs

(optional) Logical indicating if the playoffs statistics should be returned. Default to TRUE.

keep_id

(optional) Logical indicating if the IDs of different dimensions should be returned. Default to FALSE.

return_datatable

(optional) Logical indicating whether or not a data.table should be returned. Default can be set globally with options("tidynhl.data.table").

Examples

# Allowing large outputs for the pkgdown website options(width = 1000L) # Get the NHL career statistics of Roberto Luongo tidy_goalies_stats(8466141L)
#> player_name season_years season_type team_abbreviation goalie_games goalie_started goalie_wins goalie_losses goalie_ties goalie_ot goalie_shutouts goalie_shotagainst goalie_goalagainst goalie_savepct goalie_gaa goalie_toi goalie_ev_shotagainst goalie_ev_goalagainst goalie_ev_savepct goalie_pp_shotagainst goalie_pp_goalagainst goalie_pp_savepct goalie_pk_shotagainst goalie_pk_goalagainst goalie_pk_savepct #> 1: Roberto Luongo 1999-00 regular NYI 24 20 7 14 1 0 1 730 70 0.9041096 3.249810 1292.3833 524 48 0.9083969 174 20 0.8850575 32 2 0.9375000 #> 2: Roberto Luongo 2000-01 regular FLA 47 41 12 24 7 0 5 1333 107 0.9197299 2.442597 2628.3500 999 70 0.9299299 269 29 0.8921933 65 8 0.8769231 #> 3: Roberto Luongo 2001-02 regular FLA 58 56 16 33 4 0 4 1653 140 0.9153055 2.772613 3029.6333 1241 89 0.9282836 358 46 0.8715084 55 5 0.9090909 #> 4: Roberto Luongo 2002-03 regular FLA 65 62 20 34 7 0 6 2011 164 0.9184485 2.712637 3627.4667 1490 112 0.9248322 452 46 0.8982301 69 6 0.9130435 #> 5: Roberto Luongo 2003-04 regular FLA 72 72 25 33 14 0 7 2475 172 0.9305051 2.427264 4251.7000 1887 119 0.9369369 509 43 0.9155206 80 10 0.8750000 #> 6: Roberto Luongo 2005-06 regular FLA 75 73 35 30 0 9 4 2488 213 0.9143891 2.968791 4304.7833 1720 127 0.9261628 656 77 0.8826220 71 9 0.8732394 #> 7: Roberto Luongo 2006-07 regular VAN 76 75 47 22 0 6 5 2169 171 0.9211618 2.284942 4490.2667 1547 112 0.9276018 543 51 0.9060773 79 7 0.9113924 #> 8: Roberto Luongo 2006-07 playoffs VAN 12 12 5 7 0 0 0 427 25 0.9414520 1.770051 847.4333 307 18 0.9413681 108 7 0.9351852 12 0 1.0000000 #> 9: Roberto Luongo 2007-08 regular VAN 73 73 35 29 0 9 6 2029 168 0.9172006 2.381552 4232.5333 1518 108 0.9288538 429 55 0.8717949 82 5 0.9390244 #> 10: Roberto Luongo 2008-09 regular VAN 54 54 33 13 0 7 9 1542 124 0.9195850 2.338826 3181.0833 1156 74 0.9359862 330 47 0.8575758 56 3 0.9464286 #> 11: Roberto Luongo 2008-09 playoffs VAN 10 10 6 4 0 0 1 304 26 0.9144737 2.524476 617.9500 228 16 0.9298246 69 9 0.8695652 7 1 0.8571429 #> 12: Roberto Luongo 2009-10 regular VAN 68 67 40 22 0 4 4 1915 167 0.9127937 2.569626 3899.4000 1505 113 0.9249169 350 49 0.8600000 60 5 0.9166667 #> 13: Roberto Luongo 2009-10 playoffs VAN 12 12 6 6 0 0 0 362 38 0.8950276 3.225502 706.8667 270 19 0.9296296 81 17 0.7901235 11 2 0.8181818 #> 14: Roberto Luongo 2010-11 regular VAN 60 60 38 15 0 7 4 1753 126 0.9281232 2.106055 3589.6500 1416 94 0.9336158 300 31 0.8966667 37 1 0.9729730 #> 15: Roberto Luongo 2010-11 playoffs VAN 25 24 15 10 0 0 4 711 61 0.9142053 2.564522 1427.1667 548 38 0.9306569 137 17 0.8759124 26 6 0.7692308 #> 16: Roberto Luongo 2011-12 regular VAN 55 54 31 14 0 8 5 1577 127 0.9194673 2.409575 3162.3833 1288 91 0.9293478 253 33 0.8695652 36 3 0.9166667 #> 17: Roberto Luongo 2011-12 playoffs VAN 2 2 0 2 0 0 0 64 7 0.8906250 3.587189 117.0833 41 2 0.9512195 18 3 0.8333333 5 2 0.6000000 #> 18: Roberto Luongo 2012-13 regular VAN 20 18 9 6 0 3 2 551 51 0.9074410 2.556569 1196.9167 460 37 0.9195652 75 13 0.8266667 16 1 0.9375000 #> 19: Roberto Luongo 2012-13 playoffs VAN 3 2 0 2 0 0 0 71 6 0.9154930 2.577258 139.6833 52 5 0.9038462 19 1 0.9473684 0 0 NaN #> 20: Roberto Luongo 2013-14 regular VAN 42 42 19 16 0 6 3 1157 96 0.9170268 2.382101 2418.0333 990 78 0.9212121 144 16 0.8888889 23 2 0.9130435 #> 21: Roberto Luongo 2013-14 regular FLA 14 14 6 7 0 1 1 432 33 0.9236111 2.461768 804.3000 331 21 0.9365559 90 12 0.8666667 11 0 1.0000000 #> 22: Roberto Luongo 2014-15 regular FLA 61 61 28 19 0 12 2 1743 138 0.9208262 2.346817 3528.1833 1418 96 0.9322990 287 39 0.8641115 38 3 0.9210526 #> 23: Roberto Luongo 2015-16 regular FLA 62 60 35 19 0 6 4 1801 141 0.9217102 2.348793 3601.8500 1449 92 0.9365079 309 46 0.8511327 43 3 0.9302326 #> 24: Roberto Luongo 2015-16 playoffs FLA 6 6 2 4 0 0 0 227 15 0.9339207 2.053232 438.3333 193 10 0.9481865 28 5 0.8214286 6 0 1.0000000 #> 25: Roberto Luongo 2016-17 regular FLA 40 39 17 15 0 6 1 1217 104 0.9145440 2.682064 2326.5667 1010 89 0.9118812 170 13 0.9235294 37 2 0.9459459 #> 26: Roberto Luongo 2017-18 regular FLA 35 33 18 11 0 2 3 1143 81 0.9291339 2.472066 1965.9667 950 64 0.9326316 157 16 0.8980892 36 1 0.9722222 #> 27: Roberto Luongo 2018-19 regular FLA 43 40 18 16 0 5 1 1205 122 0.8987552 3.119362 2346.6333 1053 99 0.9059829 110 14 0.8727273 42 9 0.7857143 #> player_name season_years season_type team_abbreviation goalie_games goalie_started goalie_wins goalie_losses goalie_ties goalie_ot goalie_shutouts goalie_shotagainst goalie_goalagainst goalie_savepct goalie_gaa goalie_toi goalie_ev_shotagainst goalie_ev_goalagainst goalie_ev_savepct goalie_pp_shotagainst goalie_pp_goalagainst goalie_pp_savepct goalie_pk_shotagainst goalie_pk_goalagainst goalie_pk_savepct
# Get the NHL career playoffs statistics of both Roberto Luongo and Corey Crawford, keeping the # IDs tidy_goalies_stats(c(8466141L, 8470645L), regular = FALSE, keep_id = TRUE)
#> player_id player_name season_id season_years season_type team_id team_abbreviation goalie_games goalie_started goalie_wins goalie_losses goalie_ties goalie_ot goalie_shutouts goalie_shotagainst goalie_goalagainst goalie_savepct goalie_gaa goalie_toi goalie_ev_shotagainst goalie_ev_goalagainst goalie_ev_savepct goalie_pp_shotagainst goalie_pp_goalagainst goalie_pp_savepct goalie_pk_shotagainst goalie_pk_goalagainst goalie_pk_savepct #> 1: 8466141 Roberto Luongo 20062007 2006-07 playoffs 23 VAN 12 12 5 7 0 0 0 427 25 0.9414520 1.770051 847.43333 307 18 0.9413681 108 7 0.9351852 12 0 1.0000000 #> 2: 8466141 Roberto Luongo 20082009 2008-09 playoffs 23 VAN 10 10 6 4 0 0 1 304 26 0.9144737 2.524476 617.95000 228 16 0.9298246 69 9 0.8695652 7 1 0.8571429 #> 3: 8466141 Roberto Luongo 20092010 2009-10 playoffs 23 VAN 12 12 6 6 0 0 0 362 38 0.8950276 3.225502 706.86667 270 19 0.9296296 81 17 0.7901235 11 2 0.8181818 #> 4: 8466141 Roberto Luongo 20102011 2010-11 playoffs 23 VAN 25 24 15 10 0 0 4 711 61 0.9142053 2.564522 1427.16667 548 38 0.9306569 137 17 0.8759124 26 6 0.7692308 #> 5: 8466141 Roberto Luongo 20112012 2011-12 playoffs 23 VAN 2 2 0 2 0 0 0 64 7 0.8906250 3.587189 117.08333 41 2 0.9512195 18 3 0.8333333 5 2 0.6000000 #> 6: 8466141 Roberto Luongo 20122013 2012-13 playoffs 23 VAN 3 2 0 2 0 0 0 71 6 0.9154930 2.577258 139.68333 52 5 0.9038462 19 1 0.9473684 0 0 NaN #> 7: 8466141 Roberto Luongo 20152016 2015-16 playoffs 13 FLA 6 6 2 4 0 0 0 227 15 0.9339207 2.053232 438.33333 193 10 0.9481865 28 5 0.8214286 6 0 1.0000000 #> 8: 8470645 Corey Crawford 20082009 2008-09 playoffs 16 CHI 1 0 0 0 0 0 0 7 1 0.8571429 3.769634 15.91667 4 0 1.0000000 3 1 0.6666667 0 0 NaN #> 9: 8470645 Corey Crawford 20102011 2010-11 playoffs 16 CHI 7 7 3 4 0 0 1 218 16 0.9266055 2.205882 435.20000 187 12 0.9358289 24 4 0.8333333 7 0 1.0000000 #> 10: 8470645 Corey Crawford 20112012 2011-12 playoffs 16 CHI 6 6 2 4 0 0 0 159 17 0.8930818 2.578797 395.53333 126 13 0.8968254 32 4 0.8750000 1 0 1.0000000 #> 11: 8470645 Corey Crawford 20122013 2012-13 playoffs 16 CHI 23 23 16 7 0 0 1 674 46 0.9317507 1.835228 1503.90000 543 38 0.9300184 122 7 0.9426230 9 1 0.8888889 #> 12: 8470645 Corey Crawford 20132014 2013-14 playoffs 16 CHI 19 19 11 8 0 0 1 590 52 0.9118644 2.528705 1233.83333 486 42 0.9135802 93 10 0.8924731 11 0 1.0000000 #> 13: 8470645 Corey Crawford 20142015 2014-15 playoffs 16 CHI 20 19 13 6 0 0 2 616 47 0.9237013 2.306214 1222.78333 538 38 0.9293680 72 9 0.8750000 6 0 1.0000000 #> 14: 8470645 Corey Crawford 20152016 2015-16 playoffs 16 CHI 7 7 3 4 0 0 0 205 19 0.9073171 2.545779 447.80000 178 14 0.9213483 25 5 0.8000000 2 0 1.0000000 #> 15: 8470645 Corey Crawford 20162017 2016-17 playoffs 16 CHI 4 4 0 4 0 0 0 123 12 0.9024390 2.837066 253.78333 114 11 0.9035088 8 1 0.8750000 1 0 1.0000000 #> 16: 8470645 Corey Crawford 20192020 2019-20 playoffs 16 CHI 9 9 4 5 0 0 0 324 30 0.9074074 3.308722 544.01667 261 23 0.9118774 52 6 0.8846154 11 1 0.9090909