get_leagues | R Documentation |
Gets all available leagues for a given year, from the dropdown in https://sofifa.com/teams
get_leagues(game_code)
game_code |
Should contain the code for a given fifa game, from sfscrape::get_game_codes |
df containing all leagues in FIFA
# Returns all available leagues in FIFA 22 sfscrape::get_leagues(220006) # to get all games (requires purrr and dplyr installed) fifa_games <- sfscrape::get_game_codes() codes <- fifa_games$code names(codes) <- fifa_games$game all_leauges <- purrr::map_dfr(codes, get_leagues, .id = "game")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.