Learn R Programming

StatsBombR (version 0.1.0)

getmatch: This function returns all events for the match specified in the arguments.

Description

For use with the StatsBomb Data API credentials. This function is used to access the JSON file from the StatsBomb API and format it as a data frame (tibble) for use in R.

Usage

get.events(username = "username", password = "password", match_id = "match_id", version = "v1",
                      baseurl = "https://data.statsbombservices.com/api/")

Arguments

username

Character string of your StatsBomb API username.

password

Character string of your StatsBomb API password.

match_id

Character string of the match_id for the match you wish to access.

version

Character string of the version of the StatsBomb API you wish to access. Currently version v1, v2, v3 and v4 are supported.

Value

df

Returns a data frame with all events for the match specified.

Examples

Run this code
# NOT RUN {
events <- get.events(username = username, password = password, 14409)
# }

Run the code above in your browser using DataLab