{"id":44449898,"url":"https://github.com/yilverdeja/ae-hk-wait-times","last_synced_at":"2026-02-12T16:12:56.319Z","repository":{"id":253201845,"uuid":"832961037","full_name":"yilverdeja/ae-hk-wait-times","owner":"yilverdeja","description":"Revamped the Hong Kong A\u0026E wait time site with a responsive design, real-time filtering, and hourly wait trends to optimize visit planning","archived":false,"fork":false,"pushed_at":"2026-01-20T03:04:35.000Z","size":12602,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-20T09:55:20.363Z","etag":null,"topics":["hongkong","nextjs","occupancy","opendata"],"latest_commit_sha":null,"homepage":"https://ae.wait.hk","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yilverdeja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-24T04:53:04.000Z","updated_at":"2026-01-20T03:04:39.000Z","dependencies_parsed_at":"2024-09-11T08:57:42.968Z","dependency_job_id":null,"html_url":"https://github.com/yilverdeja/ae-hk-wait-times","commit_stats":null,"previous_names":["yilverdeja/ae-hk-wait-times"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yilverdeja/ae-hk-wait-times","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yilverdeja%2Fae-hk-wait-times","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yilverdeja%2Fae-hk-wait-times/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yilverdeja%2Fae-hk-wait-times/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yilverdeja%2Fae-hk-wait-times/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yilverdeja","download_url":"https://codeload.github.com/yilverdeja/ae-hk-wait-times/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yilverdeja%2Fae-hk-wait-times/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29371830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hongkong","nextjs","occupancy","opendata"],"created_at":"2026-02-12T16:12:54.828Z","updated_at":"2026-02-12T16:12:56.313Z","avatar_url":"https://github.com/yilverdeja.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Vercel Deploy](https://deploy-badge.vercel.app/vercel/ae-hk-wait-times)\n\n# Hong Kong Accident \u0026 Emergency Wait Times\n\nRevamping the [original A\u0026E Wait Time page](https://www.ha.org.hk/visitor/ha_visitor_index.asp?Content_ID=235504\u0026Lang=ENG) using NextJS by using a responsive design, real-time filtering, and hourly wait trends to optimize visit planning.\n\n## Features\n\nUsing the [A\u0026E Wait Times Open Data API](https://data.gov.hk/en-data/dataset/hospital-hadata-ae-waiting-time), we can retrieve the current snapshot, in addition to historical snapshots at 15 minute intervals of every A\u0026E hospital. Currently, this application can:\n\n- Display the estimated wait times of each hospital with a dynamic table that can be sorted by their name or wait times, and filtered by their region\n    - Data is automatically retrieved and updated every 15-17 minutes\n- Clicking on a hospital opens a side modal with more in depth information:\n    - Hospital information like google maps address, contact information, and relevant links\n    - A text displaying the current wait time relative to the average wait time on that specific day and hour\n    - A bar chart to show the hourly trend of each day from Monday to Sunday. The trend is shown in blue, whilst the current wait time is overlayed with a single pink bar\n- Responsive for desktop and mobile applications\n- \"Understanding the Wait\" modal to let users understand better how wait times are generated and what they mean\n- A dark and light mode theme toggle\n- Switch written languages between English, Traditional Chinese and Simplified Chinese\n- View hospital wait times in a dynamic map\n\n## Demo\n\nhttps://ae-hk-wait-times.vercel.app/\n\n## Tech Stack\n\nThis app was developed with Typescript, NextJS, and [shadcn/ui](https://ui.shadcn.com/) with TailwindCSS for easier development\n\n## What Inspired Me?\n\n### TLDR;\n\nI needed to use the A\u0026E hospital services, but due to a recent typhoon, the wait times of all hospitals were estimated at 8+ hours... except for the hospital at Cheng Chau island. I took the ferry over, and instantly got admitted when I arrived to the hospital.\n\nEven though the general public can see a snapshot of the estimated wait times at 15 minute intervals, it doesn't help us predict how busy it will be in the future. What if I could do that?\n\n### Story Time\n\nIn the summer of 2023, I sprained my left shoulder AC joint playing volleyball. Following the game, there was a typhoon in Hong Kong. The pain wasn't immediate, but it eventually followed with a very limited range of motion, and pain with slight movements.\n\nHowever, due to the typhoon, trying to make appointments to visit a public general doctor was next to impossible. _Note: Booking a doctor in the public system on normal days is hard enough already._\n\nMy friends suggested going to the A\u0026E instead as I wouldn't have to rely on a booking to get admitted - I could just walk in and then wait in line. So I walked into the [Queen Mary Hospital](https://www.ha.org.hk/visitor/ha_visitor_index.asp?Content_ID=100131) and saw how packed it was. I got a ticket, and asked the nurse how long it would take, and she said it would be more than 8 hours!\n\nI couldn't imagine waiting there for more than 8 hours. Even if I decided to leave then come back, what if I missed my appointment? Could I rely on the hospital app to remind me on when to come back? I didn't feel comfortable taking that risk.\n\nThat's when I learned that the [hospital authority has a site with an estimated wait time of each of their A\u0026E hospitals](https://www.ha.org.hk/visitor/ha_visitor_index.asp?Content_ID=235504\u0026Lang=ENG). At that time, each hospital had an 8+ hour wait... except for [St John Hospital in Cheng Chau island](https://www.ha.org.hk/visitor/ha_visitor_index.asp?Content_ID=100146) with \"Around 1 hour\" of wait.\n\nSo I decided to take a little day trip to Cheng Chau and take my chances - The moment I arrived to the hospital, I instantly got admitted. We went through the process of getting a checkup, an X-ray, an analysis, then getting a customized sling in the Occupational Therapy department in a span of 2 hours.\n\nIt was a fun trip, but taking the ferry to another island is not for everyone. So it begged the question... how could we plan our visits better to avoid the wait?\n\n## Local Development\n\n### Getting Started\n\nFirst, install the dependencies:\n\n```bash\nnpm install\n```\n\nThen, run the development server:\n\n```bash\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\n## Improvements\n\n### Display previous hourly averages on current day\n\nOn the hospital chart for the current day, rather than only displaying a bar with the wait time at the current hour, also show the previous hour wait times so users can see if the it's following a trend or not.\n\n### Predict Future Wait Times\n\nCreate machine learning models to predict future wait times and display them appropriately on the chart view.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyilverdeja%2Fae-hk-wait-times","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyilverdeja%2Fae-hk-wait-times","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyilverdeja%2Fae-hk-wait-times/lists"}