Skip to contents

Returns the NHL Edge zone-time details payload for a single team. Wraps https://api-web.nhle.com/v1/edge/team-zone-time-details/{teamId}/.... When season is NULL (default) the /now endpoint is used to fetch the current season.

Usage

nhl_edge_team_zone_time_details(team_id, season = NULL, game_type = 2)

Arguments

team_id

Integer NHL team ID (e.g., 10 for Toronto Maple Leafs).

season

Optional 4-digit end-year (e.g., 2025 for the 2024-25 season), an 8-character API season (e.g., "20242025"), or NULL (default) for the current season via the /now endpoint.

game_type

Integer game type. 1 = preseason, 2 = regular season (default), 3 = playoffs.

Value

A data frame (fastRhockey_data) with the following columns:

col_nametypesdescription
strength_codecharacterGame-strength state the row applies to.
offensive_zone_pctgnumericPercentage of time spent in the offensive zone.
offensive_zone_rankintegerLeague rank for offensive zone time.
offensive_zone_league_avgnumericLeague-average offensive zone time percentage.
neutral_zone_pctgnumericPercentage of time spent in the neutral zone.
neutral_zone_rankintegerLeague rank for neutral zone time.
neutral_zone_league_avgnumericLeague-average neutral zone time percentage.
defensive_zone_pctgnumericPercentage of time spent in the defensive zone.
defensive_zone_rankintegerLeague rank for defensive zone time.
defensive_zone_league_avgnumericLeague-average defensive zone time percentage.

Examples

# \donttest{
  try(nhl_edge_team_zone_time_details(team_id = 10))
#> ── NHL Edge Team Zone Time Details ──────────────────────── fastRhockey 1.0.0 ──
#>  Data updated: 2026-06-13 07:20:10 UTC
#> # A tibble: 4 × 10
#>   strength_code offensive_zone_pctg offensive_zone_rank offensive_zone_league_…¹
#>   <chr>                       <dbl>               <int>                    <dbl>
#> 1 all                         0.389                  32                    0.415
#> 2 es                          0.387                  32                    0.410
#> 3 pp                          0.569                  26                    0.580
#> 4 pk                          0.258                  25                    0.298
#> # ℹ abbreviated name: ¹​offensive_zone_league_avg
#> # ℹ 6 more variables: neutral_zone_pctg <dbl>, neutral_zone_rank <int>,
#> #   neutral_zone_league_avg <dbl>, defensive_zone_pctg <dbl>,
#> #   defensive_zone_rank <int>, defensive_zone_league_avg <dbl>
# }