Skip to contents

Load ball-by-ball data with Hawkeye fields (wagon wheel, pitch map, shot type, win probability) from local DuckDB or remote GitHub release.

Usage

load_cricinfo_balls(
  match_ids = NULL,
  format = NULL,
  gender = NULL,
  source = c("remote", "local")
)

Arguments

match_ids

Character vector. Filter for specific match IDs. If NULL, loads all.

format

Character. "t20i", "odi", "test", or NULL (all formats).

gender

Character. "male", "female", or NULL (all genders).

source

Character. "remote" (default) or "local".

Value

Data frame of ball-by-ball data with Hawkeye columns.

Examples

if (FALSE) { # \dontrun{
# Load balls for a specific match
balls <- load_cricinfo_balls(match_ids = "1502145")

# Load all T20I balls
t20_balls <- load_cricinfo_balls(format = "t20i")

# From remote
balls <- load_cricinfo_balls(match_ids = "1502145", source = "remote")
} # }