# whoigit/stingray-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/whoigit/stingray-dashboard
- Repository: https://github.com/whoigit/stingray-dashboard

## Overview

Stingray Dashboard is a read-only Dash application for exploring cruise CSV products. Users select a dataset and file, adjust sampling and plot controls, then explore linked cruise-track, transect, time-series, and profile views; selections can reveal observation details, and selected CSV data can be downloaded. The app factory initializes data paths and reference tables before assembling the UI and registering callbacks. The README documents URL-persisted views and an optional frame-viewer link. Callback excerpts are partial, so the graph shows documented capabilities without asserting unshown callback wiring.

Main entry points: [`src/stingray_dashboard/app.py`](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/app.py) (Dash app), [`src/stingray_dashboard/callbacks.py`](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py) (Callback handlers), [`src/stingray_dashboard/data.py`](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/data.py) (CSV loading and sampling), [`src/stingray_dashboard/layout.py`](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/layout.py) (Dashboard layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["App runtime"]
  node_app["Dash app<br/>[app.py]"]
  node_layout["Dashboard layout<br/>[layout.py]"]
end

subgraph group_interaction["Dashboard interaction"]
  node_callbacks["Callback handlers<br/>[callbacks.py]"]
  node_urlstate["URL state<br/>[callbacks.py]"]
  node_cruise["Cruise-track filtering<br/>[callbacks.py]"]
  node_plots["Scientific plots<br/>[callbacks.py]"]
  node_details["Observation details<br/>[callbacks.py]"]
  node_download["CSV download<br/>[callbacks.py]"]
end

subgraph group_data["Data and science"]
  node_config["Dashboard settings<br/>[config.py]"]
  node_dataset["CSV loading and sampling<br/>[data.py]"]
  node_plotutils["Plot utilities<br/>[plot_utils.py]"]
  node_science["Seawater density<br/>[science.py]"]
  node_reference["Station and bathymetry tables"]
end

subgraph group_integrations["External inputs"]
  node_inputfiles["Dashboard CSV files"]
  node_frameviewer["Compatible frame service"]
end

node_user(("Dashboard user"))

node_user -->|"opens"| node_app
node_app -->|"initializes paths"| node_dataset
node_app -->|"sets default"| node_config
node_app -->|"builds layout"| node_layout
node_app -->|"registers callbacks"| node_callbacks
node_layout -->|"loads selector data"| node_dataset
node_layout -->|"uses defaults"| node_config
node_callbacks -->|"loads observations"| node_dataset
node_callbacks -->|"uses settings"| node_config
node_callbacks -->|"uses plotting helpers"| node_plotutils
node_callbacks -->|"uses density utilities"| node_science
node_user -->|"sets controls"| node_layout
node_user -->|"restores view"| node_urlstate
node_user -->|"filters linked plots"| node_cruise
node_user -->|"explores plots"| node_plots
node_user -->|"selects observations"| node_details
node_user -->|"downloads CSV"| node_download
node_dataset -->|"reads CSVs"| node_inputfiles
node_dataset -->|"loads bundled tables"| node_reference
node_plots -.->|"links observations"| node_frameviewer

click node_app "https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/app.py"
click node_layout "https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/layout.py"
click node_callbacks "https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py"
click node_urlstate "https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py"
click node_cruise "https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py"
click node_plots "https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py"
click node_details "https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py"
click node_download "https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py"
click node_config "https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/config.py"
click node_dataset "https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/data.py"
click node_plotutils "https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/plot_utils.py"
click node_science "https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/science.py"
click node_reference "https://github.com/whoigit/stingray-dashboard/tree/main/src/stingray_dashboard/data_reference"

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_app,node_layout,node_user toneBlue
class node_callbacks,node_urlstate,node_cruise,node_plots,node_details,node_download toneAmber
class node_config,node_dataset,node_plotutils,node_science,node_reference toneMint
class node_inputfiles,node_frameviewer toneRose
```

## Components

### App runtime

- [Dash app](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/app.py): `src/stingray_dashboard/app.py`
- [Dashboard layout](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/layout.py): `src/stingray_dashboard/layout.py`

### Dashboard interaction

- [Callback handlers](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py): `src/stingray_dashboard/callbacks.py`
- [URL state](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py): `src/stingray_dashboard/callbacks.py`
- [Cruise-track filtering](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py): `src/stingray_dashboard/callbacks.py`
- [Scientific plots](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py): `src/stingray_dashboard/callbacks.py`
- [Observation details](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py): `src/stingray_dashboard/callbacks.py`
- [CSV download](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/callbacks.py): `src/stingray_dashboard/callbacks.py`

### Data and science

- [Dashboard settings](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/config.py): `src/stingray_dashboard/config.py`
- [CSV loading and sampling](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/data.py): `src/stingray_dashboard/data.py`
- [Plot utilities](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/plot_utils.py): `src/stingray_dashboard/plot_utils.py`
- [Seawater density](https://github.com/whoigit/stingray-dashboard/blob/main/src/stingray_dashboard/science.py): `src/stingray_dashboard/science.py`
- [Station and bathymetry tables](https://github.com/whoigit/stingray-dashboard/tree/main/src/stingray_dashboard/data_reference): `src/stingray_dashboard/data_reference`

### External inputs

- **Dashboard CSV files**
- **Compatible frame service**

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Dash app: opens (evidence: `README.md`)
- Dash app → CSV loading and sampling: initializes paths (evidence: `src/stingray_dashboard/app.py`)
- Dash app → Dashboard settings: sets default (evidence: `src/stingray_dashboard/app.py`)
- Dash app → Dashboard layout: builds layout (evidence: `src/stingray_dashboard/app.py`)
- Dash app → Callback handlers: registers callbacks (evidence: `src/stingray_dashboard/app.py`)
- Dashboard layout → CSV loading and sampling: loads selector data (evidence: `src/stingray_dashboard/layout.py`)
- Dashboard layout → Dashboard settings: uses defaults (evidence: `src/stingray_dashboard/layout.py`)
- Callback handlers → CSV loading and sampling: loads observations (evidence: `src/stingray_dashboard/callbacks.py`)
- Callback handlers → Dashboard settings: uses settings (evidence: `src/stingray_dashboard/callbacks.py`)
- Callback handlers → Plot utilities: uses plotting helpers (evidence: `src/stingray_dashboard/callbacks.py`)
- Callback handlers → Seawater density: uses density utilities (evidence: `src/stingray_dashboard/callbacks.py`)
- Dashboard user → Dashboard layout: sets controls (evidence: `README.md`)
- Dashboard user → URL state: restores view (evidence: `README.md`)
- Dashboard user → Cruise-track filtering: filters linked plots (evidence: `README.md`)
- Dashboard user → Scientific plots: explores plots (evidence: `README.md`)
- Dashboard user → Observation details: selects observations (evidence: `src/stingray_dashboard/callbacks.py`)
- Dashboard user → CSV download: downloads CSV (evidence: `README.md`)
- CSV loading and sampling → Dashboard CSV files: reads CSVs (evidence: `README.md`)
- CSV loading and sampling → Station and bathymetry tables: loads bundled tables (evidence: `src/stingray_dashboard/data.py`)
- Scientific plots → Compatible frame service: links observations (evidence: `README.md`)
