# sasark-cyber/ba_thesis architecture

> Architecture diagram of the GitHub repository sasark-cyber/ba_thesis, 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/sasark-cyber/ba_thesis
- Repository: https://github.com/sasark-cyber/ba_thesis

## Overview

This is an early-stage DOJ document entity-counting project. Its substantive workflow is a script that reads JSON records from the raw corpus, extracts text and entities into a Polars dataframe, then normalizes and counts people, organizations, and locations into separate CSV outputs. The package entry point currently only prints a greeting and is not part of that workflow. The README is empty, and the graph is based on the sampled loader and visible tree; no broader processing stages are evidenced.

Main entry points: [`scripts/01_data_loading.py`](https://github.com/sasark-cyber/ba_thesis/blob/main/scripts/01_data_loading.py) (JSON loader), [`data/raw`](https://github.com/sasark-cyber/ba_thesis/tree/main/data/raw) (Raw JSON corpus), [`data/interim/count.people.csv`](https://github.com/sasark-cyber/ba_thesis/blob/main/data/interim/count.people.csv) (People counts), [`data/interim/count.organizations.csv`](https://github.com/sasark-cyber/ba_thesis/blob/main/data/interim/count.organizations.csv) (Organization counts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_processing["Data processing"]
  node_loader["JSON loader<br/>[01_data_loading.py]"]
  node_frame["Entity dataframe<br/>[01_data_loading.py]"]
end

subgraph group_datasets["Dataset files"]
  node_records["Raw JSON corpus"]
  node_people["People counts<br/>[count.people.csv]"]
  node_organizations["Organization counts"]
  node_locations["Location counts"]
end

node_analyst(("Analyst"))

node_analyst -->|"runs"| node_loader
node_loader -->|"reads"| node_records
node_loader -->|"extracts entities"| node_frame
node_loader -->|"writes counts"| node_people
node_loader -->|"writes counts"| node_organizations
node_loader -->|"writes counts"| node_locations

click node_loader "https://github.com/sasark-cyber/ba_thesis/blob/main/scripts/01_data_loading.py"
click node_records "https://github.com/sasark-cyber/ba_thesis/tree/main/data/raw"
click node_frame "https://github.com/sasark-cyber/ba_thesis/blob/main/scripts/01_data_loading.py"
click node_people "https://github.com/sasark-cyber/ba_thesis/blob/main/data/interim/count.people.csv"
click node_organizations "https://github.com/sasark-cyber/ba_thesis/blob/main/data/interim/count.organizations.csv"
click node_locations "https://github.com/sasark-cyber/ba_thesis/blob/main/data/interim/count.locations.csv"

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_loader,node_frame toneBlue
class node_records,node_people,node_organizations,node_locations toneAmber
class node_analyst toneIndigo
```

## Components

### Data processing

- [JSON loader](https://github.com/sasark-cyber/ba_thesis/blob/main/scripts/01_data_loading.py): `scripts/01_data_loading.py`
- [Entity dataframe](https://github.com/sasark-cyber/ba_thesis/blob/main/scripts/01_data_loading.py): `scripts/01_data_loading.py`

### Dataset files

- [Raw JSON corpus](https://github.com/sasark-cyber/ba_thesis/tree/main/data/raw): `data/raw`
- [People counts](https://github.com/sasark-cyber/ba_thesis/blob/main/data/interim/count.people.csv): `data/interim/count.people.csv`
- [Organization counts](https://github.com/sasark-cyber/ba_thesis/blob/main/data/interim/count.organizations.csv): `data/interim/count.organizations.csv`
- [Location counts](https://github.com/sasark-cyber/ba_thesis/blob/main/data/interim/count.locations.csv): `data/interim/count.locations.csv`

### Other components

- **Analyst**

## Connections

- Analyst → JSON loader: runs
- JSON loader → Raw JSON corpus: reads
- JSON loader → Entity dataframe: extracts entities
- JSON loader → People counts: writes counts
- JSON loader → Organization counts: writes counts
- JSON loader → Location counts: writes counts
