Learn R Programming

StatsBombR (version 0.1.0)

player_season: This function returns aggregated metrics from the IQ API for all players 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

player_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 player metrics for the competitions and seasons specified.

Examples

Run this code
# NOT RUN {
pl2021_player_season <- player_season(username = username, password = password, 2, 90)
# }

Run the code above in your browser using DataLab