# rreece/statistics-notebooks architecture

> Architecture diagram of the GitHub repository rreece/statistics-notebooks, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rreece/statistics-notebooks
- Repository: https://github.com/rreece/statistics-notebooks

## Overview

##### Project type and purpose
- This is an open-source/statistics “notebooks” project that provides:
- A collection of Jupyter notebooks for teaching or exploring statistical concepts
- A small core Python library (packages under python/) that implements covariance calculators, plotting utilities (hepplot), etc.
- Documentation in docs/
- A test suite under tests/
- CI via GitHub Actions (ci.yml), and setup scripts (setup.sh, Makefile)
- Its primary use case is interactive data exploration and demonstration of statistical routines.

##### File structure
Top level:
.github/workflows/ci.yml    → CI pipeline definition
python/                     → Core library code
├── covariance_calculators
└── hepplot
notebooks/                  → Jupyter notebooks (example workflows, tutorials)
docs/                       → Written notes, results, TODOs, images
tests/                      → pytest test modules for library functionality
setup.sh & requirements.txt→ Environment/virtualenv setup
Makefile                    → High-level commands (e.g., lint, test, docs)

##### README for additional insights
- Confirms primary focus is on launching Jupyter and exploring notebooks

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Development
    Developer["Developer Workstation"]:::dev
    VirtualEnv(("Virtual Environment")):::dev
    makefile["Makefile"]:::dev
    reqs["requirements.txt"]:::dev

    Developer -->|"setup.sh"| VirtualEnv
    click Developer "https://github.com/rreece/statistics-notebooks/blob/main/setup.sh"
    Developer -->|Makefile| makefile
    click Developer "https://github.com/rreece/statistics-notebooks/tree/main/Makefile"
    Developer -->|requirements.txt| reqs
    click Developer "https://github.com/rreece/statistics-notebooks/blob/main/requirements.txt"

    %% Interactive Layer
    Jupyter["Jupyter Notebook Server & UI"]:::dev
    Developer -->|"jupyter notebook"| Jupyter
    click Jupyter "https://github.com/rreece/statistics-notebooks/tree/main/notebooks/"

    NotebookContent["Notebook Content (notebooks/*.ipynb)"]:::dev
    Jupyter -->|"serve notebooks"| NotebookContent
    click NotebookContent "https://github.com/rreece/statistics-notebooks/tree/main/notebooks/"

    %% Core Library
    subgraph "Core Python Library" 
        direction TB
        CoreLib["python/"]:::code
        CovCalc["covariance_calculators/"]:::code
        Hepplot["hepplot/"]:::code
    end
    NotebookContent -->|"import"| CoreLib
    CoreLib --> CovCalc
    CoreLib --> Hepplot
    click CoreLib "https://github.com/rreece/statistics-notebooks/tree/main/python/"
    click CovCalc "https://github.com/rreece/statistics-notebooks/tree/main/python/covariance_calculators/"
    click Hepplot "https://github.com/rreece/statistics-notebooks/tree/main/python/hepplot/"

    %% Verification
    subgraph "Test Suite (pytest)" 
        direction TB
        Tests["tests/"]:::verify
        T1["test_covariance_intervals.py"]:::verify
        T2["test_hepplot.py"]:::verify
        T3["test_hepstats.py"]:::verify
        T4["test_online_covariance.py"]:::verify
        T5["test_example.py"]:::verify
        T6["test_venv.py"]:::verify
        T7["foo.py"]:::verify
        Tests --> T1
        Tests --> T2
        Tests --> T3
        Tests --> T4
        Tests --> T5
        Tests --> T6
        Tests --> T7
    end
    VirtualEnv -->|"pytest"| Tests
    click Tests "https://github.com/rreece/statistics-notebooks/tree/main/tests/"
    click T1 "https://github.com/rreece/statistics-notebooks/blob/main/tests/test_covariance_intervals.py"
    click T2 "https://github.com/rreece/statistics-notebooks/blob/main/tests/test_hepplot.py"
    click T3 "https://github.com/rreece/statistics-notebooks/blob/main/tests/test_hepstats.py"
    click T4 "https://github.com/rreece/statistics-notebooks/blob/main/tests/test_online_covariance.py"
    click T5 "https://github.com/rreece/statistics-notebooks/blob/main/tests/test_example.py"
    click T6 "https://github.com/rreece/statistics-notebooks/blob/main/tests/test_venv.py"
    click T7 "https://github.com/rreece/statistics-notebooks/blob/main/tests/foo.py"

    %% Documentation
    subgraph "Documentation" 
        direction TB
        Docs["docs/"]:::doc
        DocsMd["*.md"]:::doc
        DocsImg["img/"]:::doc
        Docs --> DocsMd
        Docs --> DocsImg
    end
    VirtualEnv -->|"docs build"| Docs
    click Docs "https://github.com/rreece/statistics-notebooks/tree/main/docs/"
    click DocsMd "https://github.com/rreece/statistics-notebooks/blob/main/docs/*.md"
    click DocsImg "https://github.com/rreece/statistics-notebooks/tree/main/docs/img/"

    %% CI/CD
    CI["GitHub Actions CI"]:::verify
    CI -->|"checkout"| VirtualEnv
    CI -->|"install dependencies"| VirtualEnv
    CI -->|"pytest"| Tests
    CI -->|"build docs"| Docs
    click CI "https://github.com/rreece/statistics-notebooks/blob/main/.github/workflows/ci.yml"

    %% Configuration
    subgraph "Project Configuration & Metadata"
        direction TB
        Config["Configuration Files"]:::code
        README["README.md"]:::code
        LICENSE["LICENSE"]:::code
        Gitignore[".gitignore"]:::code
        Gitmodules[".gitmodules"]:::code
        Config --> README
        Config --> LICENSE
        Config --> Gitignore
        Config --> Gitmodules
    end
    click README "https://github.com/rreece/statistics-notebooks/blob/main/README.md"
    click LICENSE "https://github.com/rreece/statistics-notebooks/tree/main/LICENSE"
    click Gitignore "https://github.com/rreece/statistics-notebooks/blob/main/.gitignore"
    click Gitmodules "https://github.com/rreece/statistics-notebooks/blob/main/.gitmodules"

    %% Styles
    classDef dev fill:#D0E8FF,stroke:#0366D6,color:#0366D6;
    classDef code fill:#E6FFEA,stroke:#28A745,color:#22863A;
    classDef verify fill:#FFF5E5,stroke:#D97706,color:#A85B00;
    classDef doc fill:#F0F0F0,stroke:#6A737D,color:#24292E;
```
