Skip to contents

Data Installation

Install and update cricket data

install_all_bouncer_data()
Install All Bouncer Cricket Data (Optimized)
install_bouncer_data()
Install Bouncer Cricket Data
install_bouncerdata_from_release()
Install Bouncerdata from GitHub Release
install_parquets_from_release()
Install Parquet Files from Core Release
update_bouncerdata()
Update Bouncerdata from Release
get_latest_release()
Get Latest Release Info from GitHub

Database Connection

Connect to and manage the database

connect_to_bouncer()
Connect to Bouncer Database
disconnect_bouncer()
Disconnect from Bouncer Database
get_db_path()
Get Database Path
find_bouncerdata_dir()
Find Bouncerdata Directory
force_close_duckdb()
Force Close All DuckDB Connections
migrate_to_schemas()
Migrate Existing Database to Schema Namespaces

Data Loading

Load data from the database into R

load_matches()
Load Matches Data
load_deliveries()
Load Deliveries Data
load_innings()
Load Match Innings Data
load_players()
Load Players Data
load_powerplays()
Load Powerplays Data
load_team_elo()
Load Team ELO Ratings
load_team_skill()
Load Team Skill Indices
load_player_skill()
Load Player Skill Indices
load_venue_skill()
Load Venue Skill Indices

Cricinfo Data

Load rich ball-by-ball data with Hawkeye fields from ESPN Cricinfo

ingest_cricinfo_data()
Ingest Cricinfo Data into DuckDB
load_cricinfo_balls()
Load Cricinfo Ball-by-Ball Data
load_cricinfo_match()
Load Cricinfo Match Metadata
load_cricinfo_innings()
Load Cricinfo Innings/Scorecard Data
load_cricinfo_fixtures()
Load Cricinfo Fixtures
get_upcoming_matches()
Get Upcoming Matches
get_unscraped_matches()
Get Unscraped Matches
add_cricinfo_tables()
Add Cricinfo Tables to Existing Database

Weather Data

Fetch and manage weather data for cricket matches

geocode_venues()
Geocode Multiple Venues
fetch_weather_openmeteo()
Fetch Daily Weather from Open-Meteo Archive API
fetch_forecast_weather()
Fetch Forecast Weather for Upcoming Match
load_venue_coordinates()
Load Venue Coordinates from Database
load_match_weather()
Load Match Weather Data
add_weather_features()
Prepare Weather Features for Modeling

Fox Sports Data

Load ball-by-ball data from Fox Sports

ingest_fox_sports_data()
Ingest Fox Sports Data into DuckDB
load_fox_balls()
Load Fox Sports Ball-by-Ball Data
load_fox_details()
Load Fox Sports Match Details
load_fox_players()
Load Fox Sports Player Data
add_foxsports_tables()
Add Fox Sports Tables to Existing Database

Player Analysis

Look up and analyze player performance

get_player()
Get Player Information
analyze_player()
Analyze Player Performance
compare_players()
Compare Two Players
search_players()
Search Players
rank_players()
Rank Players by ELO Rating
player_batting_stats() calculate_player_batting_stats()
Player Batting Stats
player_bowling_stats() calculate_player_bowling_stats()
Player Bowling Stats
analyze_batter_vs_bowler()
Analyze Batter vs Bowler Matchup

Team Analysis

Team ratings and matchups

get_team()
Get Team Information
compare_teams()
Compare Two Teams
search_teams()
Search Teams
team_batting_stats()
Team Batting Stats
team_bowling_stats()
Team Bowling Stats
head_to_head()
Head to Head Record

Venue Analysis

Venue statistics and conditions

venue_stats()
Venue Statistics

Match Analysis

Analyze completed matches

analyze_match()
Analyze a Match
query_matches()
Query Matches

Predictions

Match outcome and in-game predictions

predict_match()
Predict Match Outcome
predict_match_outcome()
Predict Match Outcome
predict_win_probability()
Predict Win Probability from Current Game State
calculate_projected_score()
Calculate Projected Score

Simulation

Ball-by-ball match simulation

simulate_match_ballbyball()
Simulate Match Ball-by-Ball
quick_match_simulation()
Quick Match Simulation
simulate_innings()
Simulate Innings
simulate_delivery()
Simulate Single Delivery
simulate_season()
Simulate Season
simulate_season_n()
Simulate Season Multiple Times
simulate_ipl_playoffs()
Simulate IPL Playoffs
create_simulation_config()
Create Simulation Configuration

ELO Ratings

Team and player rating functions

get_team_elo()
Get Team ELO
get_dynamic_k()
Get Dynamic K Factor

Hawkeye Features

Advanced player features from Cricinfo Hawkeye data

calculate_hawkeye_batter_features()
Calculate Hawkeye Batter Features
calculate_hawkeye_bowler_features()
Calculate Hawkeye Bowler Features
get_hawkeye_coverage()
Get Hawkeye Feature Summary

Centrality & PageRank

Network-based player quality adjustment

get_centrality_as_of()
Get Centrality As Of Date
get_centrality_snapshot_dates()
Get Centrality Snapshot Dates
calculate_player_centrality()
Calculate Player Network Centrality from Database
apply_centrality_correction()
Apply Centrality Regression to ELO
calculate_centrality_regression()
Calculate Centrality-Based ELO Regression
get_pagerank_as_of()
Get PageRank As Of Date
get_pagerank_snapshot_dates()
Get PageRank Snapshot Dates
get_top_pagerank_players()
Get Top Players by PageRank
print_centrality_summary()
Print Centrality Summary
print_pagerank_summary()
Print PageRank Summary

Visualization

ggplot2-based cricket charts

theme_bouncer()
Bouncer ggplot2 Theme
plot_score_progression()
Plot Score Progression
plot_win_probability()
Plot Win Probability Over Match
plot_skill_progression()
Plot Player Skill Progression
plot_player_comparison()
Plot Player Comparison
plot_elo_history()
Plot Team ELO History
plot_team_strength()
Plot Team Strength Breakdown

Database Queries

Direct database access for advanced users

query_deliveries()
Query Deliveries
query_batter_stats()
Query Batter Stats
query_bowler_stats()
Query Bowler Stats
query_player_stats()
Query Player Stats

Data Parsing

Parse Cricsheet JSON files

parse_cricsheet_json()
Parse Cricsheet JSON File
get_model_format()
Get Model Format for Internal Processing

Score Projection

Innings score projection utilities

calculate_projection_resource()
Calculate Projection Resource Remaining
calculate_test_projected_score()
Calculate Test Match Projected Score
calculate_test_overs_remaining()
Calculate Test Match Overs Remaining
estimate_test_innings_overs_remaining()
Estimate Overs Remaining in Current Innings (Test)
estimate_test_total_overs()
Estimate Test Match Total Overs

Remote Data

Remote data source utilities

get_remote_manifest()
Get Remote Manifest
get_remote_match_ids()
Get Remote Match IDs
get_remote_partition_info()
Get Remote Partition Info
get_remote_tables()
Get Available Remote Tables
clear_remote_cache()
Clear Remote Data Cache
fox_list_formats()
List available FOX Sports cricket formats

Utilities

Additional helper functions

get_data_info()
Get Data Info
get_all_data_folders()
Get All Folder Names for Data Organization
add_prediction_tables()
Add Prediction Tables to Database
list_available_formats()
List Available Formats in Database

Pipeline Benchmarking

Track and compare model performance across pipeline runs

record_benchmarks()
Record Multiple Benchmark Results
get_latest_benchmark()
Get Latest Benchmark for a Model
check_benchmark_regression()
Compare Current Run Against Previous
get_benchmark_history()
Get Benchmark History
print_benchmark_summary()
Print Benchmark Summary
tune_xgb_params()
Tune XGBoost Hyperparameters via Random Search

Rating Internals

Low-level functions for ELO and skill index calculations

bound_player_elo()
Apply Bounds to Player ELO
bound_skill()
Bound Skill to Valid Range
bound_venue_elo()
Apply Bounds to Venue ELO
calculate_expected_runs_skill()
Calculate Expected Runs (Skill Index)
calculate_expected_wicket_skill()
Calculate Expected Wicket Probability (Skill Index)
build_skill_index_params()
Build Skill Index Parameters for Format and Gender
normalize_format()
Normalize Cricket Format Name
model_exists()
Check if Model Exists
get_model_filename()
Get Model Filename
get_model_path()
Get Full Model Path

Constants & Configuration

Getters for format-specific constants and model configuration

get_agnostic_baselines()
Get Agnostic Baselines for Deliveries
get_centrality_k_multiplier()
Get Centrality K-Factor Multiplier
get_format_groups()
Get Format Groups Mapping
get_gender_categories()
Get Gender Categories Mapping
get_league_baseline_as_of()
Get League Baseline As Of Date
get_league_starting_elo()
Get League-Specific Starting ELO
get_match_types_for_format()
Get Match Types for Format
get_max_balls()
Get Maximum Balls for Format
get_max_overs()
Get Maximum Overs for Format
get_models_dir()
Get Models Directory Path
get_run_elo_weights()
Get Run ELO attribution weights for format-gender
get_run_k_factors()
Get player Run K-factors for format-gender
get_runs_per_100_elo()
Get runs per 100 ELO points for format-gender
get_skill_alpha()
Get Skill Alpha (Learning Rate)
get_skill_alpha_params()
Get Skill Index Alpha (Learning Rate) Parameters
get_skill_decay()
Get Skill Decay Rate for Format
get_skill_weights()
Get Skill Index Attribution Weights
get_venue_k_factors()
Get venue K-factors for format-gender
get_wicket_elo_divisor()
Get wicket ELO divisor for format-gender
get_wicket_elo_weights()
Get Wicket ELO attribution weights for format-gender
get_wicket_k_factors()
Get player Wicket K-factors for format-gender

S3 Methods

Print methods for bouncer objects

print(<bouncer_match>)
Print Method for bouncer_match Objects
print(<bouncer_player>)
Print Method for bouncer_player Objects
print(<bouncer_player_analysis>)
Print Method for bouncer_player_analysis Objects
print(<bouncer_player_comparison>)
Print Method for bouncer_player_comparison Objects
print(<bouncer_prediction>)
Print Method for bouncer_prediction Objects
print(<bouncer_team>)
Print Method for bouncer_team Objects
print(<bouncer_team_comparison>)
Print Method for bouncer_team_comparison Objects
print(<bouncer_win_prob>)
Print method for bouncer_win_prob objects