# ishankasare/hse-hospital-wait-times-analysis architecture

> Architecture diagram of the GitHub repository ishankasare/hse-hospital-wait-times-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ishankasare/hse-hospital-wait-times-analysis
- Repository: https://github.com/ishankasare/hse-hospital-wait-times-analysis

## Overview

This repository is an Irish hospital waiting-list analytics product: it downloads NTPF data, standardizes it into analytical tables, and presents trends and performance through a Streamlit dashboard and SQL analysis. The central user workflow is to inspect national, hospital, specialty, and target-tracking views, then browse or export filtered data. The README also documents a Power BI dashboard. Source excerpts show the downloader, cleaning, and dashboard data access; the SQL and Power BI details are documented but their implementation was not sampled.

Main entry points: [`src/dashboard.py`](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py) (Streamlit Dashboard), [`src/clean_data.py`](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/clean_data.py) (Data Cleaning), [`data/processed`](https://github.com/ishankasare/hse-hospital-wait-times-analysis/tree/main/data/processed) (Processed Tables), [`data/hse_waits.db`](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/data/hse_waits.db) (Waiting-List Database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data Ingestion"]
  node_download["CSV Downloader<br/>[download_data.py]"]
  node_raw["Downloaded CSVs"]
end

subgraph group_transform["Data Preparation"]
  node_clean["Data Cleaning<br/>[clean_data.py]"]
  node_processed["Processed Tables"]
  node_sqlite[("Waiting-List Database<br/>[hse_waits.db]")]
end

subgraph group_analysis["Analytics"]
  node_sql["SQL Analysis"]
end

subgraph group_presentation["User Presentation"]
  node_dashboard["Streamlit Dashboard<br/>[dashboard.py]"]
  node_kpis["National KPIs<br/>[dashboard.py]"]
  node_trends["National Trends<br/>[dashboard.py]"]
  node_hospital["Hospital Performance<br/>[dashboard.py]"]
  node_bands["Wait-Band Targets<br/>[dashboard.py]"]
  node_specialty["Specialty Analysis<br/>[dashboard.py]"]
  node_browse["Browse and Export<br/>[dashboard.py]"]
  node_powerbi["Power BI Dashboard"]
end

node_ntpf(("NTPF Open Data"))

node_ntpf -->|"provides CSVs"| node_download
node_download -->|"saves files"| node_raw
node_raw -->|"reads CSVs"| node_clean
node_clean -->|"writes tables"| node_processed
node_clean -->|"writes tables"| node_sqlite
node_sqlite -->|"loads data"| node_dashboard
node_processed -->|"CSV fallback"| node_dashboard
node_dashboard -->|"renders"| node_kpis
node_dashboard -->|"renders"| node_trends
node_dashboard -->|"renders"| node_hospital
node_dashboard -->|"tracks targets"| node_bands
node_dashboard -->|"renders"| node_specialty
node_dashboard -->|"filters and exports"| node_browse
node_sqlite -->|"queried by"| node_sql
node_processed -.->|"supports analysis"| node_powerbi

click node_download "https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/download_data.py"
click node_clean "https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/clean_data.py"
click node_processed "https://github.com/ishankasare/hse-hospital-wait-times-analysis/tree/main/data/processed"
click node_sqlite "https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/data/hse_waits.db"
click node_sql "https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/sql/analysis_queries.sql"
click node_dashboard "https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py"
click node_kpis "https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py"
click node_trends "https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py"
click node_hospital "https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py"
click node_bands "https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py"
click node_specialty "https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py"
click node_browse "https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.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_download,node_raw toneBlue
class node_clean,node_processed,node_sqlite toneAmber
class node_sql toneMint
class node_dashboard,node_kpis,node_trends,node_hospital,node_bands,node_specialty,node_browse,node_powerbi toneRose
class node_ntpf toneIndigo
```

## Components

### Data Ingestion

- [CSV Downloader](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/download_data.py): `src/download_data.py`
- **Downloaded CSVs**

### Data Preparation

- [Data Cleaning](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/clean_data.py): `src/clean_data.py`
- [Processed Tables](https://github.com/ishankasare/hse-hospital-wait-times-analysis/tree/main/data/processed): `data/processed`
- [Waiting-List Database](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/data/hse_waits.db): `data/hse_waits.db`

### Analytics

- [SQL Analysis](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/sql/analysis_queries.sql): `sql/analysis_queries.sql`

### User Presentation

- [Streamlit Dashboard](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py): `src/dashboard.py`
- [National KPIs](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py): `src/dashboard.py`
- [National Trends](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py): `src/dashboard.py`
- [Hospital Performance](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py): `src/dashboard.py`
- [Wait-Band Targets](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py): `src/dashboard.py`
- [Specialty Analysis](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py): `src/dashboard.py`
- [Browse and Export](https://github.com/ishankasare/hse-hospital-wait-times-analysis/blob/main/src/dashboard.py): `src/dashboard.py`
- **Power BI Dashboard**

### Other components

- **NTPF Open Data**

## Connections

- NTPF Open Data → CSV Downloader: provides CSVs (evidence: `src/download_data.py`)
- CSV Downloader → Downloaded CSVs: saves files (evidence: `src/download_data.py`)
- Downloaded CSVs → Data Cleaning: reads CSVs (evidence: `src/clean_data.py`)
- Data Cleaning → Processed Tables: writes tables (evidence: `src/clean_data.py`)
- Data Cleaning → Waiting-List Database: writes tables (evidence: `src/clean_data.py`)
- Waiting-List Database → Streamlit Dashboard: loads data (evidence: `src/dashboard.py`)
- Processed Tables → Streamlit Dashboard: CSV fallback (evidence: `src/dashboard.py`)
- Streamlit Dashboard → National KPIs: renders (evidence: `src/dashboard.py`)
- Streamlit Dashboard → National Trends: renders (evidence: `src/dashboard.py`)
- Streamlit Dashboard → Hospital Performance: renders (evidence: `src/dashboard.py`)
- Streamlit Dashboard → Wait-Band Targets: tracks targets (evidence: `src/dashboard.py`)
- Streamlit Dashboard → Specialty Analysis: renders (evidence: `src/dashboard.py`)
- Streamlit Dashboard → Browse and Export: filters and exports (evidence: `src/dashboard.py`)
- Waiting-List Database → SQL Analysis: queried by (evidence: `README.md`)
- Processed Tables → Power BI Dashboard: supports analysis (evidence: `README.md`)
