Skip to contents

Aggregates Cricinfo delivery data into one row per player per match, with box-score stats, WPA, ERA, and Hawkeye features for both batting and bowling roles.

Usage

create_player_game_data(
  format = c("t20", "odi", "test"),
  conn = NULL,
  match_ids = NULL,
  gender = NULL
)

Arguments

format

Character. Match format: "t20", "odi", or "test".

conn

DBI connection to DuckDB. If NULL, opens a read-only connection.

match_ids

Character vector. Specific match IDs to process (NULL = all).

gender

Character. Filter by gender: "male", "female", or NULL for all.

Value

data.table with one row per player per match. Players who both bat and bowl get a single row with both batting and bowling columns. Key columns: match_id, player_id, player_name, team, match_date, role, batting_runs, batting_wpa, batting_era, bowling_wickets, bowling_wpa, bowling_era, total_wpa, total_era, plus Hawkeye features.