尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 README。 以下為已儲存的摘錄。
MetraBot is a live map of every Metra train in Chicagoland, moving in real time on a clean diagram of the whole system.
It's built to sit on a second monitor like an aquarium: calm, quiet, and fun to glance at. It works just as well on your phone.
Screenshots on this page use sample data.檢視完整 README ↗MetraBot is a live map of every Metra train in Chicagoland, moving in real time on a clean diagram of the whole system.
It's built to sit on a second monitor like an aquarium: calm, quiet, and fun to glance at. It works just as well on your phone.
Open it: https://evan-dawkins.github.io/metrabot/
Screenshots on this page use sample data.
New here? Click ? next to the title any time for a quick guide.
| To do this | On a computer | On a phone |
|---|---|---|
| Move the map | Drag | Drag with one finger |
| Zoom | Scroll, or + / − | Pinch |
| See the whole network | ⛶ button, or 0 | ⛶ button |
| Visit CTABot | Point at ‹ by the zoom buttons | Tap ‹ by the zoom buttons |
| Show just one line | Click it in the bottom bar | Tap it in the bottom bar |
| Fold the line bar | Click All lines | Tap All lines |
| Close a card | Esc, or click the map | Tap the map |
Keyboard shortcuts:
Click a train to see:
Press Follow to ride along behind it. The map turns so the train points up and tilts back in 3D. Close the card to glide back to the whole network.
Click a station to see the next trains To Chicago and Away from Chicago, with minutes until they arrive. Both directions always show, even when one has nothing coming yet.
Tap ☆ to pin the station to your board on the right. On a phone, your stations sit in a strip at the bottom.
Ogilvie, Union Station, LaSalle St and Millennium show a departure board instead: every train leaving in the next 3 hours, with a countdown, even before the train has shown up.
Each departure has a status:
A line of text drifts slowly across the top bar, describing what's happening on the rails right now. It reads the live map and compares it with Metra's timetable, so it can tell more than the time of day:
It shows a new line every 10 minutes, or right away when something changes. If the live data drops, it falls back to lines based on the time of day.
The bar-chart button next to the title opens today's report card: the share of trains that finished on time, line by line, plus the latest train of the day.
A train counts as on time if it reaches its last stop within 6 minutes of the timetable, Metra's own rule. The card keeps counting all day, even when nobody has the page open, and starts fresh at 3 AM.
If live data was missing for a while, the card says so, and trains timed by GPS instead are noted.
Leave the page alone for 2 minutes (20 seconds on a phone) and it turns into a screensaver:
It keeps going until you close the train's card with ×. Moving the mouse, scrolling or pressing keys won't stop it. On phones the map turns but doesn't tilt. If your device is set to reduce motion, the screensaver stays off.
Like a weather stream checking in on a live camera, the voice checks in three times per ride:
| When | What it says |
|---|---|
| The ride starts | Which line and direction, how it's running, and the next stop. "Checking in on an inbound Union Pacific North train. It's running about two minutes behind. Next up, Ravenswood, in about three minutes." |
| Halfway | Where it just was and where it ends up. "Just passed Rogers Park. The last stop is Ogilvie, in about fifteen minutes." |
| The ride ends | A short sign-off. "That's the check-in. Back out to the full map." |
The voice is free: every phrase was recorded once ahead of time with Kokoro, an open-source voice, and the page stitches the pieces together.
Click the speaker next to the title to pick one:
| Sound | What it is |
|---|---|
| Brown noise | A soft, steady hush. |
| Water | Soft bubbles over a quiet, low murmur of water. |
| Sonar | A deep underwater rumble. A radar sweeps the map once every 30 seconds and gives a soft, low ping when fresh train data arrives. |
| Off | Silence. |
| Train check-ins | A separate on/off switch at the bottom of the menu for the voice that checks in during train of the moment. See above. |
The page remembers your pick. Sound starts after your first click, because browsers don't allow it before that. On iPhone and iPad, the silent switch mutes it.
Click the train button next to the title, or press C, to swap the arrows for little trains. They look like model trains seen from above, in their line's color, and sway gently while they're moving.
Open the same link on your phone. Everything works there, sized for one hand:
Turn your phone sideways and cards move to the left side, so the map stays open on the right.
Tip: add it to your home screen (Safari: Share → Add to Home Screen; Chrome: ⋮ → Add to Home screen) and it opens like an app.
Click the sun button, or press T.
CTABot is the same kind of live map for the CTA 'L'.
A small ‹ beside the zoom buttons links to it. Point at it and "Like this? Try CTABot →" slides out; move away and it folds back. On a phone, tap it.
Yes. Train positions, times, alerts and cancellations come straight from Metra's live feeds, and scheduled times come from Metra's published timetable. Nothing is guessed.
If Metra doesn't have a time for something, the map says so instead of inventing one. If the live data can't load, you can choose to watch pretend trains, and they're clearly labeled "Simulated".
worker.js) fetches it, turns it into something readable, and keeps the Metra key secret. Visitors share its answers, so Metra is only asked about every 25 seconds no matter how many people are watching.index.html) asks that program for fresh data every 30 seconds and draws the map.schedule.json). The departure boards, the report card and the ticker all use it.There's nothing to install and no build step.
| File | What it is |
|---|---|
index.html | The whole map, in one file |
worker.js | The Cloudflare program that fetches Metra's data. This is a backup copy; Cloudflare runs the real one |
schedule.json | Metra's timetable, trimmed down to what the map needs. Updated nightly, automatically |
tools/build_schedule.py | Builds schedule.json from Metra's timetable |
.github/workflows/timetable.yml | Tells GitHub to run that every night |
voice/ | The recorded check-in voice, packed into a few audio files |
tools/build_voice.py | Records the check-in voice (only needed if you change what it says) |
docs/ | The screenshots on this page |
README.md | This page |
worker.js, and click Deploy.METRA_API_TOKEN and paste your key. It stays in Cloudflare and never goes in this repo.index.html, change WORKER_URL to your Worker's address.main branch and / (root), and save.REPORT. Then add a Cron Trigger of */2 * * * * (every 2 minutes). If this is your own copy, change SCHEDULE_URL in worker.js to your site's address.Push a new index.html to the main branch, or upload it on GitHub. The site updates in about a minute. If you still see the old version, refresh with Ctrl + Shift + R (Mac: Cmd + Shift + R).
Changes to worker.js need to be pasted into Cloudflare too, since GitHub only holds a backup copy.