Skip to content

Home / Use cases

Use cases

CricketLogic fits anywhere you need clean, queryable ball-by-ball cricket data: fantasy modelling, player and team analytics, stat sites, and reproducible research.

Fantasy points modelling

Build and back-test fantasy scoring from raw deliveries. The fantasy_points view already scores batting (runs, boundary bonuses) and bowling (wickets) per player; fork the SQL to match your platform’s rules.

SELECT player, team, total_fantasy_points
FROM fantasy_points
WHERE competition = 'Indian Premier League'
ORDER BY total_fantasy_points DESC
LIMIT 20;

Player & team analytics

Compute strike rates, economy, averages, boundary counts and partnerships across any competition, era or format — every metric derives from ball-by-ball rows, so you control the filters.

SELECT batsman, team, runs_scored, strike_rate, sixes
FROM batting_performance
WHERE match_type = 'T20' AND balls_faced >= 500
ORDER BY strike_rate DESC;

Powering stat & companion sites

Use CricketLogic as the offline engine behind a public stats site. Ingest Cricsheet, compute views, export to JSON, and render fast static pages. ipltracker.com is a live example — its IPL records are computed by this engine.

Live example: ipltracker.com →

# Nightly: refresh + export
cricketlogic download auto-update --days 3
cricketlogic query "SELECT * FROM batting_performance
  WHERE competition = 'Indian Premier League'" > career.json

Research & reproducible analysis

Because the warehouse is a single DuckDB file built from open Cricsheet data, analyses are reproducible and shareable. Pin the data, share the .duckdb, and anyone re-runs your SQL to the same numbers.

-- Reproducible: same YAML in -> same rows out
SELECT match_type, COUNT(*) AS matches
FROM match_summary GROUP BY match_type ORDER BY matches DESC;

Last updated 2026-07-02 · Views and columns verified against cricketlogic/core.py · Source: https://github.com/cricketlogic/cricketlogic