Skip to contents

Queries the NHL Stats REST API for team-level statistics.

Usage

nhl_stats_teams(
  report_type = "summary",
  season = NULL,
  game_type = 2,
  limit = 50,
  start = 0,
  sort = "points",
  direction = "DESC",
  lang = "en"
)

Arguments

report_type

Character report type. Default "summary". Common types: "summary", "penalties", "penaltykill", "penaltykilltime", "powerplay", "powerplaytime", "realtime", "faceoffpercentages", "faceoffwins", "goalsForAgainst", "goalsBy Period", "daysrest", "outshootoutshotby", "percentages", "scoretrailfirst", "shootout", "shottype"

season

Character season in "YYYYYYYY" format (e.g., "20242025"). If NULL, uses current season.

game_type

Integer game type: 2 = regular season (default), 3 = playoffs

limit

Integer maximum number of results. Default 50.

start

Integer start index for pagination. Default 0.

sort

Character sort column. Default "points".

direction

Character sort direction: "DESC" or "ASC". Default "DESC".

lang

Character language code. Default "en".

Value

Returns a data frame with team statistics.

Examples

# \donttest{
  try(nhl_stats_teams())
#> ── NHL Stats Teams ──────────────────────────────────────── fastRhockey 1.1.0 ──
#> ℹ Data updated: 2026-11-13 21:33:19 UTC
#> # A tibble: 32 × 25
#>    faceoff_win_pct games_played goals_against goals_against_per_game goals_for
#>              <dbl>        <int>         <int>                  <dbl>     <int>
#>  1           0.499           20            45                   2.25        82
#>  2           0.477           21            46                   2.19        70
#>  3           0.494           20            56                   2.8         80
#>  4           0.506           20            53                   2.65        68
#>  5           0.489           19            56                   2.95        74
#>  6           0.494           20            57                   2.85        72
#>  7           0.524           19            57                   3           65
#>  8           0.557           19            46                   2.42        69
#>  9           0.540           20            60                   3           62
#> 10           0.487           20            62                   3.1         81
#> # ℹ 22 more rows
#> # ℹ 20 more variables: goals_for_per_game <dbl>, losses <int>, ot_losses <int>,
#> #   penalty_kill_net_pct <dbl>, penalty_kill_pct <dbl>, point_pct <dbl>,
#> #   points <int>, power_play_net_pct <dbl>, power_play_pct <dbl>,
#> #   regulation_and_ot_wins <int>, season_id <int>,
#> #   shots_against_per_game <dbl>, shots_for_per_game <dbl>,
#> #   team_full_name <chr>, team_id <int>, team_shutouts <int>, ties <lgl>, …
# }