# junaidashraf05/data-analytic-project architecture

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

- Interactive diagram: https://gitdiagram.com/junaidashraf05/data-analytic-project
- Repository: https://github.com/junaidashraf05/data-analytic-project

## Overview

##### Project Type and Purpose
- This is a data-analytics & visualization project built in Python and executed via Jupyter Notebooks.
- Its purpose is to ingest Spotify listening history (JSON/CSV), preprocess the data, compute statistics (e.g., top artists, skip rates), and produce visualizations (Seaborn & Matplotlib charts).

##### File Structure
- Top-level files:
– spotify_data_dictionary.ipynb – notebook for exploring/defining the dataset schema
– spotify_history.ipynb       – notebook that performs the main ETL, analysis, and visualizations
– spotify_data_dictionary.csv  – supporting data dictionary exported as CSV
– spotify_history.csv          – raw listening history exported from Spotify
– README.md                     – project overview and usage instructions
- No explicit “src” or “lib” folders: the logic lives in notebook cells.
- Dependencies and environment implicitly defined by notebooks (Python 3.x, Pandas, Seaborn, Matplotlib).

##### Extract Additional Insights from README
- Core features: computing top tracks/artists by listening time, daily activity heatmaps, skip stats
- Tech stack: Jupyter Notebook front end, Python analysis engine, CSV/JSON as data store, visualization libraries
- Usage: place raw data in project directory, open notebooks, run cells

##### Components
a. Data Ingestion Layer
- Component: “Spotify History Input”
- Sources: JSON export or CSV file
b. Data Preprocessing Layer
- Component: “Data Dictionary Notebook” (spotify_data_dictionary.ipynb) – inspects schema and cleans metadata
- Component: “Data Cleaning & Transformation” (initial cells in spotify_history.ipynb)
c. Analysis & Computation Layer
- Statistic modules within spotify_history.ipynb – grouping, aggregation, skip rate calculations
d. Visualization Layer
- Chart components (Seaborn/Matplotlib) embedded in notebooks
- Output: time-series plots, bar charts, heatmaps
e. Environment & Dependencies
- Jupyter Notebook server
- Python interpreter (3.x)
- Libraries: Pandas, Seaborn, Matplotlib
f. (Optional) Storage & Export
- Intermediate CSVs (spotify_data_dictionary.csv)
- Final figures (PNG export or inline)

##### Relationships and Data Flow
- Side note: environment container (Jupyter) wraps all processing components

##### Architectural Patterns & Design Principles
- ETL (Extract → Transform → Load/Analyze) pipeline
- Notebook-driven modularity: separate exploratory data definition (data dictionary) from the core analysis
- Single-process, interactive environment – no microservices

##### Capturing Essential Architectural Elements
- ETL stages are explicit and sequenced
- Which notebook handles schema exploration vs. analysis
- How external libraries fit into the runtime
- Where a user interacts (notebook UI)

## Diagram (Mermaid)

```mermaid
graph TB
    %% Data Ingestion Layer
    subgraph "Data Ingestion Layer"
        A["Spotify History CSV"]:::data-store
        B["Spotify JSON Input"]:::data-store
    end

    %% Schema Exploration
    C("Data Dictionary Notebook"):::processing

    %% Cleaned Schema Export
    E["Cleaned Schema CSV"]:::data-store

    %% Data Preprocessing
    D("Data Cleaning & Transformation"):::processing

    %% Analysis & Computation
    F("Analysis & Computation Module"):::processing

    %% Visualization
    G("Visualization Module"):::visualization

    %% User Interaction
    H["User (Notebook UI)"]:::external

    %% Runtime Environment & Dependencies
    subgraph "Runtime Environment & Dependencies"
        J["Jupyter Notebook Server"]:::environment
        K["Python 3.x"]:::environment
        L["Pandas"]:::environment
        M["Seaborn"]:::environment
        N["Matplotlib"]:::environment
    end

    %% Project Overview
    I["README.md"]:::environment

    %% Data Flow
    A --> C
    B --> C
    C --> E
    A --> D
    B --> D
    D --> F
    F --> G
    G -.-> H

    %% Environment Hosting
    J --> C
    J --> D
    J --> F
    J --> G

    %% Click Events
    click A "https://github.com/junaidashraf05/data-analytic-project/blob/main/spotify_history.csv"
    click C "https://github.com/junaidashraf05/data-analytic-project/blob/main/spotify_data_dictionary.ipynb"
    click E "https://github.com/junaidashraf05/data-analytic-project/blob/main/spotify_data_dictionary.csv"
    click D "https://github.com/junaidashraf05/data-analytic-project/blob/main/spotify_history.ipynb"
    click F "https://github.com/junaidashraf05/data-analytic-project/blob/main/spotify_history.ipynb"
    click G "https://github.com/junaidashraf05/data-analytic-project/blob/main/spotify_history.ipynb"
    click I "https://github.com/junaidashraf05/data-analytic-project/blob/main/README.md"

    %% Styles
    classDef data-store fill:#ADD8E6,stroke:#000;
    classDef processing fill:#90EE90,stroke:#000;
    classDef visualization fill:#FFA500,stroke:#000;
    classDef environment fill:#D3D3D3,stroke:#000;
    classDef external fill:#FFE4E1,stroke:#000;
```
