# pranay-44/python-data-analysis-project architecture

> Architecture diagram of the GitHub repository pranay-44/python-data-analysis-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pranay-44/python-data-analysis-project
- Repository: https://github.com/pranay-44/python-data-analysis-project

## Overview

CricVerse is a World Cup cricket analytics dashboard: users browse India’s matches, select one, and see its scorecard, player stats, charts, and innings timeline. The documented data path begins with Cricsheet match files, which the ETL filters and transforms into four processed datasets; Flask serves those datasets through the API, and the browser renders the analysis. The frontend excerpt is partial, so chart and timeline behavior follows the README and sampled code; the listed HTML file is absent from the supplied tree.

Main entry points: [`backend/app.py`](https://github.com/pranay-44/python-data-analysis-project/blob/main/backend/app.py) (REST endpoints), [`etl.py`](https://github.com/pranay-44/python-data-analysis-project/blob/main/etl.py) (Filter and transform), [`frontend/script.js`](https://github.com/pranay-44/python-data-analysis-project/blob/main/frontend/script.js) (Match analysis), [`frontend`](https://github.com/pranay-44/python-data-analysis-project/tree/main/frontend) (Dashboard page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data preparation"]
  node_etl["Filter and transform<br/>[etl.py]"]
end

subgraph group_service["API service"]
  node_flask["Flask app<br/>[app.py]"]
  node_api["REST endpoints<br/>[app.py]"]
end

subgraph group_experience["Dashboard experience"]
  node_dashboard["Dashboard page"]
  node_match_browser["Match browser<br/>[script.js]"]
  node_match_detail["Match analysis<br/>[script.js]"]
  node_scorecard["Scorecard stats<br/>[script.js]"]
  node_charts["Worm and run charts<br/>[script.js]"]
  node_timeline["Innings timeline<br/>[script.js]"]
end

subgraph group_storage["Match data"]
  node_raw["Cricsheet match files"]
  node_matches["Match metadata<br/>[matches.json]"]
  node_deliveries["Ball deliveries<br/>[deliveries.json]"]
  node_batting["Batting figures<br/>[batting.json]"]
  node_bowling["Bowling figures<br/>[bowling.json]"]
end

node_viewer(("Cricket analyst"))

node_raw -->|"reads"| node_etl
node_etl -->|"writes"| node_matches
node_etl -->|"writes"| node_deliveries
node_etl -->|"writes"| node_batting
node_etl -->|"writes"| node_bowling
node_viewer -->|"opens"| node_dashboard
node_dashboard -->|"requests page"| node_flask
node_flask -->|"serves page"| node_dashboard
node_match_browser -->|"fetches matches"| node_api
node_match_detail -->|"fetches match data"| node_api
node_api -->|"reads"| node_matches
node_api -->|"reads"| node_deliveries
node_api -->|"reads"| node_batting
node_api -->|"reads"| node_bowling
node_dashboard -->|"shows matches"| node_match_browser
node_match_browser -->|"selects match"| node_match_detail
node_match_detail -->|"renders stats"| node_scorecard
node_match_detail -->|"renders charts"| node_charts
node_match_detail -->|"renders events"| node_timeline

click node_raw "https://github.com/pranay-44/python-data-analysis-project/tree/main/data/raw"
click node_etl "https://github.com/pranay-44/python-data-analysis-project/blob/main/etl.py"
click node_matches "https://github.com/pranay-44/python-data-analysis-project/blob/main/data/processed/matches.json"
click node_deliveries "https://github.com/pranay-44/python-data-analysis-project/blob/main/data/processed/deliveries.json"
click node_batting "https://github.com/pranay-44/python-data-analysis-project/blob/main/data/processed/batting.json"
click node_bowling "https://github.com/pranay-44/python-data-analysis-project/blob/main/data/processed/bowling.json"
click node_flask "https://github.com/pranay-44/python-data-analysis-project/blob/main/backend/app.py"
click node_api "https://github.com/pranay-44/python-data-analysis-project/blob/main/backend/app.py"
click node_dashboard "https://github.com/pranay-44/python-data-analysis-project/tree/main/frontend"
click node_match_browser "https://github.com/pranay-44/python-data-analysis-project/blob/main/frontend/script.js"
click node_match_detail "https://github.com/pranay-44/python-data-analysis-project/blob/main/frontend/script.js"
click node_scorecard "https://github.com/pranay-44/python-data-analysis-project/blob/main/frontend/script.js"
click node_charts "https://github.com/pranay-44/python-data-analysis-project/blob/main/frontend/script.js"
click node_timeline "https://github.com/pranay-44/python-data-analysis-project/blob/main/frontend/script.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_etl toneBlue
class node_flask,node_api toneAmber
class node_dashboard,node_match_browser,node_match_detail,node_scorecard,node_charts,node_timeline toneMint
class node_raw,node_matches,node_deliveries,node_batting,node_bowling toneRose
class node_viewer toneIndigo
```

## Components

### Data preparation

- [Filter and transform](https://github.com/pranay-44/python-data-analysis-project/blob/main/etl.py): `etl.py`

### API service

- [Flask app](https://github.com/pranay-44/python-data-analysis-project/blob/main/backend/app.py): `backend/app.py`
- [REST endpoints](https://github.com/pranay-44/python-data-analysis-project/blob/main/backend/app.py): `backend/app.py`

### Dashboard experience

- [Dashboard page](https://github.com/pranay-44/python-data-analysis-project/tree/main/frontend): `frontend`
- [Match browser](https://github.com/pranay-44/python-data-analysis-project/blob/main/frontend/script.js): `frontend/script.js`
- [Match analysis](https://github.com/pranay-44/python-data-analysis-project/blob/main/frontend/script.js): `frontend/script.js`
- [Scorecard stats](https://github.com/pranay-44/python-data-analysis-project/blob/main/frontend/script.js): `frontend/script.js`
- [Worm and run charts](https://github.com/pranay-44/python-data-analysis-project/blob/main/frontend/script.js): `frontend/script.js`
- [Innings timeline](https://github.com/pranay-44/python-data-analysis-project/blob/main/frontend/script.js): `frontend/script.js`

### Match data

- [Cricsheet match files](https://github.com/pranay-44/python-data-analysis-project/tree/main/data/raw): `data/raw`
- [Match metadata](https://github.com/pranay-44/python-data-analysis-project/blob/main/data/processed/matches.json): `data/processed/matches.json`
- [Ball deliveries](https://github.com/pranay-44/python-data-analysis-project/blob/main/data/processed/deliveries.json): `data/processed/deliveries.json`
- [Batting figures](https://github.com/pranay-44/python-data-analysis-project/blob/main/data/processed/batting.json): `data/processed/batting.json`
- [Bowling figures](https://github.com/pranay-44/python-data-analysis-project/blob/main/data/processed/bowling.json): `data/processed/bowling.json`

### Other components

- **Cricket analyst**

## Connections

- Cricsheet match files → Filter and transform: reads
- Filter and transform → Match metadata: writes
- Filter and transform → Ball deliveries: writes
- Filter and transform → Batting figures: writes
- Filter and transform → Bowling figures: writes
- Cricket analyst → Dashboard page: opens
- Dashboard page → Flask app: requests page
- Flask app → Dashboard page: serves page
- Match browser → REST endpoints: fetches matches
- Match analysis → REST endpoints: fetches match data
- REST endpoints → Match metadata: reads
- REST endpoints → Ball deliveries: reads
- REST endpoints → Batting figures: reads
- REST endpoints → Bowling figures: reads
- Dashboard page → Match browser: shows matches
- Match browser → Match analysis: selects match
- Match analysis → Scorecard stats: renders stats
- Match analysis → Worm and run charts: renders charts
- Match analysis → Innings timeline: renders events
