# c-wilkinson/athlete-activity-dashboard architecture

> Architecture diagram of the GitHub repository c-wilkinson/athlete-activity-dashboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/c-wilkinson/athlete-activity-dashboard
- Repository: https://github.com/c-wilkinson/athlete-activity-dashboard

## Overview

This Streamlit dashboard turns configured Excel, CSV, or Google Sheets results into a normalized athletics-performance dataset, then presents it through overview, results, progress, and bests pages. The principal workflow is configuration → source loading → cleaning and event resolution → PB marking → page rendering. The graph also captures charting and shared performance-formatting responsibilities. Relationships are limited to calls shown in excerpts or explicitly documented capabilities; unsampled page internals and configuration wiring are not inferred.

Main entry points: [`app.py`](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/app.py) (Streamlit App), [`src/pages/overview.py`](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/pages/overview.py) (Overview), [`src/data_loader.py`](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/data_loader.py) (Results Loader), [`src/personal_bests.py`](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/personal_bests.py) (PB and Season-Best Rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Configuration and Ingestion"]
  node_config["Config Loader<br/>[config.py]"]
  node_loader["Results Loader<br/>[data_loader.py]"]
end

subgraph group_domain["Performance Processing"]
  node_cleaner["Result Normalizer<br/>[data_cleaner.py]"]
  node_performance["Performance Helpers<br/>[performances.py]"]
  node_bests["PB and Season-Best Rules<br/>[personal_bests.py]"]
end

subgraph group_ui["Dashboard Pages"]
  node_entry["Streamlit App<br/>[app.py]"]
  node_overview["Overview<br/>[overview.py]"]
  node_results["Results Explorer<br/>[results.py]"]
  node_progress["Progress Page<br/>[progress.py]"]
  node_pb_page["Bests Page<br/>[personal_bests.py]"]
end

subgraph group_visuals["Charts"]
  node_charts["Chart Builders<br/>[charts.py]"]
end

node_athlete(("Athlete"))
node_external_data[("Configured Results Source")]
node_profiles["Athlete Profile Links"]

node_athlete -->|"uses dashboard"| node_entry
node_entry -->|"loads settings"| node_config
node_entry -->|"loads results"| node_loader
node_loader -->|"resolves paths"| node_config
node_loader -->|"reads configured source"| node_external_data
node_entry -->|"normalizes rows"| node_cleaner
node_cleaner -->|"formats and calculates"| node_performance
node_entry -->|"marks performances"| node_bests
node_entry -->|"routes to"| node_overview
node_entry -->|"routes to"| node_results
node_entry -->|"routes to"| node_progress
node_entry -->|"routes to"| node_pb_page
node_overview -->|"calculates current bests"| node_bests
node_pb_page -->|"calculates lifetime and season bests"| node_bests
node_overview -->|"builds progress chart"| node_charts
node_progress -->|"builds progress and age charts"| node_charts
node_overview -->|"displays configured links"| node_profiles

click node_entry "https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/app.py"
click node_config "https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/config.py"
click node_loader "https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/data_loader.py"
click node_cleaner "https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/data_cleaner.py"
click node_performance "https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/performances.py"
click node_bests "https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/personal_bests.py"
click node_overview "https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/pages/overview.py"
click node_results "https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/pages/results.py"
click node_progress "https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/pages/progress.py"
click node_pb_page "https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/pages/personal_bests.py"
click node_charts "https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/charts.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_config,node_loader toneBlue
class node_cleaner,node_performance,node_bests,node_external_data toneAmber
class node_entry,node_overview,node_results,node_progress,node_pb_page toneMint
class node_charts toneRose
class node_athlete,node_profiles toneIndigo
```

## Components

### Configuration and Ingestion

- [Config Loader](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/config.py): `src/config.py`
- [Results Loader](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/data_loader.py): `src/data_loader.py`

### Performance Processing

- [Result Normalizer](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/data_cleaner.py): `src/data_cleaner.py`
- [Performance Helpers](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/performances.py): `src/performances.py`
- [PB and Season-Best Rules](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/personal_bests.py): `src/personal_bests.py`

### Dashboard Pages

- [Streamlit App](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/app.py): `app.py`
- [Overview](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/pages/overview.py): `src/pages/overview.py`
- [Results Explorer](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/pages/results.py): `src/pages/results.py`
- [Progress Page](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/pages/progress.py): `src/pages/progress.py`
- [Bests Page](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/pages/personal_bests.py): `src/pages/personal_bests.py`

### Charts

- [Chart Builders](https://github.com/c-wilkinson/athlete-activity-dashboard/blob/main/src/charts.py): `src/charts.py`

### Other components

- **Athlete**
- **Configured Results Source**
- **Athlete Profile Links**

## Connections

- Athlete → Streamlit App: uses dashboard (evidence: `README.md`)
- Streamlit App → Config Loader: loads settings (evidence: `app.py`)
- Streamlit App → Results Loader: loads results (evidence: `app.py`)
- Results Loader → Config Loader: resolves paths (evidence: `src/data_loader.py`)
- Results Loader → Configured Results Source: reads configured source (evidence: `README.md`)
- Streamlit App → Result Normalizer: normalizes rows (evidence: `app.py`)
- Result Normalizer → Performance Helpers: formats and calculates (evidence: `src/data_cleaner.py`)
- Streamlit App → PB and Season-Best Rules: marks performances (evidence: `app.py`)
- Streamlit App → Overview: routes to (evidence: `app.py`)
- Streamlit App → Results Explorer: routes to (evidence: `app.py`)
- Streamlit App → Progress Page: routes to (evidence: `app.py`)
- Streamlit App → Bests Page: routes to (evidence: `app.py`)
- Overview → PB and Season-Best Rules: calculates current bests (evidence: `src/pages/overview.py`)
- Bests Page → PB and Season-Best Rules: calculates lifetime and season bests (evidence: `src/pages/personal_bests.py`)
- Overview → Chart Builders: builds progress chart (evidence: `src/pages/overview.py`)
- Progress Page → Chart Builders: builds progress and age charts (evidence: `src/pages/progress.py`)
- Overview → Athlete Profile Links: displays configured links (evidence: `README.md`)
