Skip to contents

League table of a season (every game, or home / away games only): rank, games, points, regulation / overtime / shootout wins and losses, goals, streak.

Reads the Swiss Ice Hockey Federation statistics API (data.sihf.ch, keyless JSON). SIHF keys a season by its END year (2026 = 2025-26). An unknown season, league_id or phase_id is never an error upstream (SIHF silently answers another one), so every table answer is checked against the body's own filter echo and refused when it differs. Every request is spaced at least one second from the last one to the host.

Usage

sihf_standings(
  season,
  league_id = 1L,
  phase_id = NULL,
  venue = "All",
  language = "en"
)

Arguments

season

Required. Season by its END year (2026 = 2025-26). A season SIHF does not have raises fastRhockey_no_data error (the API itself silently answers another one).

league_id

SIHF league id: 1 = National League, 2 = Swiss League, 100 = MyHockey League, 3 = 1. Liga, 43 = SWHL B, 113 = U21-Elit (the body's League filter lists them). An id SIHF does not have for the season raises fastRhockey_no_data error.

phase_id

SIHF phase id (regular season, a playoff round, ...; the body's Phase filter lists them). NULL = no phase filter: the regular-season table.

venue

Which games the table counts: All (the full table), Home or Away. Always sent: without it SIHF answers the away-games table (26 of the 52 National League games).

language

Response language. Only part of the body is translated: status, position and penalty names stay German.

Value

A fastRhockey_data tibble with 20 columns. A zero-row tibble with these columns when the payload holds no rows.

col_nametypedescription
seasonintegerSeason by its END year (2026 = 2025-26), from the body's echo of the Season filter.
phase_idintegerSIHF phase id (regular season, a playoff round, ...); null unless a phase filter is passed.
rankintegerRank in the table; null on a summary row.
team_idintegerSIHF team id (integer join key).
team_namecharacterTeam display name as SIHF publishes it.
team_acronymcharacterTeam abbreviation as SIHF publishes it (e.g., "HCD").
games_playedintegerGames the team played in the selection (every game, or home / away games only, per venue).
pointsintegerTable points earned in the standings.
points_quotientnumericPoints per game.
games_won_in_timeintegerWins in regulation.
games_won_extra_timeintegerWins in overtime.
games_won_penaltyintegerWins in a shootout.
games_lost_penaltyintegerLosses in a shootout.
games_lost_extra_timeintegerLosses in overtime.
games_lost_in_timeintegerLosses in regulation.
goals_forintegerGoals scored by the team.
goals_againstintegerGoals allowed by the team.
goals_differenceintegerGoal difference.
streakcharacterRecent results, newest first, as SIHF prints them (e.g., "W+L-"; "+" regulation, "-" after regulation).
row_typecharacter"data" for a regular row; "average" or "total" for a summary row SIHF mixes into the table.

Errors

  • fastRhockey_no_data: SIHF answered 404 (unknown game), or ignored a requested season, league or phase and served another one.

  • fastRhockey_bad_request: SIHF answered 400 / 422, or an argument is invalid.

  • fastRhockey_asset_fetch: any other non-2xx answer or a dead connection after retries, an empty or unreadable body, a stub or redirect body, a table without its filter echo, a truncated table, or a gameoverview body for another game.

Examples

# \donttest{
  try(sihf_standings(season = 2026, league_id = 1))
#> ── SIHF Standings Information from data.sihf.ch ────── fastRhockey 1.0.0.9000 ──
#> ℹ Data updated: 2026-10-13 01:59:56 UTC
#> # A tibble: 14 × 20
#>    season phase_id  rank team_id team_name      team_acronym games_played points
#>     <int>    <int> <int>   <int> <chr>          <chr>               <int>  <int>
#>  1   2026       NA     1  101151 HC Davos       HCD                    52    117
#>  2   2026       NA     2  103138 Fribourg-Gott… FRI                    52    100
#>  3   2026       NA     3  103140 Genève-Servet… GSHC                   52     91
#>  4   2026       NA     4  101139 ZSC Lions      ZSC                    52     91
#>  5   2026       NA     5  101150 HC Lugano      HCL                    52     89
#>  6   2026       NA     6  103141 Lausanne HC    LHC                    52     85
#>  7   2026       NA     7  101060 SC Rapperswil… SCRJ                   52     81
#>  8   2026       NA     8  101144 EV Zug         EVZ                    52     75
#>  9   2026       NA     9  102126 SC Bern        SCB                    52     68
#> 10   2026       NA    10  102128 EHC Biel-Bien… EHCB                   52     67
#> 11   2026       NA    11  102127 SCL Tigers     SCL                    52     64
#> 12   2026       NA    12  101149 EHC Kloten     EHCK                   52     63
#> 13   2026       NA    13  101152 HC Ambri-Piot… HCAP                   52     59
#> 14   2026       NA    14  103144 HC Ajoie       HCA                    52     42
#> # ℹ 12 more variables: points_quotient <dbl>, games_won_in_time <int>,
#> #   games_won_extra_time <int>, games_won_penalty <int>,
#> #   games_lost_penalty <int>, games_lost_extra_time <int>,
#> #   games_lost_in_time <int>, goals_for <int>, goals_against <int>,
#> #   goals_difference <int>, streak <chr>, row_type <chr>
# }