Skip to content

Instantly share code, notes, and snippets.

@tonyelhabr
Created September 20, 2022 14:29
Show Gist options
  • Save tonyelhabr/898ab4e18fcb369ca2b382b629847b1d to your computer and use it in GitHub Desktop.
Save tonyelhabr/898ab4e18fcb369ca2b382b629847b1d to your computer and use it in GitHub Desktop.
get corners for a match with worldfootballR

hey jon 👋

library(dplyr)
library(worldfootballR)

match_team_stats <- fotmob_get_match_team_stats(3609994)
match_team_stats |> 
  filter(stats_title == 'Corners') |> 
  glimpse()
#> Rows: 1
#> Columns: 20
#> $ match_id             <int> 3609994
#> $ match_round          <chr> "7"
#> $ league_id            <int> 47
#> $ league_name          <chr> "Premier League"
#> $ league_round_name    <chr> "Premier League Round 7"
#> $ parent_league_id     <int> 47
#> $ parent_league_season <chr> "2022/2023"
#> $ match_time_utc       <chr> "Sun, Oct 3, 2021, 15:30 UTC"
#> $ home_team_id         <int> 8650
#> $ home_team            <chr> "Liverpool"
#> $ home_team_color      <chr> "#d3171e"
#> $ away_team_id         <int> 8456
#> $ away_team            <chr> "Manchester City"
#> $ away_team_color      <chr> "#69A8D8"
#> $ title                <chr> "TOP STATS"
#> $ stats_title          <chr> "Corners"
#> $ home_value           <chr> "3"
#> $ away_value           <chr> "4"
#> $ stats_type           <chr> "text"
#> $ stats_highlighted    <chr> "away"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment