# naren1704/ai-dev-survey-analysis architecture

> Architecture diagram of the GitHub repository naren1704/ai-dev-survey-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/naren1704/ai-dev-survey-analysis
- Repository: https://github.com/naren1704/ai-dev-survey-analysis

## Overview

This R project analyzes the Stack Overflow 2025 developer survey, from downloading and cleaning responses through statistical analysis, predictive modeling, clustering, and publication of results. Its main workflow is documented in the README; analysis scripts 02–06 read the cleaned dataset, while the runner executes the pipeline and renders the report. The graph reflects documented relationships only: source excerpts were unavailable, so it does not infer specific function calls or unshown data transfers.

Main entry points: [`scripts/run_all.R`](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/run_all.R) (Pipeline runner), [`data/processed`](https://github.com/naren1704/ai-dev-survey-analysis/tree/main/data/processed) (Cleaned dataset), [`scripts/01_data_cleaning.R`](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/01_data_cleaning.R) (Data cleaning), [`scripts/06_paper_benchmark.R`](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/06_paper_benchmark.R) (Model benchmark)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Data preparation"]
  node_setup_script["Download setup<br/>[00_setup.R]"]
  node_raw_data["Raw survey data"]
  node_cleaning_script["Data cleaning<br/>[01_data_cleaning.R]"]
  node_cleaning_functions["Cleaning functions<br/>[cleaning.R]"]
  node_processed_data["Cleaned dataset"]
  node_setup_functions["Analysis setup<br/>[setup.R]"]
end

subgraph group_analysis["Analysis"]
  node_eda["Exploratory analysis<br/>[02_eda.R]"]
  node_stats_tests["Statistical tests"]
  node_modeling["Regression models<br/>[04_modeling.R]"]
  node_clustering["Developer clustering<br/>[05_clustering.R]"]
  node_benchmark["Model benchmark"]
  node_stats_functions["Statistical helpers<br/>[stats.R]"]
  node_runner["Pipeline runner<br/>[run_all.R]"]
end

subgraph group_results["Research outputs"]
  node_tables["Analysis tables"]
  node_figures["Analysis figures"]
  node_paper_tables["Benchmark outputs"]
  node_paper["Research paper<br/>[main.tex]"]
  node_report_source["Report source<br/>[final_report.Rmd]"]
  node_report["Rendered report<br/>[final_report.html]"]
end

node_survey(("Stack Overflow survey"))

node_setup_script -->|"downloads data"| node_survey
node_setup_script -->|"stores data"| node_raw_data
node_raw_data -->|"provides CSV"| node_cleaning_script
node_cleaning_script -->|"writes dataset"| node_processed_data
node_cleaning_script -->|"uses functions"| node_cleaning_functions
node_processed_data -->|"read by"| node_eda
node_processed_data -->|"read by"| node_stats_tests
node_processed_data -->|"read by"| node_modeling
node_processed_data -->|"read by"| node_clustering
node_processed_data -->|"read by"| node_benchmark
node_runner -->|"runs step"| node_cleaning_script
node_runner -->|"runs step"| node_eda
node_runner -->|"runs step"| node_stats_tests
node_runner -->|"runs step"| node_modeling
node_runner -->|"runs step"| node_clustering
node_runner -->|"runs step"| node_benchmark
node_runner -->|"renders report"| node_report
node_eda -->|"writes results"| node_tables
node_stats_tests -->|"writes results"| node_tables
node_modeling -->|"writes results"| node_tables
node_clustering -->|"writes results"| node_tables
node_benchmark -->|"writes results"| node_paper_tables
node_benchmark -->|"supports paper"| node_paper
node_report_source -->|"rendered as"| node_report

click node_setup_script "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/00_setup.R"
click node_raw_data "https://github.com/naren1704/ai-dev-survey-analysis/tree/main/data/raw"
click node_cleaning_script "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/01_data_cleaning.R"
click node_cleaning_functions "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/R/cleaning.R"
click node_processed_data "https://github.com/naren1704/ai-dev-survey-analysis/tree/main/data/processed"
click node_setup_functions "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/R/setup.R"
click node_eda "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/02_eda.R"
click node_stats_tests "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/03_statistical_tests.R"
click node_modeling "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/04_modeling.R"
click node_clustering "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/05_clustering.R"
click node_benchmark "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/06_paper_benchmark.R"
click node_stats_functions "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/R/stats.R"
click node_runner "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/run_all.R"
click node_tables "https://github.com/naren1704/ai-dev-survey-analysis/tree/main/outputs/tables"
click node_figures "https://github.com/naren1704/ai-dev-survey-analysis/tree/main/outputs/figures"
click node_paper_tables "https://github.com/naren1704/ai-dev-survey-analysis/tree/main/paper/tables"
click node_paper "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/paper/main.tex"
click node_report_source "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/reports/final_report.Rmd"
click node_report "https://github.com/naren1704/ai-dev-survey-analysis/blob/main/reports/final_report.html"

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_setup_script,node_raw_data,node_cleaning_script,node_cleaning_functions,node_processed_data,node_setup_functions toneBlue
class node_eda,node_stats_tests,node_modeling,node_clustering,node_benchmark,node_stats_functions,node_runner toneAmber
class node_tables,node_figures,node_paper_tables,node_paper,node_report_source,node_report toneMint
class node_survey toneIndigo
```

## Components

### Data preparation

- [Download setup](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/00_setup.R): `scripts/00_setup.R`
- [Raw survey data](https://github.com/naren1704/ai-dev-survey-analysis/tree/main/data/raw): `data/raw`
- [Data cleaning](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/01_data_cleaning.R): `scripts/01_data_cleaning.R`
- [Cleaning functions](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/R/cleaning.R): `R/cleaning.R`
- [Cleaned dataset](https://github.com/naren1704/ai-dev-survey-analysis/tree/main/data/processed): `data/processed`
- [Analysis setup](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/R/setup.R): `R/setup.R`

### Analysis

- [Exploratory analysis](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/02_eda.R): `scripts/02_eda.R`
- [Statistical tests](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/03_statistical_tests.R): `scripts/03_statistical_tests.R`
- [Regression models](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/04_modeling.R): `scripts/04_modeling.R`
- [Developer clustering](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/05_clustering.R): `scripts/05_clustering.R`
- [Model benchmark](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/06_paper_benchmark.R): `scripts/06_paper_benchmark.R`
- [Statistical helpers](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/R/stats.R): `R/stats.R`
- [Pipeline runner](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/scripts/run_all.R): `scripts/run_all.R`

### Research outputs

- [Analysis tables](https://github.com/naren1704/ai-dev-survey-analysis/tree/main/outputs/tables): `outputs/tables`
- [Analysis figures](https://github.com/naren1704/ai-dev-survey-analysis/tree/main/outputs/figures): `outputs/figures`
- [Benchmark outputs](https://github.com/naren1704/ai-dev-survey-analysis/tree/main/paper/tables): `paper/tables`
- [Research paper](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/paper/main.tex): `paper/main.tex`
- [Report source](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/reports/final_report.Rmd): `reports/final_report.Rmd`
- [Rendered report](https://github.com/naren1704/ai-dev-survey-analysis/blob/main/reports/final_report.html): `reports/final_report.html`

### Other components

- **Stack Overflow survey**

## Connections

- Download setup → Stack Overflow survey: downloads data (evidence: `README.md`)
- Download setup → Raw survey data: stores data (evidence: `README.md`)
- Raw survey data → Data cleaning: provides CSV (evidence: `README.md`)
- Data cleaning → Cleaned dataset: writes dataset (evidence: `README.md`)
- Data cleaning → Cleaning functions: uses functions (evidence: `README.md`)
- Cleaned dataset → Exploratory analysis: read by (evidence: `README.md`)
- Cleaned dataset → Statistical tests: read by (evidence: `README.md`)
- Cleaned dataset → Regression models: read by (evidence: `README.md`)
- Cleaned dataset → Developer clustering: read by (evidence: `README.md`)
- Cleaned dataset → Model benchmark: read by (evidence: `README.md`)
- Pipeline runner → Data cleaning: runs step (evidence: `README.md`)
- Pipeline runner → Exploratory analysis: runs step (evidence: `README.md`)
- Pipeline runner → Statistical tests: runs step (evidence: `README.md`)
- Pipeline runner → Regression models: runs step (evidence: `README.md`)
- Pipeline runner → Developer clustering: runs step (evidence: `README.md`)
- Pipeline runner → Model benchmark: runs step (evidence: `README.md`)
- Pipeline runner → Rendered report: renders report (evidence: `README.md`)
- Exploratory analysis → Analysis tables: writes results (evidence: `README.md`)
- Statistical tests → Analysis tables: writes results (evidence: `README.md`)
- Regression models → Analysis tables: writes results (evidence: `README.md`)
- Developer clustering → Analysis tables: writes results (evidence: `README.md`)
- Model benchmark → Benchmark outputs: writes results (evidence: `README.md`)
- Model benchmark → Research paper: supports paper (evidence: `README.md`)
- Report source → Rendered report: rendered as (evidence: `README.md`)
