# juliabbbb/simulator architecture

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

## Overview

This repository is a reproducible Julia preprocessing pipeline for MMORS water-quality monitoring data from 2012–2018. The principal workflow reads the raw workbook, assesses and cleans its records, validates the resulting dataset, and saves analysis-ready data, logs, and figures. The README documents the stages and outputs; no source excerpts were provided, so the graph reflects documented relationships rather than inspected call sites.

Main entry points: [`src/preprocess.jl`](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl) (Save outputs), [`data/raw/MMORS_water_quality_results_2012-2018_orig.xlsx`](https://github.com/juliabbbb/simulator/blob/main/data/raw/MMORS_water_quality_results_2012-2018_orig.xlsx) (Raw workbook), [`data/clean/mmors_water_quality_clean.csv`](https://github.com/juliabbbb/simulator/blob/main/data/clean/mmors_water_quality_clean.csv) (Clean dataset), [`results`](https://github.com/juliabbbb/simulator/tree/main/results) (Logs and summaries)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Ingestion"]
  node_load["Load and inspect<br/>[preprocess.jl]"]
end

subgraph group_assess["Assessment"]
  node_missing["Assess missingness<br/>[preprocess.jl]"]
  node_duplicates["Assess duplicates<br/>[preprocess.jl]"]
  node_invalid["Assess invalid entries<br/>[preprocess.jl]"]
end

subgraph group_clean["Cleaning"]
  node_remove["Remove records<br/>[preprocess.jl]"]
  node_types["Correct types<br/>[preprocess.jl]"]
  node_impute["Handle missing values<br/>[preprocess.jl]"]
  node_outliers["Flag outliers<br/>[preprocess.jl]"]
  node_standardize["Standardize values<br/>[preprocess.jl]"]
  node_transform["Transform variables<br/>[preprocess.jl]"]
end

subgraph group_publish["Validation and outputs"]
  node_validate["Validate dataset<br/>[preprocess.jl]"]
  node_save["Save outputs<br/>[preprocess.jl]"]
  node_clean_csv["Clean dataset"]
  node_results["Logs and summaries"]
  node_figures["Report figures"]
end

node_user(("Pipeline runner"))
node_workbook["Raw workbook"]

node_user -->|"runs pipeline"| node_load
node_workbook -->|"reads sheets"| node_load
node_load -->|"then assesses"| node_missing
node_missing -->|"then assesses"| node_duplicates
node_duplicates -->|"then assesses"| node_invalid
node_invalid -->|"then cleans"| node_remove
node_remove -->|"then corrects"| node_types
node_types -->|"then handles"| node_impute
node_impute -->|"then flags"| node_outliers
node_outliers -->|"then standardizes"| node_standardize
node_standardize -->|"then transforms"| node_transform
node_transform -->|"then validates"| node_validate
node_validate -->|"then saves"| node_save
node_save -->|"writes dataset"| node_clean_csv
node_save -->|"writes reports"| node_results
node_save -->|"generates figures"| node_figures

click node_workbook "https://github.com/juliabbbb/simulator/blob/main/data/raw/MMORS_water_quality_results_2012-2018_orig.xlsx"
click node_load "https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl"
click node_missing "https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl"
click node_duplicates "https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl"
click node_invalid "https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl"
click node_remove "https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl"
click node_types "https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl"
click node_impute "https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl"
click node_outliers "https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl"
click node_standardize "https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl"
click node_transform "https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl"
click node_validate "https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl"
click node_save "https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl"
click node_clean_csv "https://github.com/juliabbbb/simulator/blob/main/data/clean/mmors_water_quality_clean.csv"
click node_results "https://github.com/juliabbbb/simulator/tree/main/results"
click node_figures "https://github.com/juliabbbb/simulator/tree/main/figures"

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_load toneBlue
class node_missing,node_duplicates,node_invalid toneAmber
class node_remove,node_types,node_impute,node_outliers,node_standardize,node_transform toneMint
class node_validate,node_save,node_clean_csv,node_results,node_figures toneRose
class node_user toneIndigo
class node_workbook toneTeal
```

## Components

### Ingestion

- [Load and inspect](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl): `src/preprocess.jl`

### Assessment

- [Assess missingness](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl): `src/preprocess.jl`
- [Assess duplicates](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl): `src/preprocess.jl`
- [Assess invalid entries](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl): `src/preprocess.jl`

### Cleaning

- [Remove records](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl): `src/preprocess.jl`
- [Correct types](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl): `src/preprocess.jl`
- [Handle missing values](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl): `src/preprocess.jl`
- [Flag outliers](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl): `src/preprocess.jl`
- [Standardize values](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl): `src/preprocess.jl`
- [Transform variables](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl): `src/preprocess.jl`

### Validation and outputs

- [Validate dataset](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl): `src/preprocess.jl`
- [Save outputs](https://github.com/juliabbbb/simulator/blob/main/src/preprocess.jl): `src/preprocess.jl`
- [Clean dataset](https://github.com/juliabbbb/simulator/blob/main/data/clean/mmors_water_quality_clean.csv): `data/clean/mmors_water_quality_clean.csv`
- [Logs and summaries](https://github.com/juliabbbb/simulator/tree/main/results): `results`
- [Report figures](https://github.com/juliabbbb/simulator/tree/main/figures): `figures`

### Other components

- **Pipeline runner**
- [Raw workbook](https://github.com/juliabbbb/simulator/blob/main/data/raw/MMORS_water_quality_results_2012-2018_orig.xlsx): `data/raw/MMORS_water_quality_results_2012-2018_orig.xlsx`

## Connections

- Pipeline runner → Load and inspect: runs pipeline (evidence: `README.md`)
- Raw workbook → Load and inspect: reads sheets (evidence: `README.md`)
- Load and inspect → Assess missingness: then assesses (evidence: `README.md`)
- Assess missingness → Assess duplicates: then assesses (evidence: `README.md`)
- Assess duplicates → Assess invalid entries: then assesses (evidence: `README.md`)
- Assess invalid entries → Remove records: then cleans (evidence: `README.md`)
- Remove records → Correct types: then corrects (evidence: `README.md`)
- Correct types → Handle missing values: then handles (evidence: `README.md`)
- Handle missing values → Flag outliers: then flags (evidence: `README.md`)
- Flag outliers → Standardize values: then standardizes (evidence: `README.md`)
- Standardize values → Transform variables: then transforms (evidence: `README.md`)
- Transform variables → Validate dataset: then validates (evidence: `README.md`)
- Validate dataset → Save outputs: then saves (evidence: `README.md`)
- Save outputs → Clean dataset: writes dataset (evidence: `README.md`)
- Save outputs → Logs and summaries: writes reports (evidence: `README.md`)
- Save outputs → Report figures: generates figures (evidence: `README.md`)
