# handaru/data architecture

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

- Interactive diagram: https://gitdiagram.com/handaru/data
- Repository: https://github.com/handaru/data

## Overview

##### Project’s Main Domain Components
- Educational Content Modules – These include:
- Data Analytics (notebooks for exploratory data analysis, statistical methods, time series, etc.)
- Data Science (notebooks for machine learning, regression, classification, and model building – plus models saved under data_science/models)
- Data Visualization (Jupyter notebooks and integrations with tools like PowerBI and Tableau)
- Data Engineering / Colab – Notebooks on SQL and data pipelines under the colab/data_engineering folder.
- Practical Project Examples – Under the “buddy” folder:
- CRM Module (buddy/crm with a Python file and related PDFs)
- Risk Module (buddy/risk with Python environment and dependencies)
- SOP Module (buddy/sop, which includes further subcomponents like PDF image processing and Streamlit apps for interacting with content)
- Data Sets – Located in the "datasets" folder, these are core resources that feed the notebooks and examples.
- Configuration/Dependency Management – Files like requirements.txt, environment.yml, and .gitignore indicate versions and dependencies used across modules.

##### Out Relationships and Interactions
- Data Flow:
- Datasets (CSV files and test/train files) form the base input that feeds into the notebooks across data analytics and data science.
- Notebooks in data_science process data using models and produce artifacts, which may be visualized in the data_visualization or analytical reports.
- Modular Interaction:
- The buddy directory acts almost like a set of mini-projects or applications (CRM, risk, SOP) that could be seen as real-world applications of the data science and analytics learnings.
- The SOP module goes deeper by offering both static PDF manipulation (as seen with readmes and PDFs) and interactive dashboards through Streamlit apps.
- External Tools/Frameworks:
- Streamlit (for interactive web apps under buddy/sop/streamlit_apps) suggests a UI/UX presentation layer connected with backend processing.
- The notebooks incorporate various Python data science libraries, and the presence of environment and requirements files indicates dependency management and reproducibility.

##### Architectural Patterns & Design Principles
- Modular Structure: The directory separation into distinct domains encourages a modular view; treat each folder as an independent module with its own learning focus.
- Data-Driven Design: Emphasize that datasets are central, and everything from analysis to visualization and model building revolves around this core component.
- Reusability and Extensibility: Note that the separation of resources (e.g., standalone notebooks for different topics, self-contained mini-apps) promotes learning through hands-on examples, which can be extended or modified.

##### Technical Details to Annotate
- For components like buddy/sop, include annotations about integration with UI frameworks (like Streamlit) and PDF processing utilities.
- If relevant, note key libraries or frameworks as sub-labels (e.g., "scikit-learn, xgboost" for model building, "Pandas" for data manipulation, "Streamlit" for interactive apps).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Foundational Resources
    DS["Data Sets"]:::dataset
    Config["Configuration (Dependency Files)"]:::config

    %% Educational Content Modules
    subgraph "Educational Content Modules"
        DA["Data Analytics (Notebooks)"]:::module
        DSci["Data Science (Notebooks & Models)"]:::module
        DV["Data Visualization (Notebooks, PowerBI, Tableau)"]:::module
        DE["Data Engineering/Colab (SQL & Pipelines)"]:::module
    end

    %% Practical Project Examples
    subgraph "Practical Project Examples"
        CRM["CRM Module"]:::app
        Risk["Risk Module"]:::app
        SOP["SOP Module (PDF & Streamlit)"]:::app
    end

    %% SOP internal subcomponents
    SOP -->|"includes"| SOP_Streamlit["Streamlit Apps"]:::app
    SOP -->|"includes"| SOP_PDF["PDF Image Processing"]:::app

    %% Configuration Files Subgraph
    subgraph "Configuration Files"
        Req["requirements.txt"]:::configFile
        Git[".gitignore"]:::configFile
        RiskEnv["buddy/risk/environment.yml"]:::configFile
        RiskReq["buddy/risk/requirements.txt"]:::configFile
        ColabReadme["colab/data_engineering/README.md"]:::configFile
    end

    %% Data Flow from Foundational Resources to Educational Modules
    DS -->|"feeds"| DA
    DS -->|"feeds"| DSci
    DS -->|"feeds"| DV
    DS -->|"feeds"| DE

    %% Interaction amongst Educational Modules
    DA -->|"analysisResult"| DV
    DSci -->|"modelOutput"| DV

    %% Configuration supports Educational Modules and Practical Projects
    Config -->|"supports"| DA
    Config -->|"supports"| DSci
    Config -->|"supports"| DV
    Config -->|"supports"| DE
    Config -->|"supports"| Risk

    %% Educational modules inform Practical Applications
    DSci -->|"inspires"| CRM
    DSci -->|"inspires"| Risk
    DA -->|"inspires"| CRM
    DA -->|"inspires"| Risk
    DV -->|"inspires"| SOP
    DE -->|"inspires"| SOP

    %% Linking the Configuration Files
    Config --- Req
    Config --- Git
    Config --- RiskEnv
    Config --- RiskReq
    Config --- ColabReadme

    %% Click Events for Educational Content Modules and Data Sources
    click DS "https://github.com/handaru/data/tree/main/datasets/"
    click DA "https://github.com/handaru/data/tree/main/data_analytics/"
    click DSci "https://github.com/handaru/data/tree/main/data_science/"
    click DV "https://github.com/handaru/data/tree/main/data_visualization/"
    click DE "https://github.com/handaru/data/tree/main/colab/data_engineering/"

    %% Click Events for Practical Project Examples
    click CRM "https://github.com/handaru/data/tree/main/buddy/crm/"
    click Risk "https://github.com/handaru/data/tree/main/buddy/risk/"
    click SOP "https://github.com/handaru/data/tree/main/buddy/sop/"
    click SOP_Streamlit "https://github.com/handaru/data/tree/main/buddy/sop/streamlit_apps/"
    click SOP_PDF "https://github.com/handaru/data/tree/main/buddy/sop/pdfimage/"

    %% Click Events for Configuration Files
    click Req "https://github.com/handaru/data/blob/main/requirements.txt"
    click Git "https://github.com/handaru/data/blob/main/.gitignore"
    click RiskEnv "https://github.com/handaru/data/blob/main/buddy/risk/environment.yml"
    click RiskReq "https://github.com/handaru/data/blob/main/buddy/risk/requirements.txt"
    click ColabReadme "https://github.com/handaru/data/blob/main/colab/data_engineering/README.md"

    %% Styles
    classDef dataset fill:#f9c74f,stroke:#333,stroke-width:2px;
    classDef module fill:#90be6d,stroke:#333,stroke-width:2px;
    classDef app fill:#f94144,stroke:#333,stroke-width:2px;
    classDef config fill:#577590,stroke:#fff,stroke-width:2px;
    classDef configFile fill:#277da1,stroke:#fff,stroke-width:2px;
```
