Skip to contents

Team shots per season: on goal (total, slot, shooting percentage), missed, post, blocked, and shots against, with per-game rates.

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_team_shots(season, league_id = 1L, phase_id = NULL, 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 season summary over every phase.

language

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

Value

A fastRhockey_data tibble with 23 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, and on a goaltender below the qualification line.
team_idintegerSIHF team id (integer join key); null on a summary row (the pseudo-team 100000).
team_namecharacterTeam display name as SIHF publishes it; "Durchschnitt" on the league-average row, "Total" on the attendance total row.
team_acronymcharacterTeam abbreviation as SIHF publishes it (e.g., "HCD"); null on a summary row.
games_playedintegerGames played in the table's scope.
sog_sogintegerShots on goal (saved or scored).
sog_sog_percentnumericShooting percentage (goals / shots on goal).
sog_sog_quotientnumericShots on goal per game.
sog_sog_slotintegerSlot shots on goal.
sog_sog_slot_per_gamenumericSlot shots on goal per game.
sog_missedintegerMissed shots, total.
sog_missed_per_gamenumericMissed shots per game.
sog_postintegerPost/crossbar shots, total.
sog_post_per_gamenumericPost/crossbar shots per game.
blockingsintegerNumber of shots blocked.
blockings_per_gamenumericBlocked shots per game.
soga_sogintegerShots on goal against, total.
soga_sog_per_gamenumericShots on goal against per game.
soga_sog_slotintegerSlot shots on goal against.
soga_sog_slot_per_gamenumericSlot shots on goal against per game.
row_typecharacter"data" for a regular row; "average" (league average) or "total" (attendance 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_team_shots(season = 2026, league_id = 1))
#> ── SIHF Team Shots Information from data.sihf.ch ───── fastRhockey 1.0.0.9000 ──
#> ℹ Data updated: 2026-10-13 02:00:07 UTC
#> # A tibble: 15 × 23
#>    season phase_id  rank team_id team_name     team_acronym games_played sog_sog
#>     <int>    <int> <int>   <int> <chr>         <chr>               <int>   <int>
#>  1   2026       NA    14  103144 HC Ajoie      HCA                    56    1286
#>  2   2026       NA    13  101149 EHC Kloten    EHCK                   52    1407
#>  3   2026       NA    12  102127 SCL Tigers    SCL                    52    1527
#>  4   2026       NA    11  101152 HC Ambri-Pio… HCAP                   56    1559
#>  5   2026       NA    10  102128 EHC Biel-Bie… EHCB                   56    1648
#>  6   2026       NA     9  101144 EV Zug        EVZ                    66    1668
#>  7   2026       NA     8  101150 HC Lugano     HCL                    60    1794
#>  8   2026       NA     7  102126 SC Bern       SCB                    60    1819
#>  9   2026       NA    NA      NA Durchschnitt  NA                     65    1874
#> 10   2026       NA     6  103141 Lausanne HC   LHC                    66    1957
#> 11   2026       NA     5  101139 ZSC Lions     ZSC                    70    2102
#> 12   2026       NA     4  101060 SC Rapperswi… SCRJ                   74    2162
#> 13   2026       NA     3  103140 Genève-Serve… GSHC                   76    2264
#> 14   2026       NA     2  101151 HC Davos      HCD                    86    2490
#> 15   2026       NA     1  103138 Fribourg-Got… FRI                    90    2565
#> # ℹ 15 more variables: sog_sog_percent <dbl>, sog_sog_quotient <dbl>,
#> #   sog_sog_slot <int>, sog_sog_slot_per_game <dbl>, sog_missed <int>,
#> #   sog_missed_per_game <dbl>, sog_post <int>, sog_post_per_game <dbl>,
#> #   blockings <int>, blockings_per_game <dbl>, soga_sog <int>,
#> #   soga_sog_per_game <dbl>, soga_sog_slot <int>, soga_sog_slot_per_game <dbl>,
#> #   row_type <chr>
# }