# dedo99/infovis_individual_project_de_donato architecture

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

- Interactive diagram: https://gitdiagram.com/dedo99/infovis_individual_project_de_donato
- Repository: https://github.com/dedo99/infovis_individual_project_de_donato

## Overview

##### Project type and purpose
- This is a client-side, single-page information-visualization web application.

##### File structure
- Top-level files:
- README.md – project description
- index.html – entry point
- Directories under hot_air_balloon:
- data/dataset.json – source data
- lib/d3.v6.js – D3 visualization library
- script/script.js – custom visualization logic, data loading, event handling, animations
- style/style.css – CSS for layout and styling
- figures, images – assets, e.g., silhouettes (if any)
- No backend directory or server-side code: purely static frontend.

##### README for additional insights
- Requires D3 scales for mapping arbitrary data ranges to screen coordinates and sizes.

##### Main components and their relationships
a. Components
- Static File Server (any simple HTTP server or local filesystem)
- Browser (runtime environment)
- index.html (shell for the page)
- CSS (style/style.css)
- D3 library (lib/d3.v6.js)
- Application script (script/script.js)
- Dataset (data/dataset.json)
- Optional assets (hot_air_balloon/images, figures)
b. Relationships / data flow
1. Browser requests index.html from the server.
2. index.html loads style.css, d3.v6.js, script.js.
3. script.js issues an HTTP GET to load dataset.json.
5. script.js (with D3) constructs SVG or HTML elements for balloons and baskets in the DOM.
6. User clicks on balloons → script.js updates data model → D3 performs animated transitions on the SVG attributes.
c. Architectural patterns/design principles
- Separation of concerns: HTML for structure, CSS for styling, JS for behavior.
- Data-Driven Documents (D3): declarative data binding, enter/update/exit pattern.
- Event-driven UI: click events trigger data swaps and animations.
d. Key technologies/frameworks/libraries
- D3.js v6 for scales, selections, transitions
- JavaScript for DOM manipulation and event logic
- JSON for data serialization
- HTML5/CSS3 for presentation

##### Final recommendations
- Be extremely detailed: break the client-side into “data layer”, “visualization layer”, “presentation layer”, and “interaction layer.”

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Runtime and server
    Server["Static File Server"]:::server
    Browser["Browser / Rendering Engine"]:::runtime

    Server -->|"HTTP GET index.html"| index
    Server -->|"HTTP GET style.css"| css
    Server -->|"HTTP GET d3.v6.js"| d3
    Server -->|"HTTP GET script.js"| script

    Browser --> Server

    %% Presentation Layer
    subgraph "Presentation Layer"
        index["index.html"]:::presentation
        css["style.css"]:::presentation
    end

    index -->|"loads"| css

    %% Library Layer
    subgraph "Library Layer"
        d3["d3.v6.js"]:::library
    end

    index -->|"loads"| d3

    %% Application Layer
    subgraph "Application Layer"
        script["script.js"]:::code
    end

    index -->|"loads"| script

    %% Data Layer
    subgraph "Data Layer"
        dataset["dataset.json"]:::data
    end

    script -->|"fetch JSON"| dataset

    %% Assets
    subgraph "Optional Assets"
        figures["figures/"]:::assets
        images["images/"]:::assets
        readme["README.md"]:::assets
    end

    %% Visualization & Interaction
    script & d3 --> DOM["SVG DOM Elements"]:::runtime
    DOM -->|"user click event"| script
    script -->|"D3 enter/update/transition"| DOM

    %% Click events
    click index "https://github.com/dedo99/infovis_individual_project_de_donato/blob/main/hot_air_balloon/index.html"
    click css "https://github.com/dedo99/infovis_individual_project_de_donato/blob/main/hot_air_balloon/style/style.css"
    click d3 "https://github.com/dedo99/infovis_individual_project_de_donato/blob/main/hot_air_balloon/lib/d3.v6.js"
    click script "https://github.com/dedo99/infovis_individual_project_de_donato/blob/main/hot_air_balloon/script/script.js"
    click dataset "https://github.com/dedo99/infovis_individual_project_de_donato/blob/main/hot_air_balloon/data/dataset.json"
    click figures "https://github.com/dedo99/infovis_individual_project_de_donato/tree/main/hot_air_balloon/figures/"
    click images "https://github.com/dedo99/infovis_individual_project_de_donato/tree/main/hot_air_balloon/images/"
    click readme "https://github.com/dedo99/infovis_individual_project_de_donato/blob/main/README.md"

    %% Styles
    classDef server fill:#f9c6ff,stroke:#000
    classDef runtime fill:#ffeb99,stroke:#000
    classDef presentation fill:#9fe2bf,stroke:#000
    classDef library fill:#ffd1dc,stroke:#000
    classDef code fill:#b0e0e6,stroke:#000
    classDef data fill:#ffcc99,stroke:#000
    classDef assets fill:#d3ffce,stroke:#000
```
