Get ESPN's MLS game data (play-by-play, team)
espn_mls_game_all(game_id)
Game ID
A named list of dataframes: Plays, Team
# \donttest{
try(espn_mls_game_all(game_id = 598135))
#> $Plays
#> # A tibble: 113 × 18
#> sequence text time_display_va… time_value play_short_text play_id play_text
#> <int> <chr> <chr> <int> <chr> <chr> <chr>
#> 1 0 Lineu… "" 0 NA NA NA
#> 2 1 First… "" 0 NA NA NA
#> 3 2 Attem… "3'" 149 Luciano Acosta… 370490… Attempt …
#> 4 3 Corne… "3'" 150 Luciano Acosta… 370489… Corner, …
#> 5 4 Attem… "4'" 187 Tyler Blackett… 370490… Attempt …
#> 6 5 Corne… "7'" 396 Brenner Corner… 370491… Corner, …
#> 7 6 Attem… "8'" 442 Josef Martínez… 370491… Attempt …
#> 8 7 Brenn… "8'" 471 Alan Franco Fo… 370491… Foul by …
#> 9 8 Foul … "8'" 471 Alan Franco Fo… 370491… Foul by …
#> 10 9 Attem… "10'" 550 Zico Bailey Sh… 370492… Attempt …
#> # … with 103 more rows, and 11 more variables: play_period_number <int>,
#> # play_clock_display_value <chr>, play_clock_value <int>,
#> # play_team_display_name <chr>, play_source_description <chr>,
#> # play_source_id <chr>, play_type_id <chr>, play_type_text <chr>, id <chr>,
#> # athlete_1 <chr>, athlete_2 <chr>
#>
#> $Team
#> statistics
#> 1 12, 2, 0, 2, 9, 2, 61.4, 18, 4, foulsCommitted, yellowCards, redCards, offsides, wonCorners, saves, possessionPct, totalShots, shotsOnTarget, Fouls, Yellow Cards, Red Cards, Offsides, Corner Kicks, Saves, POSSESION, SHOTS, ON GOAL
#> 2 13, 2, 0, 2, 5, 2, 38.6, 9, 3, foulsCommitted, yellowCards, redCards, offsides, wonCorners, saves, possessionPct, totalShots, shotsOnTarget, Fouls, Yellow Cards, Red Cards, Offsides, Corner Kicks, Saves, POSSESION, SHOTS, ON GOAL
#> team.shortDisplayName team.uid team.alternateColor team.color
#> 1 Atlanta s:600~t:18418 ccfcfc 000000
#> 2 Cincinnati s:600~t:18267 F36600 001f5e
#> team.displayName team.name
#> 1 Atlanta United FC Atlanta United FC
#> 2 FC Cincinnati FC Cincinnati
#> team.logo team.location
#> 1 https://a.espncdn.com/i/teamlogos/soccer/500/18418.png Atlanta United FC
#> 2 https://a.espncdn.com/i/teamlogos/soccer/500/18267.png FC Cincinnati
#> team.id team.abbreviation team.slug team.uniform.alternateColor
#> 1 18418 ATL usa.atlanta_united_fc CC9900
#> 2 18267 CIN fc_cincinnati FF3300
#> team.uniform.color team.uniform.type
#> 1 FFFFFF away
#> 2 0000FF home
#>
# }