Skip to contents

Get bowling statistics for one or all teams. Includes wickets taken, economy rate, and bowling average.

Usage

team_bowling_stats(
  team = NULL,
  match_type = NULL,
  season = NULL,
  min_matches = 10,
  source = c("local", "remote"),
  db_path = NULL
)

Arguments

team

Character. Team name (e.g., "India", "Australia"). If NULL (default), returns stats for all teams.

match_type

Character. Filter by match type: "T20", "ODI", "Test", "IT20", "MDM", or NULL for all formats. Required for remote source.

season

Character. Filter by season (e.g., "2023", "2023/24").

min_matches

Integer. Minimum matches to include (default 10). Only applies when team is NULL.

source

Character. "local" (default) uses local DuckDB. "remote" queries GitHub releases via fast download.

db_path

Character. Database path (only used when source = "local").

Value

Data frame with team bowling metrics:

  • team, matches, innings, balls_bowled, runs_conceded, wickets_taken

  • bowling_average, economy_rate, strike_rate

Examples

if (FALSE) { # \dontrun{
# Get all teams' bowling stats
all_teams <- team_bowling_stats()

# Get T20 bowling stats for all teams
t20_teams <- team_bowling_stats(match_type = "T20")

# Get stats for a specific team
india_bowling <- team_bowling_stats("India")

# Get T20 stats from remote (no local install needed)
remote_stats <- team_bowling_stats(match_type = "T20", source = "remote")
} # }