Skip to contents

Scans the fox_cricket directory for combined parquet files and loads ball-by-ball, player, and match detail data into DuckDB. Skips matches already in the database.

Usage

ingest_fox_sports_data(
  fox_dir = NULL,
  path = NULL,
  formats = NULL,
  verbose = TRUE
)

Arguments

fox_dir

Character. Path to the fox_cricket data directory (e.g., "../bouncerdata/fox_cricket"). If NULL, auto-detects from bouncerdata sibling directory.

path

Character. Database file path. If NULL, uses default.

formats

Character vector. Formats to ingest (e.g., "test", "t20i", "bbl"). If NULL, auto-discovers all available formats from directory.

verbose

Logical. Print progress messages. Default TRUE.

Value

Invisibly returns a list with counts of ingested records.

Examples

if (FALSE) { # \dontrun{
# Ingest all formats from default location
ingest_fox_sports_data()

# Ingest only BBL data
ingest_fox_sports_data(formats = "bbl")

# Ingest from a specific directory
ingest_fox_sports_data(fox_dir = "path/to/fox_cricket")
} # }