# otniel113/hebubaninfluencer architecture

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

- Interactive diagram: https://gitdiagram.com/otniel113/hebubaninfluencer
- Repository: https://github.com/otniel113/hebubaninfluencer

## Overview

##### Project type and purpose
- This is a two‐phase research pipeline (data‐gathering + data‐analysis) rather than a full‐stack or microservices system.
- Purpose: crawl tweets on the game “Heaven Burns Red,” build a social‐network graph, compute Eigenvector Centrality, and list top influencers.

##### File structure
- Top level contains:
- 01.CrawlingHebuban.py – the standalone Python crawler that calls the Twitter API.
- 02.ModelHebuban.ipynb – Jupyter notebook to load stored data, build the graph (NetworkX), compute centrality, and generate visualizations.
- README.md – explains usage, dependencies, and research context.

##### README for technical stack & patterns
- External service: Twitter API (requires a bearer token).
- Libraries and frameworks: Python 3.x, Tweepy or requests, pandas, NetworkX, Jupyter.
- Data format: JSON or CSV intermediate (tweets, user IDs).

a. External Twitter API (external service)
b. Crawler module (01.CrawlingHebuban.py)
c. Local data store (raw tweet data in JSON/CSV)
d. Analysis module (02.ModelHebuban.ipynb running pandas + NetworkX)
e. Visualization/report outputs (plots, tables of influencers)
f. Operator/User (launches the crawler, opens the notebook)

##### Architectural patterns & design principles
- Clear separation of concerns: crawling code vs. analysis code.
- Single‐node deployment: all steps run locally (or on a single VM).

##### Relevant technologies/frameworks
- Python script dependencies: requests or Tweepy, JSON, CSV, logging.
- Notebook dependencies: pandas, NetworkX, matplotlib or seaborn.
- External: Twitter Developer API (Bearer Token).
- Execution environments: CLI for crawler; Jupyter for analysis.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Phase 1: Crawling
    subgraph "Phase 1: Crawling"
        direction TB
        User["Operator/User"]:::userstyle
        Crawler["Crawler Module\n(01.CrawlingHebuban.py)"]:::script
        TwitterAPI["Twitter API\n(External Service)"]:::external
        DataStore["Local Data Store\n(JSON/CSV Files)"]:::data
    end

    %% Phase 2: Analysis
    subgraph "Phase 2: Analysis"
        direction TB
        Notebook["Analysis Notebook\n(02.ModelHebuban.ipynb)"]:::notebook
        Visualization["Visualization & Reports\n(Plots, Tables)"]:::vis
        Documentation["Project Documentation\n(README.md)"]:::doc
    end

    %% Data Flows and Invocations
    User -->|"invoke script"| Crawler
    Crawler -->|"HTTP GET / JSON"| TwitterAPI
    TwitterAPI -->|"JSON response"| Crawler
    Crawler -->|"write JSON/CSV"| DataStore

    User -->|"open & run"| Notebook
    Notebook -->|"pandas.read_*"| DataStore
    Notebook -->|"compute centrality\nNetworkX"| Visualization
    Visualization -->|"view results"| User

    %% Click Events
    click Crawler "https://github.com/otniel113/hebubaninfluencer/blob/main/01.CrawlingHebuban.py"
    click Notebook "https://github.com/otniel113/hebubaninfluencer/blob/main/02.ModelHebuban.ipynb"
    click Documentation "https://github.com/otniel113/hebubaninfluencer/blob/main/README.md"

    %% Styles
    classDef userstyle fill:#FFD966,stroke:#333,stroke-width:1px;
    classDef external fill:#93C47D,stroke:#333,stroke-width:1px;
    classDef script fill:#6FA8DC,stroke:#333,stroke-width:1px;
    classDef data fill:#F9CB9C,stroke:#333,stroke-width:1px;
    classDef notebook fill:#C27BA0,stroke:#333,stroke-width:1px;
    classDef vis fill:#E06666,stroke:#333,stroke-width:1px;
    classDef doc fill:#8E7CC3,stroke:#333,stroke-width:1px;
```
