team_season: This function returns aggregated metrics from the IQ API for...

team_seasonR Documentation

This function returns aggregated metrics from the IQ API for all teams in a given league-season.

Description

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.

Usage

team_season(username, password, competition_id, season_id)

Arguments

username

Character object of your StatsBomb API username.

password

Character object of your StatsBomb API password.

competition_id

The ID of the competition you wish to pull data for. Can be either a vector or just insert the number directly.

season_id

The ID of the season you wish to pull data for. Can be either a vector or just insert the number directly.

Value

df

Returns a data frame with all the team metrics for the competitions and seasons specified.

Examples

pl2021_team_season <- team_season(username = username, password = password, 2, 90)

statsbomb/StatsBombR documentation built on Dec. 3, 2024, 11:53 p.m.