Skip to contents

Downloads cricket data from Cricsheet and loads it into a local DuckDB database. This is the main function for setting up your bouncer cricket data.

Usage

install_bouncer_data(
  formats = c("odi", "t20i"),
  leagues = c("ipl"),
  gender = "male",
  start_season = NULL,
  db_path = NULL,
  download_path = NULL,
  keep_downloads = FALSE
)

Arguments

formats

Character vector of formats to download. Options: "test", "odi", "t20i". Default is c("odi", "t20i").

leagues

Character vector of leagues to download. Options: "ipl", "bbl", "cpl", "psl", "wbbl", etc. Default is c("ipl").

gender

Character string. "male", "female", or "both". Default "male".

start_season

Character or numeric. Only download matches from this season onwards. If NULL, downloads all available data.

db_path

Database path. If NULL, uses default system data directory.

download_path

Path to store downloaded files. If NULL, uses temp directory.

keep_downloads

Logical. If TRUE, keeps downloaded JSON files. Default FALSE.

Value

Invisibly returns database path

Examples

if (FALSE) { # \dontrun{
# Install ODI and T20I data plus IPL
install_bouncer_data()

# Install all formats
install_bouncer_data(
  formats = c("test", "odi", "t20i"),
  leagues = c("ipl", "bbl")
)

# Install only recent data (from 2020 onwards)
install_bouncer_data(start_season = 2020)
} # }