# july514/predictive-maintenance-nasa-cmapss architecture

> Architecture diagram of the GitHub repository july514/predictive-maintenance-nasa-cmapss, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/july514/predictive-maintenance-nasa-cmapss
- Repository: https://github.com/july514/predictive-maintenance-nasa-cmapss

## Overview

This is a NASA CMAPSS FD003 research project with two analysis tracks: R prepares engine data and runs survival analyses, while Python trains and compares RUL regressors. The user-facing results are survival analyses and a Shiny dashboard on the R side, and model predictions and evaluation reports on the Python side. README statements and sampled Python modules support the main data and results links; the R analysis and dashboard internals are represented at directory level because their source was not sampled.

Main entry points: [`ml/src/evaluation/results.py`](https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/src/evaluation/results.py) (Result persistence), [`data/processed`](https://github.com/july514/predictive-maintenance-nasa-cmapss/tree/main/data/processed) (Processed CSVs), [`ml/notebooks`](https://github.com/july514/predictive-maintenance-nasa-cmapss/tree/main/ml/notebooks) (RUL model notebooks), [`ml/src/data/loader.py`](https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/src/data/loader.py) (ML data loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_prep["R preprocessing"]
  node_processed[("Processed CSVs")]
end

subgraph group_stat["Survival analysis"]
  node_eda["Exploratory analysis<br/>[01_eda.qmd]"]
  node_survival["Survival models"]
end

subgraph group_dashboard["Shiny dashboard"]
  node_app["Shiny app<br/>[app.R]"]
  node_appdata["Dashboard data loader<br/>[data_loader.R]"]
end

subgraph group_ml["RUL machine learning"]
  node_notebooks["RUL model notebooks"]
  node_config["ML configuration<br/>[config.py]"]
  node_loader["ML data loader<br/>[loader.py]"]
end

subgraph group_results["Evaluation results"]
  node_metrics["Evaluation metrics<br/>[metrics.py]"]
  node_result_io["Result persistence<br/>[results.py]"]
  node_model_results["Model metrics<br/>[model_results.json]"]
  node_predictions["Test predictions"]
end

node_researcher(("Researcher"))
node_nasa[("NASA CMAPSS FD003")]

node_researcher -->|"uses dashboard"| node_app
node_nasa -->|"supplies raw data"| node_prep
node_prep -->|"exports data"| node_processed
node_researcher -->|"reviews analysis"| node_eda
node_researcher -->|"reviews models"| node_survival
node_app -->|"loads data via"| node_appdata
node_appdata -->|"reads CSVs"| node_processed
node_researcher -->|"runs models"| node_notebooks
node_notebooks -->|"reads CSVs"| node_processed
node_loader -->|"loads CSVs"| node_processed
node_loader -->|"uses paths and features"| node_config
node_notebooks -->|"writes model results"| node_result_io
node_result_io -->|"uses output paths"| node_config
node_result_io -->|"writes metrics"| node_model_results
node_result_io -->|"writes predictions"| node_predictions

click node_prep "https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/statistik/analysis/02_preprocessing.qmd"
click node_processed "https://github.com/july514/predictive-maintenance-nasa-cmapss/tree/main/data/processed"
click node_eda "https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/statistik/analysis/01_eda.qmd"
click node_survival "https://github.com/july514/predictive-maintenance-nasa-cmapss/tree/main/statistik/analysis"
click node_app "https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/statistik/shiny-app/app.R"
click node_appdata "https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/statistik/shiny-app/R/data_loader.R"
click node_notebooks "https://github.com/july514/predictive-maintenance-nasa-cmapss/tree/main/ml/notebooks"
click node_config "https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/src/config.py"
click node_loader "https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/src/data/loader.py"
click node_metrics "https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/src/evaluation/metrics.py"
click node_result_io "https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/src/evaluation/results.py"
click node_model_results "https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/reports/model_results.json"
click node_predictions "https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/reports/predictions_test.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_prep,node_processed toneBlue
class node_eda,node_survival,node_nasa toneAmber
class node_app,node_appdata toneMint
class node_notebooks,node_config,node_loader toneRose
class node_metrics,node_result_io,node_model_results,node_predictions,node_researcher toneIndigo
```

## Components

### Data preparation

- [R preprocessing](https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/statistik/analysis/02_preprocessing.qmd): `statistik/analysis/02_preprocessing.qmd`
- [Processed CSVs](https://github.com/july514/predictive-maintenance-nasa-cmapss/tree/main/data/processed): `data/processed`

### Survival analysis

- [Exploratory analysis](https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/statistik/analysis/01_eda.qmd): `statistik/analysis/01_eda.qmd`
- [Survival models](https://github.com/july514/predictive-maintenance-nasa-cmapss/tree/main/statistik/analysis): `statistik/analysis`

### Shiny dashboard

- [Shiny app](https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/statistik/shiny-app/app.R): `statistik/shiny-app/app.R`
- [Dashboard data loader](https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/statistik/shiny-app/R/data_loader.R): `statistik/shiny-app/R/data_loader.R`

### RUL machine learning

- [RUL model notebooks](https://github.com/july514/predictive-maintenance-nasa-cmapss/tree/main/ml/notebooks): `ml/notebooks`
- [ML configuration](https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/src/config.py): `ml/src/config.py`
- [ML data loader](https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/src/data/loader.py): `ml/src/data/loader.py`

### Evaluation results

- [Evaluation metrics](https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/src/evaluation/metrics.py): `ml/src/evaluation/metrics.py`
- [Result persistence](https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/src/evaluation/results.py): `ml/src/evaluation/results.py`
- [Model metrics](https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/reports/model_results.json): `ml/reports/model_results.json`
- [Test predictions](https://github.com/july514/predictive-maintenance-nasa-cmapss/blob/main/ml/reports/predictions_test.csv): `ml/reports/predictions_test.csv`

### Other components

- **Researcher**
- **NASA CMAPSS FD003**

## Connections

- Researcher → Shiny app: uses dashboard (evidence: `README.md`)
- NASA CMAPSS FD003 → R preprocessing: supplies raw data (evidence: `README.md`)
- R preprocessing → Processed CSVs: exports data (evidence: `README.md`)
- Researcher → Exploratory analysis: reviews analysis (evidence: `README.md`)
- Researcher → Survival models: reviews models (evidence: `README.md`)
- Shiny app → Dashboard data loader: loads data via (evidence: `README.md`)
- Dashboard data loader → Processed CSVs: reads CSVs (evidence: `README.md`)
- Researcher → RUL model notebooks: runs models (evidence: `README.md`)
- RUL model notebooks → Processed CSVs: reads CSVs (evidence: `README.md`)
- ML data loader → Processed CSVs: loads CSVs (evidence: `ml/src/data/loader.py`)
- ML data loader → ML configuration: uses paths and features (evidence: `ml/src/data/loader.py`)
- RUL model notebooks → Result persistence: writes model results (evidence: `ml/src/evaluation/results.py`)
- Result persistence → ML configuration: uses output paths (evidence: `ml/src/evaluation/results.py`)
- Result persistence → Model metrics: writes metrics (evidence: `ml/src/evaluation/results.py`)
- Result persistence → Test predictions: writes predictions (evidence: `ml/src/evaluation/results.py`)
