# rishabhzn200/stock-data-visualization-using-bokeh architecture

> Architecture diagram of the GitHub repository rishabhzn200/stock-data-visualization-using-bokeh, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rishabhzn200/stock-data-visualization-using-bokeh
- Repository: https://github.com/rishabhzn200/stock-data-visualization-using-bokeh

## Overview

This is a small Bokeh application for interactively comparing five years of S&P 500 stock prices. It loads the CSV, presents an initial chart and stock selector, then lets users add tickers and toggle them to refresh the chart. The runtime is concentrated in Stocks.py; the graph separates its interaction stages from rendering. The available excerpt shows the CSV loading and callback wiring, but not a separate server or deployment setup.

Main entry points: [`Stocks.py`](https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py) (App startup), [`all_stocks_5yr.csv`](https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/all_stocks_5yr.csv) (Stock history CSV)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Visualization runtime"]
  node_startup["App startup<br/>[Stocks.py]"]
  node_selector["Ticker dropdown<br/>[Stocks.py]"]
  node_menu_handler["Menu handler<br/>[Stocks.py]"]
  node_checkboxes["Ticker checkboxes<br/>[Stocks.py]"]
  node_checkbox_handler["Checkbox handler<br/>[Stocks.py]"]
  node_plotter["Plot updater<br/>[Stocks.py]"]
  node_bokeh_doc["Bokeh chart document<br/>[Stocks.py]"]
end

subgraph group_data["Stock data"]
  node_csv["Stock history CSV<br/>[all_stocks_5yr.csv]"]
end

node_user(("Viewer"))

node_startup -->|"loads"| node_csv
node_startup -->|"creates"| node_selector
node_startup -->|"adds initial chart"| node_bokeh_doc
node_user -->|"selects ticker"| node_selector
node_selector -->|"dispatches change"| node_menu_handler
node_menu_handler -->|"creates checkbox"| node_checkboxes
node_user -->|"toggles ticker"| node_checkboxes
node_checkboxes -->|"dispatches change"| node_checkbox_handler
node_checkbox_handler -->|"calls update"| node_plotter
node_plotter -->|"filters ticker data"| node_csv
node_plotter -->|"rebuilds chart"| node_bokeh_doc

click node_startup "https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py"
click node_csv "https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/all_stocks_5yr.csv"
click node_selector "https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py"
click node_menu_handler "https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py"
click node_checkboxes "https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py"
click node_checkbox_handler "https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py"
click node_plotter "https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py"
click node_bokeh_doc "https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.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_startup,node_selector,node_menu_handler,node_checkboxes,node_checkbox_handler,node_plotter,node_bokeh_doc,node_user toneBlue
class node_csv toneAmber
```

## Components

### Visualization runtime

- [App startup](https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py): `Stocks.py`
- [Ticker dropdown](https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py): `Stocks.py`
- [Menu handler](https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py): `Stocks.py`
- [Ticker checkboxes](https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py): `Stocks.py`
- [Checkbox handler](https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py): `Stocks.py`
- [Plot updater](https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py): `Stocks.py`
- [Bokeh chart document](https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/Stocks.py): `Stocks.py`

### Stock data

- [Stock history CSV](https://github.com/rishabhzn200/stock-data-visualization-using-bokeh/blob/master/all_stocks_5yr.csv): `all_stocks_5yr.csv`

### Other components

- **Viewer**

## Connections

- App startup → Stock history CSV: loads (evidence: `Stocks.py`)
- App startup → Ticker dropdown: creates (evidence: `Stocks.py`)
- App startup → Bokeh chart document: adds initial chart (evidence: `Stocks.py`)
- Viewer → Ticker dropdown: selects ticker (evidence: `Stocks.py`)
- Ticker dropdown → Menu handler: dispatches change (evidence: `Stocks.py`)
- Menu handler → Ticker checkboxes: creates checkbox (evidence: `Stocks.py`)
- Viewer → Ticker checkboxes: toggles ticker (evidence: `Stocks.py`)
- Ticker checkboxes → Checkbox handler: dispatches change (evidence: `Stocks.py`)
- Checkbox handler → Plot updater: calls update (evidence: `Stocks.py`)
- Plot updater → Stock history CSV: filters ticker data (evidence: `Stocks.py`)
- Plot updater → Bokeh chart document: rebuilds chart (evidence: `Stocks.py`)
