# andron1dze/texas-holdem-etl architecture

> Architecture diagram of the GitHub repository andron1dze/texas-holdem-etl, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andron1dze/texas-holdem-etl
- Repository: https://github.com/andron1dze/texas-holdem-etl

## Overview

This is a reproducible Texas Hold’em ETL and player-analytics project. The documented workflow generates simulated hand histories, transforms and validates them, loads normalized SQLite tables, then produces SQL metrics, reports and notebook-based EDA/clustering. The README also describes PCA and bankroll analysis. The tree contains a parallel `sql/` copy; its substantial source files are represented separately, but their runtime wiring is not asserted. Some detailed stage boundaries and notebook inputs are documented rather than fully visible in the excerpts.

Main entry points: [`notebooks/eda_and_clustering.py`](https://github.com/andron1dze/texas-holdem-etl/blob/main/notebooks/eda_and_clustering.py) (EDA Notebook), [`src/analytics.py`](https://github.com/andron1dze/texas-holdem-etl/blob/main/src/analytics.py) (Analytics Runner), [`src/data_loader.py`](https://github.com/andron1dze/texas-holdem-etl/blob/main/src/data_loader.py) (SQLite Loader), [`data/raw`](https://github.com/andron1dze/texas-holdem-etl/tree/main/data/raw) (Raw Hand Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_etl["Hand ETL"]
  node_simulator["Hand Simulator<br/>[data_loader.py]"]
  node_transform["Normalize Records<br/>[data_loader.py]"]
  node_validation["Quality Checks<br/>[data_loader.py]"]
  node_raw["Raw Hand Data"]
  node_loader["SQLite Loader<br/>[data_loader.py]"]
  node_mirrorloader["SQL Copy ETL<br/>[data_loader.py]"]
end

subgraph group_storage["SQLite Analytics"]
  node_schema["Database Schema<br/>[database_setup.sql]"]
  node_database[("Analytics Database")]
  node_views["SQL Metrics Views"]
end

subgraph group_reporting["Reports"]
  node_analytics["Analytics Runner<br/>[analytics.py]"]
  node_reports["Charts And Stats"]
  node_mirroranalytics["SQL Copy Analytics<br/>[analytics.py]"]
end

subgraph group_exploration["EDA And ML"]
  node_notebook["EDA Notebook"]
  node_profiles["Player Ground Truth"]
  node_mirrornotebook["SQL Copy Notebook"]
end

node_operator(("Analyst"))

node_operator -->|"runs ETL"| node_simulator
node_simulator -->|"writes logs"| node_raw
node_raw -->|"normalizes"| node_transform
node_transform -->|"checks invariants"| node_validation
node_validation -->|"loads data"| node_loader
node_loader -->|"installs schema"| node_schema
node_loader -->|"writes tables"| node_database
node_analytics -->|"installs views"| node_views
node_analytics -->|"queries data"| node_database
node_analytics -->|"writes outputs"| node_reports
node_notebook -->|"queries metrics"| node_database
node_notebook -->|"installs views"| node_views
node_notebook -->|"reads profiles"| node_profiles
node_notebook -->|"saves figures"| node_reports

click node_simulator "https://github.com/andron1dze/texas-holdem-etl/blob/main/src/data_loader.py"
click node_transform "https://github.com/andron1dze/texas-holdem-etl/blob/main/src/data_loader.py"
click node_validation "https://github.com/andron1dze/texas-holdem-etl/blob/main/src/data_loader.py"
click node_raw "https://github.com/andron1dze/texas-holdem-etl/tree/main/data/raw"
click node_loader "https://github.com/andron1dze/texas-holdem-etl/blob/main/src/data_loader.py"
click node_schema "https://github.com/andron1dze/texas-holdem-etl/blob/main/sql/database_setup.sql"
click node_views "https://github.com/andron1dze/texas-holdem-etl/blob/main/sql/analytics_queries.sql"
click node_analytics "https://github.com/andron1dze/texas-holdem-etl/blob/main/src/analytics.py"
click node_reports "https://github.com/andron1dze/texas-holdem-etl/tree/main/reports"
click node_notebook "https://github.com/andron1dze/texas-holdem-etl/blob/main/notebooks/eda_and_clustering.py"
click node_profiles "https://github.com/andron1dze/texas-holdem-etl/tree/main/data/raw"
click node_mirrorloader "https://github.com/andron1dze/texas-holdem-etl/blob/main/sql/src/data_loader.py"
click node_mirroranalytics "https://github.com/andron1dze/texas-holdem-etl/blob/main/sql/src/analytics.py"
click node_mirrornotebook "https://github.com/andron1dze/texas-holdem-etl/blob/main/sql/notebooks/eda_and_clustering.py"

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_simulator,node_transform,node_validation,node_raw,node_loader,node_mirrorloader toneBlue
class node_schema,node_database,node_views toneAmber
class node_analytics,node_reports,node_mirroranalytics toneMint
class node_notebook,node_profiles,node_mirrornotebook toneRose
class node_operator toneIndigo
```

## Components

### Hand ETL

- [Hand Simulator](https://github.com/andron1dze/texas-holdem-etl/blob/main/src/data_loader.py): `src/data_loader.py`
- [Normalize Records](https://github.com/andron1dze/texas-holdem-etl/blob/main/src/data_loader.py): `src/data_loader.py`
- [Quality Checks](https://github.com/andron1dze/texas-holdem-etl/blob/main/src/data_loader.py): `src/data_loader.py`
- [Raw Hand Data](https://github.com/andron1dze/texas-holdem-etl/tree/main/data/raw): `data/raw`
- [SQLite Loader](https://github.com/andron1dze/texas-holdem-etl/blob/main/src/data_loader.py): `src/data_loader.py`
- [SQL Copy ETL](https://github.com/andron1dze/texas-holdem-etl/blob/main/sql/src/data_loader.py): `sql/src/data_loader.py`

### SQLite Analytics

- [Database Schema](https://github.com/andron1dze/texas-holdem-etl/blob/main/sql/database_setup.sql): `sql/database_setup.sql`
- **Analytics Database**
- [SQL Metrics Views](https://github.com/andron1dze/texas-holdem-etl/blob/main/sql/analytics_queries.sql): `sql/analytics_queries.sql`

### Reports

- [Analytics Runner](https://github.com/andron1dze/texas-holdem-etl/blob/main/src/analytics.py): `src/analytics.py`
- [Charts And Stats](https://github.com/andron1dze/texas-holdem-etl/tree/main/reports): `reports`
- [SQL Copy Analytics](https://github.com/andron1dze/texas-holdem-etl/blob/main/sql/src/analytics.py): `sql/src/analytics.py`

### EDA And ML

- [EDA Notebook](https://github.com/andron1dze/texas-holdem-etl/blob/main/notebooks/eda_and_clustering.py): `notebooks/eda_and_clustering.py`
- [Player Ground Truth](https://github.com/andron1dze/texas-holdem-etl/tree/main/data/raw): `data/raw`
- [SQL Copy Notebook](https://github.com/andron1dze/texas-holdem-etl/blob/main/sql/notebooks/eda_and_clustering.py): `sql/notebooks/eda_and_clustering.py`

### Other components

- **Analyst**

## Connections

- Analyst → Hand Simulator: runs ETL (evidence: `README.md`)
- Hand Simulator → Raw Hand Data: writes logs (evidence: `README.md`)
- Raw Hand Data → Normalize Records: normalizes (evidence: `README.md`)
- Normalize Records → Quality Checks: checks invariants (evidence: `README.md`)
- Quality Checks → SQLite Loader: loads data (evidence: `README.md`)
- SQLite Loader → Database Schema: installs schema (evidence: `README.md`)
- SQLite Loader → Analytics Database: writes tables (evidence: `README.md`)
- Analytics Runner → SQL Metrics Views: installs views (evidence: `src/analytics.py`)
- Analytics Runner → Analytics Database: queries data (evidence: `src/analytics.py`)
- Analytics Runner → Charts And Stats: writes outputs (evidence: `README.md`)
- EDA Notebook → Analytics Database: queries metrics (evidence: `notebooks/eda_and_clustering.py`)
- EDA Notebook → SQL Metrics Views: installs views (evidence: `notebooks/eda_and_clustering.py`)
- EDA Notebook → Player Ground Truth: reads profiles (evidence: `notebooks/eda_and_clustering.py`)
- EDA Notebook → Charts And Stats: saves figures (evidence: `README.md`)
