# hunchd/job-market-analysis architecture

> Architecture diagram of the GitHub repository hunchd/job-market-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hunchd/job-market-analysis
- Repository: https://github.com/hunchd/job-market-analysis

## Overview

##### Main Components
- Data Sources: The primary dataset originates from external sources (i.e., Kaggle’s job postings) which is later cleaned using Excel.
- ETL (Data Preparation) Layer: This is represented by the “sql_load” folder that contains the scripts to create the database, tables, and make schema modifications.
- Database System: MySQL is used as the DBMS where the cleaned data is loaded.
- Query & Analysis Layer: The “Job_Market_EDA” folder houses multiple SQL files each answering specific analysis tasks (e.g., salary analysis, remote work trends, skills analysis, etc.).
- Visualization & Reporting: The “assets” folder includes generated graphical outputs (bar graphs, pie chart, etc.) and is also utilized for creating presentation-ready charts.

##### Relationships and Data Flow
- The Database (MySQL) then serves as the central repository.
- SQL queries in the “Job_Market_EDA” folder are executed against this database to produce analyses corresponding to:
- Job trends and demand,
- Salary analysis,
- Skills and their related salaries,
- Remote work analysis,
- Education and job correlations,
- Geographical insights.
- The results of these queries are visualized (saved in the assets folder) and documented within the README.

##### Architectural Patterns and Technologies
- Separation of concerns: Notice that ETL, data storage, analysis logic, and visualization are clearly separated into different folders.
- Use of SQL-centric analysis: The project emphasizes in-depth querying using advanced SQL techniques (CTEs, window functions, subqueries) in the Job_Market_EDA layer.
- The analytical flow follows a “data ingestion – processing – analysis – visualization” pattern.
- Technologies include Excel (for cleaning and visualization post-processing), MySQL (database operations), and Git (version control) as noted in the README.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Global Entities
    DS["Data Source (Kaggle Job Postings)"]:::data

    %% ETL Layer
    subgraph "Data Cleaning & ETL"
        EX["Excel Cleaning"]:::process
        SQL_Scripts["SQL Scripts (sql_load)"]:::process
    end

    %% Database Layer
    DB["Database (MySQL)"]:::database

    %% SQL Analysis Modules
    subgraph "SQL Analysis Modules"
        SAL["Salary Analysis"]:::sql
        RWT["Remote Work Trends"]:::sql
        SA["Skills Analysis"]:::sql
        EAJ["Education and Jobs"]:::sql
        GI["Geographical Insights"]:::sql
        JTD["Job Trends and Demand"]:::sql
    end

    %% Visualization Layer
    VIS["Visualizations & Reports"]:::visual

    %% Data Flow Connections
    DS -->|"feeds"| EX
    EX -->|"cleans data"| SQL_Scripts
    SQL_Scripts -->|"loads into"| DB
    DB -->|"queried by"| SAL
    DB -->|"queried by"| RWT
    DB -->|"queried by"| SA
    DB -->|"queried by"| EAJ
    DB -->|"queried by"| GI
    DB -->|"queried by"| JTD
    SAL -->|"outputs"| VIS
    RWT -->|"outputs"| VIS
    SA -->|"outputs"| VIS
    EAJ -->|"outputs"| VIS
    GI -->|"outputs"| VIS
    JTD -->|"outputs"| VIS

    %% Click Events
    click SQL_Scripts "https://github.com/hunchd/job-market-analysis/tree/main/sql_load"
    click SAL "https://github.com/hunchd/job-market-analysis/blob/main/Job_Market_EDA/Salary Analysis.sql"
    click RWT "https://github.com/hunchd/job-market-analysis/blob/main/Job_Market_EDA/Remote Work Trends.sql"
    click SA "https://github.com/hunchd/job-market-analysis/blob/main/Job_Market_EDA/Skills Analysis.sql"
    click EAJ "https://github.com/hunchd/job-market-analysis/blob/main/Job_Market_EDA/Education and Jobs.sql"
    click GI "https://github.com/hunchd/job-market-analysis/blob/main/Job_Market_EDA/Geographical Insights.sql"
    click JTD "https://github.com/hunchd/job-market-analysis/blob/main/Job_Market_EDA/Job Trends and Demand.sql"
    click VIS "https://github.com/hunchd/job-market-analysis/tree/main/assets"

    %% Styles
    classDef data fill:#ffe6a7,stroke:#bf7326,stroke-width:2px;
    classDef process fill:#cce5ff,stroke:#3399ff,stroke-width:2px;
    classDef database fill:#d1e7dd,stroke:#0f5132,stroke-width:2px;
    classDef sql fill:#f8d7da,stroke:#842029,stroke-width:2px;
    classDef visual fill:#d1c4e9,stroke:#6a1b9a,stroke-width:2px;
```
