# Real-Time Emergency Room Congestion Map

> Web App · 2026-07-26
> Live: https://er-map.pages.dev


A real-time emergency department congestion tracker monitoring 59 tertiary emergency hospitals across Taiwan. Powered by real-time open-data APIs from the National Health Insurance Administration under the Ministry of Health and Welfare—entirely free, registration-free, and refreshed every 15 minutes. **Before rushing to the ER, check where wait times are longest.**

![ER Map Screenshot](https://labangram.kamera-ichi.com/_astro/er-map-cover.VZ_Pd9W-.png)

## Feature Highlights

- **Congestion Tier Badges** — Four-stage color-coded radar indicators (Normal → Busy → Congested → Critical), with pulsing animations highlighting hospitals reporting full bed capacity to emergency dispatch (119)
- **Live Metrics Dashboard** — Real-time tracking per facility: patients waiting for initial consultation, pending inpatient admission, awaiting ICU beds, and waiting on transfer gurneys
- **Search & Filtering** — Search by hospital name or administrative region; filter by hospital accreditation tier (Medical Centers / Regional Hospitals / District Hospitals / Full Bed Alerts Only)
- **Google Maps Navigation Integration** — Click any facility popup to trigger turn-by-turn navigation directly
- **Fully Automated Data Pipeline** — Scheduled GitHub Actions workflow polls the NHI API every 5 minutes; frontend automatically re-fetches snapshots every 5 minutes
- **Dark Glass Interface** — Dark glassmorphism UI paired with an optimized mobile bottom drawer

## Technical Architecture

```
er-map/
├── src/
│   ├── main.js      # Leaflet map logic
│   └── style.css    # Dark glass theme
├── scripts/
│   ├── geocode-hospitals.mjs  # One-time OSM Nominatim geocoding
│   └── fetch-data.mjs         # NHI API → static JSON
├── data/hospitals.json        # 59 hospital coordinates (static)
├── public/data/er-status.json # Live data snapshot (CI updated)
└── .github/workflows/
    └── fetch-data.yml         # 5-minute cron
```

Vite + Leaflet + CARTO Dark basemap, fully static and hosted on Cloudflare Pages without backend compute. Live telemetry is distributed via GitHub raw CDN, updating status without triggering Pages rebuilds.

## Data Sources

[Ministry of Health and Welfare National Health Insurance Administration Real-Time Emergency Information](https://info.nhi.gov.tw/INAE4000/INAE4010S01)

Hospital coordinates resolved via one-time geocoding through OpenStreetMap Nominatim.

Tags: open-data, leaflet, vite, open-source, health, taiwan
Canonical: https://labangram.kamera-ichi.com/en/projects/er-map/
Author: Cheng Jung Chen (Laban) — https://labangram.kamera-ichi.com/en/about
