# aaminahmq/edwaittime architecture

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

## Overview

The repository combines a notebook-based NHAMCS analysis with a Dash dashboard presenting nationally weighted ED wait-time findings. The documented workflow cleans and weights survey records, then branches into weighted EDA, bottleneck analysis, and predictive modeling; the dashboard presents results and methodology to hospital-oriented readers. Notebook source was not sampled, so pipeline links follow the README rather than inspected implementation; generated data and figures are documented outputs, not files present in the tree.

Main entry points: [`notebooks/01_data_prep.ipynb`](https://github.com/aaminahmq/edwaittime/blob/main/notebooks/01_data_prep.ipynb) (Prepare and clean), [`appengine/app4.py`](https://github.com/aaminahmq/edwaittime/blob/main/appengine/app4.py) (Dash application), [`appengine/pages/analytics.py`](https://github.com/aaminahmq/edwaittime/blob/main/appengine/pages/analytics.py) (Analytics results), [`appengine/assets`](https://github.com/aaminahmq/edwaittime/tree/main/appengine/assets) (Analysis figures)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Survey inputs"]
  node_nhamcs["NHAMCS SAS files"]
end

subgraph group_analysis["Analysis pipeline"]
  node_prep["Prepare and clean<br/>[01_data_prep.ipynb]"]
  node_eda["Weighted EDA"]
  node_bottleneck["Bottleneck analysis"]
  node_modeling["Arrival modeling<br/>[04_modeling.ipynb]"]
end

subgraph group_outputs["Analysis outputs"]
  node_eda_data["Cleaned EDA data"]
  node_arrival_data["Arrival model data"]
  node_retrospective_data["Retrospective data"]
  node_figures["Analysis figures"]
  node_bottleneck_results["Bottleneck results"]
  node_model_results["Model results"]
end

subgraph group_dashboard["Dashboard"]
  node_web_app["Dash application<br/>[app4.py]"]
  node_home["Project overview<br/>[home.py]"]
  node_analytics["Analytics results<br/>[analytics.py]"]
  node_methods["Methods page<br/>[methods.py]"]
end

node_analyst(("Project analyst"))
node_visitor(("Dashboard visitor"))

node_analyst -->|"runs workflow"| node_prep
node_nhamcs -->|"loads survey data"| node_prep
node_prep -->|"writes cleaned data"| node_eda_data
node_prep -->|"writes dataset"| node_arrival_data
node_prep -->|"writes dataset"| node_retrospective_data
node_eda -->|"reads data"| node_eda_data
node_eda -->|"writes plots"| node_figures
node_retrospective_data -->|"feeds analysis"| node_bottleneck
node_bottleneck -->|"writes results"| node_bottleneck_results
node_bottleneck -->|"writes plots"| node_figures
node_arrival_data -->|"feeds training"| node_modeling
node_modeling -->|"writes evaluation"| node_model_results
node_modeling -->|"writes plots"| node_figures
node_visitor -->|"opens dashboard"| node_web_app
node_web_app -->|"dispatches page"| node_home
node_web_app -->|"dispatches page"| node_analytics
node_web_app -->|"dispatches page"| node_methods
node_analytics -->|"displays plots"| node_figures
node_analytics -.->|"presents findings"| node_bottleneck_results
node_analytics -.->|"presents metrics"| node_model_results

click node_prep "https://github.com/aaminahmq/edwaittime/blob/main/notebooks/01_data_prep.ipynb"
click node_eda "https://github.com/aaminahmq/edwaittime/blob/main/notebooks/02_weighted_eda.ipynb"
click node_bottleneck "https://github.com/aaminahmq/edwaittime/blob/main/notebooks/03_bottleneck_analysis.ipynb"
click node_modeling "https://github.com/aaminahmq/edwaittime/blob/main/notebooks/04_modeling.ipynb"
click node_figures "https://github.com/aaminahmq/edwaittime/tree/main/appengine/assets"
click node_web_app "https://github.com/aaminahmq/edwaittime/blob/main/appengine/app4.py"
click node_home "https://github.com/aaminahmq/edwaittime/blob/main/appengine/pages/home.py"
click node_analytics "https://github.com/aaminahmq/edwaittime/blob/main/appengine/pages/analytics.py"
click node_methods "https://github.com/aaminahmq/edwaittime/blob/main/appengine/pages/methods.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_nhamcs toneBlue
class node_prep,node_eda,node_bottleneck,node_modeling toneAmber
class node_eda_data,node_arrival_data,node_retrospective_data,node_figures,node_bottleneck_results,node_model_results toneMint
class node_web_app,node_home,node_analytics,node_methods toneRose
class node_analyst,node_visitor toneIndigo
```

## Components

### Survey inputs

- **NHAMCS SAS files**

### Analysis pipeline

- [Prepare and clean](https://github.com/aaminahmq/edwaittime/blob/main/notebooks/01_data_prep.ipynb): `notebooks/01_data_prep.ipynb`
- [Weighted EDA](https://github.com/aaminahmq/edwaittime/blob/main/notebooks/02_weighted_eda.ipynb): `notebooks/02_weighted_eda.ipynb`
- [Bottleneck analysis](https://github.com/aaminahmq/edwaittime/blob/main/notebooks/03_bottleneck_analysis.ipynb): `notebooks/03_bottleneck_analysis.ipynb`
- [Arrival modeling](https://github.com/aaminahmq/edwaittime/blob/main/notebooks/04_modeling.ipynb): `notebooks/04_modeling.ipynb`

### Analysis outputs

- **Cleaned EDA data**
- **Arrival model data**
- **Retrospective data**
- [Analysis figures](https://github.com/aaminahmq/edwaittime/tree/main/appengine/assets): `appengine/assets`
- **Bottleneck results**
- **Model results**

### Dashboard

- [Dash application](https://github.com/aaminahmq/edwaittime/blob/main/appengine/app4.py): `appengine/app4.py`
- [Project overview](https://github.com/aaminahmq/edwaittime/blob/main/appengine/pages/home.py): `appengine/pages/home.py`
- [Analytics results](https://github.com/aaminahmq/edwaittime/blob/main/appengine/pages/analytics.py): `appengine/pages/analytics.py`
- [Methods page](https://github.com/aaminahmq/edwaittime/blob/main/appengine/pages/methods.py): `appengine/pages/methods.py`

### Other components

- **Project analyst**
- **Dashboard visitor**

## Connections

- Project analyst → Prepare and clean: runs workflow
- NHAMCS SAS files → Prepare and clean: loads survey data
- Prepare and clean → Cleaned EDA data: writes cleaned data
- Prepare and clean → Arrival model data: writes dataset
- Prepare and clean → Retrospective data: writes dataset
- Weighted EDA → Cleaned EDA data: reads data
- Weighted EDA → Analysis figures: writes plots
- Retrospective data → Bottleneck analysis: feeds analysis
- Bottleneck analysis → Bottleneck results: writes results
- Bottleneck analysis → Analysis figures: writes plots
- Arrival model data → Arrival modeling: feeds training
- Arrival modeling → Model results: writes evaluation
- Arrival modeling → Analysis figures: writes plots
- Dashboard visitor → Dash application: opens dashboard
- Dash application → Project overview: dispatches page
- Dash application → Analytics results: dispatches page
- Dash application → Methods page: dispatches page
- Analytics results → Analysis figures: displays plots
- Analytics results → Bottleneck results: presents findings
- Analytics results → Model results: presents metrics
