This repository, StatsViz, is an advanced cricket analytics tool designed to provide in-depth insights into cricket statistics. It combines an interactive dashboard and an AI-powered natural language querying system to analyze cricket data effectively. Here's an overview of what it does:
Key Features
Interactive Dashboard:
Player Stats: Offers detailed statistics for individual players, filtered by venue, series, or date range.
Leaderboards: Displays performance rankings for batters and bowlers across matches, series, and venues.
Venue Insights: Analyzes how players and teams perform at specific grounds.
Filters and Customization: Allows users to apply filters such as player type, match type, series, venue, and date range for tailored insights.
Real-time Data: Enables live querying and analysis of cricket data.
AI Tool for Natural Language Queries:
Users can input natural language questions (e.g., "Who scored the most runs in the last IPL season?") to retrieve relevant statistics.
Uses LangChain and LangGraph to generate and execute SQL queries on a cricket database stored in Google Cloud BigQuery.
Technical Architecture
Tech Stack:
Streamlit: For building the interactive web-based user interface.
Google Cloud BigQuery: Executes SQL queries over large datasets efficiently.
LangChain and LangGraph: Powers the AI-based query system, enabling iterative query generation and improvement.
Natural Language Querying Approaches:
Approach 1: Uses an external chatbot (linked in the dashboard) to generate SQL queries, with users controlling intermediate steps for better accuracy.
Approach 2: Fully automated querying system that directly generates stats from text input, implemented in statsguru.py.
Use Cases
Cricket Analysts: Simplifies data exploration and performance analysis for players, teams, and venues.
Cricket Fans: Provides easy access to leaderboards, player comparisons, and match insights.
Data Enthusiasts: Facilitates advanced statistical exploration using SQL-backed analytics.
How to Use
The interactive dashboard lets users navigate options like "Leader Board," "Player Comparison," or "Venue Search."
For natural language queries, users can type questions directly into the dashboard, and the system will generate relevant stats.
Extension Possibilities
The project can be extended in two ways:
Controlled Workflow: A chatbot where users oversee intermediate query generation and execution.
Fully Automated Workflow: A faster, end-to-end system for generating stats with minimal user intervention.
In summary, this repository is a powerful tool for cricket analytics, combining a user-friendly dashboard with cutting-edge AI-driven query capabilities to deliver actionable insights from cricket data.