getEvents: Return a dataframe that contains all events and kpi values...

getEventsR Documentation

Return a dataframe that contains all events and kpi values for a set of given match IDs

Description

Return a dataframe that contains all events and kpi values for a set of given match IDs

Usage

getEvents(
  matches,
  token,
  include_kpis = TRUE,
  include_set_pieces = FALSE,
  host = "https://api.impect.com"
)

Arguments

matches

'IMPECT' match ID or a list of match IDs

token

bearer token

include_kpis

include KPIs in event data

include_set_pieces

include additional set piece data in event data

host

host environment

Value

a dataframe containing all events and kpi values for a set of given match IDs

Examples

# Toy example: this will error quickly (no API token)
try(events <- getEvents(
  matches = c(0, 1),
  token = "invalid",
  include_kpis = T,
  include_set_pieces = F
))

# Real usage: requires valid Bearer Token from `getAccessToken()`
## Not run: 
events <- getEvents(
  matches = c(84248, 158150),
  token = "yourToken",
  include_kpis = T,
  include_set_pieces = F
)

## End(Not run)

impectR documentation built on Dec. 17, 2025, 5:09 p.m.