Skip to content

About

IPL Pulse Lab is an end-to-end sports analytics platform for TATA IPL 2026 that combines team and player dashboards, match outcome prediction, model evaluation, and exportable reports built with Flask, React, SQLite, and scikit-learn.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

IPL Pulse Lab

IPL Pulse Lab is a full-stack IPL analytics and forecasting platform focused on season intelligence, model evaluation, and report-ready outputs for academic and portfolio use.

Current Scope

  • IPL-first data model (teams, players, fixtures, matches, player-match stats)
  • Official-style data ingestion pipeline for:
    • season player stats
    • upcoming fixtures
    • points table override
  • Analytics views for teams and players with role-aware filtering
  • Prediction module:
    • fixture-based match prediction
    • run forecast (batters, wk-batters, all-rounders)
    • wicket forecast (bowlers, all-rounders)
  • Evaluation module:
    • rolling time-split classification evaluation
    • calibration curve and Brier score
    • rolling one-step regression evaluation for runs/wickets
    • uncertainty bands and role-wise error breakdown
  • Reporting exports:
    • player CSV
    • evaluation JSON/CSV/Markdown
    • evaluation ZIP bundle (all formats)

Tech Stack

  • Backend: Flask, Flask-CORS, SQLite, NumPy, scikit-learn
  • Frontend: React, Recharts
  • Data: SQL schema + seed + CSV ingestion pipeline

Project Structure

backend/
	app.py
	analytics/
	database/
	models/
	routes/
	utils/
frontend/
	public/
	src/
database/
	schema.sql
	insert_demo_data.sql
	sample_queries.sql
data/
	external/
	processed/
	raw/
notebooks/
	data_cleaning.ipynb
	eda_analysis.ipynb
	model_building.ipynb
scripts/
tests/

Local Setup

Backend

pip install -r requirements.txt
cd backend
python app.py

Backend runs on http://localhost:5000.

Frontend

cd frontend
npm install
npm start

Frontend runs on http://localhost:3000.

If required, set REACT_APP_API_URL to point to a different backend.

Useful Scripts (PowerShell)

./scripts/start-backend.ps1
./scripts/start-backend-prod.ps1
./scripts/start-frontend.ps1
./scripts/health-check.ps1
./scripts/verify-all.ps1

Key API Endpoints

Health and Core Analytics

  • GET /api/health
  • GET /api/analytics/overview
  • GET /api/analytics/evaluation

Entity Data

  • GET /api/players
  • GET /api/players/:id
  • GET /api/teams
  • GET /api/teams/:id
  • GET /api/teams/points-table?season=2026

Prediction APIs

  • GET /api/predictions/upcoming-matches?season=2026
  • POST /api/predictions/upcoming-match
  • POST /api/predictions/match
  • GET /api/predictions/player/:player_id?next_matches=5
  • GET /api/predictions/player-wickets/:player_id?next_matches=5

Admin/Data Refresh

  • POST /api/admin/reinitialize
  • POST /api/admin/ingest-live-data
  • POST /api/admin/ingest-player-stats
  • POST /api/admin/refresh-official-data

Report Exports

  • GET /api/reports/players.csv
  • GET /api/reports/evaluation.json
  • GET /api/reports/evaluation.csv
  • GET /api/reports/evaluation.md
  • GET /api/reports/evaluation.zip

Evaluation Notes

  • Match evaluation uses rolling time split to avoid temporal leakage.
  • Wicket fair-comparison metrics are role-qualified:
    • roles: Bowler + All-Rounder
    • preferred minimum innings per player: 5
    • auto-fallback to 3 if preferred threshold has zero samples

Data Files and Ingestion

Official Points Table Override

Use data/external/ipl_points_2026_official.csv with columns:

  • position, team, played, won, lost, no_result, points, nrr

Player Season Stats

Use data/external/ipl_player_stats_2026.csv with columns:

  • full_name, team, matches_played, runs, wickets, strike_rate, economy
  • optional: role

Upcoming Fixtures

Use data/external/ipl_upcoming_matches_2026_official.csv for fixture-linked predictions.

Tests

Run regression tests:

./.venv/Scripts/python.exe -m unittest tests/test_api.py -v

CI

GitHub Actions workflow in .github/workflows/ci.yml runs backend checks and frontend build.

About

IPL Pulse Lab is an end-to-end sports analytics platform for TATA IPL 2026 that combines team and player dashboards, match outcome prediction, model evaluation, and exportable reports built with Flask, React, SQLite, and scikit-learn.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages