# srivassid/labelpropogation architecture

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

- Interactive diagram: https://gitdiagram.com/srivassid/labelpropogation
- Repository: https://github.com/srivassid/labelpropogation

## Overview

This repository parses Wikilinks data, builds a graph from a CSV input, runs label propagation, and provides scripts to inspect the resulting communities. The README gives no further product detail; the shown paths use different dataset filenames, so the graph does not assume the parser’s output is the analyzer’s input.

Main entry points: [`graphx.py`](https://github.com/srivassid/labelpropogation/blob/master/graphx.py) (Graph workflow), [`read_data.py`](https://github.com/srivassid/labelpropogation/blob/master/read_data.py) (Parse Wikilinks), [`communities.py`](https://github.com/srivassid/labelpropogation/blob/master/communities.py) (Inspect communities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Data ingestion"]
  node_reader["Parse Wikilinks<br/>[read_data.py]"]
  node_parsed_csv["Parsed CSV"]
end

subgraph group_analysis["Graph analysis"]
  node_lpa["Graph workflow<br/>[graphx.py]"]
  node_graphframe["GraphFrame<br/>[graphx.py]"]
  node_labels["Community labels<br/>[graphx.py]"]
  node_graph_metrics["Graph diagnostics<br/>[graphx.py]"]
end

subgraph group_inspection["Community inspection"]
  node_inspector["Inspect communities<br/>[communities.py]"]
end

node_wikilinks["Wikilinks dump"]
node_csv_input["Graph CSV input"]
node_community_csv["Community CSV"]
node_user(("Analyst"))

node_wikilinks -->|"reads"| node_reader
node_reader -->|"writes CSV"| node_parsed_csv
node_csv_input -->|"reads CSV"| node_lpa
node_lpa -->|"builds graph"| node_graphframe
node_graphframe -->|"runs propagation"| node_lpa
node_lpa -->|"produces labels"| node_labels
node_lpa -->|"computes diagnostics"| node_graph_metrics
node_lpa -->|"writes CSV"| node_community_csv
node_community_csv -->|"reads CSV"| node_inspector
node_inspector -->|"prints summaries"| node_user

click node_reader "https://github.com/srivassid/labelpropogation/blob/master/read_data.py"
click node_lpa "https://github.com/srivassid/labelpropogation/blob/master/graphx.py"
click node_graphframe "https://github.com/srivassid/labelpropogation/blob/master/graphx.py"
click node_labels "https://github.com/srivassid/labelpropogation/blob/master/graphx.py"
click node_graph_metrics "https://github.com/srivassid/labelpropogation/blob/master/graphx.py"
click node_inspector "https://github.com/srivassid/labelpropogation/blob/master/communities.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_reader,node_parsed_csv toneBlue
class node_lpa,node_graphframe,node_labels,node_graph_metrics toneAmber
class node_inspector toneMint
class node_wikilinks,node_csv_input,node_community_csv,node_user toneIndigo
```

## Components

### Data ingestion

- [Parse Wikilinks](https://github.com/srivassid/labelpropogation/blob/master/read_data.py): `read_data.py`
- **Parsed CSV**

### Graph analysis

- [Graph workflow](https://github.com/srivassid/labelpropogation/blob/master/graphx.py): `graphx.py`
- [GraphFrame](https://github.com/srivassid/labelpropogation/blob/master/graphx.py): `graphx.py`
- [Community labels](https://github.com/srivassid/labelpropogation/blob/master/graphx.py): `graphx.py`
- [Graph diagnostics](https://github.com/srivassid/labelpropogation/blob/master/graphx.py): `graphx.py`

### Community inspection

- [Inspect communities](https://github.com/srivassid/labelpropogation/blob/master/communities.py): `communities.py`

### Other components

- **Wikilinks dump**
- **Graph CSV input**
- **Community CSV**
- **Analyst**

## Connections

- Wikilinks dump → Parse Wikilinks: reads
- Parse Wikilinks → Parsed CSV: writes CSV
- Graph CSV input → Graph workflow: reads CSV
- Graph workflow → GraphFrame: builds graph
- GraphFrame → Graph workflow: runs propagation
- Graph workflow → Community labels: produces labels
- Graph workflow → Graph diagnostics: computes diagnostics
- Graph workflow → Community CSV: writes CSV
- Community CSV → Inspect communities: reads CSV
- Inspect communities → Analyst: prints summaries
