dplyr::glimpse(match_details)
Rows: 0
Columns: 1
$ match_id
match_shots <- match_details %>%
dplyr::select(
match_id,
shots
) %>%
tidyr::unnest(shots)
Error in dplyr::select():
! Can't subset columns that don't exist.
x Column shots doesn't exist.
Run rlang::last_error() to see where the error occurred.
dplyr::glimpse(match_shots)
Error in dplyr::glimpse(match_shots) : object 'match_shots' not found
Looks like they added "api" to their match urls. So, https://www.fotmob.com/matchDetails?matchId=3609994 is now https://www.fotmob.com/api/matchDetails?matchId=3609994
Trying to get shot-event data from fotmob matches.
R-CODE:
library(worldfootballR) library(dplyr) library(tidyr)
fotmob_matches <- c(3609994, 3610132) match_details <- fotmob_get_match_details(fotmob_matches)
dplyr::glimpse(match_details) match_shots <- match_details %>% dplyr::select( match_id, shots ) %>% tidyr::unnest(shots) dplyr::glimpse(match_shots)
match_shots
OUTPUT: