# djsherwood/wordle-analysis architecture

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

- Interactive diagram: https://gitdiagram.com/djsherwood/wordle-analysis
- Repository: https://github.com/djsherwood/wordle-analysis

## Overview

This repository turns shared Wordle results into player-performance analysis and a dashboard. The main workflow parses WhatsApp chat scores, enriches them with answer difficulty, models failure distributions, then presents rankings, statistics, and plots. The README documents the modeling capability, but the notebook source is not excerpted; its detailed inputs and internal stages are therefore not shown. The dashboard’s configured CSV paths are also unavailable, so its data links are limited to what the excerpt supports.

Main entry points: [`WordleApp.py`](https://github.com/djsherwood/wordle-analysis/blob/main/WordleApp.py) (Dashboard and callbacks), [`ProcessWordle.py`](https://github.com/djsherwood/wordle-analysis/blob/main/ProcessWordle.py) (Processed scores), [`BetterBinomial.ipynb`](https://github.com/djsherwood/wordle-analysis/blob/main/BetterBinomial.ipynb) (Beta-binomial model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_processing["Score processing"]
  node_parse["Parse chat scores<br/>[ProcessWordle.py]"]
  node_difficulty["Score difficulty<br/>[ProcessWordle.py]"]
  node_enrich["Join score data<br/>[ProcessWordle.py]"]
  node_processed["Processed scores<br/>[ProcessWordle.py]"]
end

subgraph group_analysis["Statistical modeling"]
  node_model["Beta-binomial model"]
  node_predictions["Model predictions"]
  node_model_output["Failure density"]
end

subgraph group_dashboard["Performance dashboard"]
  node_dashboard["Dashboard and callbacks<br/>[WordleApp.py]"]
  node_player_view["Player metrics<br/>[WordleApp.py]"]
  node_charts["Rankings and charts<br/>[WordleApp.py]"]
end

node_players(("Players"))
node_chat["WhatsApp backup"]
node_answers["Answer data"]

node_players -->|"share scores"| node_chat
node_chat -->|"reads lines"| node_parse
node_answers -->|"reads answers"| node_difficulty
node_parse -->|"provides scores"| node_enrich
node_difficulty -->|"provides difficulty"| node_enrich
node_enrich -->|"writes CSV"| node_processed
node_processed -.->|"models failures"| node_model
node_model -->|"produces predictions"| node_predictions
node_model -->|"models distribution"| node_model_output
node_processed -->|"loads scores"| node_dashboard
node_predictions -->|"loads predictions"| node_dashboard
node_model_output -->|"loads model output"| node_dashboard
node_dashboard -->|"updates metrics"| node_player_view
node_dashboard -->|"updates charts"| node_charts

click node_parse "https://github.com/djsherwood/wordle-analysis/blob/main/ProcessWordle.py"
click node_difficulty "https://github.com/djsherwood/wordle-analysis/blob/main/ProcessWordle.py"
click node_enrich "https://github.com/djsherwood/wordle-analysis/blob/main/ProcessWordle.py"
click node_processed "https://github.com/djsherwood/wordle-analysis/blob/main/ProcessWordle.py"
click node_model "https://github.com/djsherwood/wordle-analysis/blob/main/BetterBinomial.ipynb"
click node_predictions "https://github.com/djsherwood/wordle-analysis/blob/main/BetterBinomial.ipynb"
click node_model_output "https://github.com/djsherwood/wordle-analysis/blob/main/BetterBinomial.ipynb"
click node_dashboard "https://github.com/djsherwood/wordle-analysis/blob/main/WordleApp.py"
click node_player_view "https://github.com/djsherwood/wordle-analysis/blob/main/WordleApp.py"
click node_charts "https://github.com/djsherwood/wordle-analysis/blob/main/WordleApp.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_parse,node_difficulty,node_enrich,node_processed toneBlue
class node_model,node_predictions,node_model_output toneAmber
class node_dashboard,node_player_view,node_charts toneMint
class node_players,node_chat,node_answers toneIndigo
```

## Components

### Score processing

- [Parse chat scores](https://github.com/djsherwood/wordle-analysis/blob/main/ProcessWordle.py): `ProcessWordle.py`
- [Score difficulty](https://github.com/djsherwood/wordle-analysis/blob/main/ProcessWordle.py): `ProcessWordle.py`
- [Join score data](https://github.com/djsherwood/wordle-analysis/blob/main/ProcessWordle.py): `ProcessWordle.py`
- [Processed scores](https://github.com/djsherwood/wordle-analysis/blob/main/ProcessWordle.py): `ProcessWordle.py`

### Statistical modeling

- [Beta-binomial model](https://github.com/djsherwood/wordle-analysis/blob/main/BetterBinomial.ipynb): `BetterBinomial.ipynb`
- [Model predictions](https://github.com/djsherwood/wordle-analysis/blob/main/BetterBinomial.ipynb): `BetterBinomial.ipynb`
- [Failure density](https://github.com/djsherwood/wordle-analysis/blob/main/BetterBinomial.ipynb): `BetterBinomial.ipynb`

### Performance dashboard

- [Dashboard and callbacks](https://github.com/djsherwood/wordle-analysis/blob/main/WordleApp.py): `WordleApp.py`
- [Player metrics](https://github.com/djsherwood/wordle-analysis/blob/main/WordleApp.py): `WordleApp.py`
- [Rankings and charts](https://github.com/djsherwood/wordle-analysis/blob/main/WordleApp.py): `WordleApp.py`

### Other components

- **Players**
- **WhatsApp backup**
- **Answer data**

## Connections

- Players → WhatsApp backup: share scores (evidence: `README.md`)
- WhatsApp backup → Parse chat scores: reads lines (evidence: `ProcessWordle.py`)
- Answer data → Score difficulty: reads answers (evidence: `ProcessWordle.py`)
- Parse chat scores → Join score data: provides scores (evidence: `ProcessWordle.py`)
- Score difficulty → Join score data: provides difficulty (evidence: `ProcessWordle.py`)
- Join score data → Processed scores: writes CSV (evidence: `ProcessWordle.py`)
- Processed scores → Beta-binomial model: models failures
- Beta-binomial model → Model predictions: produces predictions (evidence: `README.md`)
- Beta-binomial model → Failure density: models distribution (evidence: `README.md`)
- Processed scores → Dashboard and callbacks: loads scores (evidence: `WordleApp.py`)
- Model predictions → Dashboard and callbacks: loads predictions (evidence: `WordleApp.py`)
- Failure density → Dashboard and callbacks: loads model output (evidence: `WordleApp.py`)
- Dashboard and callbacks → Player metrics: updates metrics (evidence: `WordleApp.py`)
- Dashboard and callbacks → Rankings and charts: updates charts (evidence: `WordleApp.py`)
