# prtk2403/mindfultech architecture

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

- Interactive diagram: https://gitdiagram.com/prtk2403/mindfultech
- Repository: https://github.com/prtk2403/mindfultech

## Overview

##### Project Type and Purpose
- This is a data‐science/analytics project focused on exploratory data analysis and predictive modeling of mental health trends among tech professionals.
- There is no traditional “frontend/backend” service; instead the project is organized around data pipelines and Jupyter notebooks that perform cleaning, feature engineering, model training, evaluation, and visualization.

##### File Structure
- Top-level directories:
- data/
– raw/: contains the original survey.csv
– processed/: stores cleaned_data.csv and data_for_modelling.csv
- notebooks/: contains three sequential Jupyter notebooks:
– 01_data_processing.ipynb
– 02_data_modelling_and_evaluation.ipynb
– 03_data_visualizations.ipynb
- requirements.txt: lists Python dependencies
- README.md: project overview and instructions
- No separate service or library modules—this is a linear data pipeline.

##### Extract Key Architectural Insights from the README
- Two main phases:
a) Data Processing (cleaning, feature engineering, data export)
b) Modeling & Evaluation (training 5 classifiers, evaluating metrics, persisting models)
- A third implied phase: Visualizations and reporting (notebook 03)
- Technologies: Python with pandas, numpy, scikit-learn, matplotlib, seaborn, scipy

##### Main Components and Their Relationships
a. Data Layer
- Raw Data Store (data/raw/survey.csv)
- Processed Data Store (data/processed/cleaned_data.csv, data_for_modelling.csv)
b. Compute/Notebook Layer
- Data Processing Notebook (01_data_processing.ipynb)
- Modeling & Evaluation Notebook (02_data_modelling_and_evaluation.ipynb)
- Visualization Notebook (03_data_visualizations.ipynb)
c. Machine Learning Models
- Random Forest, Extra Trees, Logistic Regression, Decision Tree, Bagging
- Model artifacts persisted (e.g., joblib or pickle files—implied)
d. Reporting/Output
- Result plots, metrics tables, saved model files
e. Environment/Dependencies
- Python runtime
- Specified libraries in requirements.txt

Relationships and Data Flow

##### Architectural Patterns and Principles
- Linear pipeline pattern: sequential staging of data processing, modeling, visualization
- Clear separation of concerns: each notebook has a single responsibility
- Reproducible environment via requirements.txt

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Data Layer
    subgraph "Data Layer"
        RawData[(Raw Data Store\nsurvey.csv)]:::data
        ProcData[(Processed Data Store\ncleaned_data.csv\ndata_for_modelling.csv)]:::data
    end

    %% Compute Layer
    subgraph "Compute Layer"
        DP["01_data_processing.ipynb"]:::compute
        ME["02_data_modelling_and_evaluation.ipynb"]:::compute
        DV["03_data_visualizations.ipynb"]:::compute
    end

    %% Model Artifacts
    subgraph "Model Layer"
        ModelRepo["Model Repository\n(pickle/joblib files)"]:::model
    end

    %% Output Layer
    subgraph "Output Layer"
        Visuals["Final Reports & Plots"]:::visual
    end

    %% Environment and Documentation
    subgraph "Environment & Documentation"
        Env["requirements.txt"]:::env
        Docs["README.md"]:::env
    end

    %% Flow
    RawData -->|"clean & engineer features"| DP
    DP -->|"export cleaned & feature data"| ProcData
    ProcData -->|"train & evaluate models"| ME
    ME -->|"save model artifacts & metrics"| ModelRepo
    ModelRepo -->|"generate plots & reports"| DV
    DV -->|"produce final visuals"| Visuals

    %% Click Events
    click RawData "https://github.com/prtk2403/mindfultech/blob/master/data/raw/survey.csv"
    click ProcData "https://github.com/prtk2403/mindfultech/blob/master/data/processed/clean_data.csv"
    click ProcData "https://github.com/prtk2403/mindfultech/blob/master/data/processed/data_for_modelling.csv"
    click DP "https://github.com/prtk2403/mindfultech/blob/master/notebooks/01_data_processing.ipynb"
    click ME "https://github.com/prtk2403/mindfultech/blob/master/notebooks/02_data_modelling_and_evaluation.ipynb"
    click DV "https://github.com/prtk2403/mindfultech/blob/master/notebooks/03_data_visualizations.ipynb"
    click Env "https://github.com/prtk2403/mindfultech/blob/master/requirements.txt"
    click Docs "https://github.com/prtk2403/mindfultech/blob/master/README.md"

    %% Styles
    classDef data fill:#c2f0c2,stroke:#2d7a2d,stroke-width:2px;
    classDef compute fill:#cfe2f3,stroke:#2a65a0,stroke-width:2px;
    classDef model fill:#f9cb9c,stroke:#a65b1a,stroke-width:2px;
    classDef visual fill:#d9d2e9,stroke:#613d7c,stroke-width:2px;
    classDef env fill:#f2f2f2,stroke:#888888,stroke-width:2px;
```
