team_match_multicomp | R Documentation |
For use with the StatsBomb Data API credentials. This function is used to access the JSON file from the StatsBomb IQ API and format it as a data frame (tibble) for use in R. Currently, parallel is only supported for windows.
team_match_multicomp(username = "username", password = "password",
competitionmatrix, version = "v1",
baseurl = "https://data.statsbombservices.com/api/", parallel = TRUE, cores = detectCores())
username |
Character object of your StatsBomb API username. |
password |
Character object of your StatsBomb API password. |
competitionmatrix |
Matrix of the competition and season ids you want the events for. Competition ID in the first column and Season ID in the second column. |
version |
Character string of the version of the StatsBomb API you wish to access. Currently version v1, v2, v3, v4 and v5 are supported. |
df |
Returns a data frame with all the per-match team metrics for the seasons and competitions specified. |
comps <- competitions(username, password)
competitionmatrix = comps[,c(1,2,4,6)]
competitionmatrix <- competitionmatrix
filter(competition_name=="Serie A" | competition_name=="La Liga")
filter(season_name=="2024/2025" )
sbdata <- team_match_multicomp(username = "insert_your_username", password = "insert_your_password",
competitionmatrix, version = "v1",
baseurl = "https://data.statsbombservices.com/api/", parallel = TRUE, cores = detectCores())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.