TR-Dashboard is a tool based on Streamlit, making the timetable of Taiwan Railways more visualize and interactive.After selecting the date, user can click on any station on the map to display the timetable of that day
The timetable data is automatically update with GitHub Actions and TDX API. Different colors on the map represent the number of train stops at the station on that day.
Click station for station timetable, click segment for trains on that segment.
- Red: More than 150 train stops on the route on that day
- Orange: 100 ~ 150 train stops on the route on that day
- Yellow: 50 ~ 100 train stops on the route on that day
- Green: Fewer than 50 train stops on the route on that day
- Red: More than 150 train stops at the station on that day
- Orange: 100 ~ 150 train stops at the station on that day
- Green: 50 ~ 100 train stops at the station on that day
- Gray: Fewer than 50 train stops at the station on that day
├── main.py
├── api_tra.py
├── requirements.txt
├── data/
└── .github/workflows/
└── update.yml
.yml
- Install dependencies
pip install -r requirements.txt
- Run the app
streamlit run main.py
- The automation workflow and part of the code in this project were developed with AI assistance.
TR-Dashboard 是一個基於 Streamlit 的互動式台鐵時刻表。使用者在選擇日期後並且在地圖上點擊車站,側邊欄將會顯示當日的時刻表,時刻表資料是透過 GitHub Actions 取得 TDX平台 的資料進行自動更新。地圖上的不同的顏色代表該車站當日的停靠車輛的數量。
點擊車站可看該站列車,點擊路段可看該路段通過列車。
- 紅色:該路段當日停靠的車輛數量大於150列
- 橙色:該路段當日停靠的車輛數量在100列~150列
- 黃色:該路段當日停靠的車輛數量在50列~100列
- 綠色:該路段當日停靠的車輛數量小於50列
- 紅色:該車站當日停靠的車輛數量大於150列
- 橙色:該車站當日停靠的車輛數量在100列~150列
- 綠色:該車站當日停靠的車輛數量在50列~100列
- 灰色:該車站當日沒有停靠的車輛小於50列
├── main.py
├── api_tra.py
├── requirements.txt
├── data/
└── .github/workflows/
└── update.yml
.yml
- 安裝套件
pip install -r requirements.txt
- 執行應用程式
streamlit run main.py
- 本專案的自動化邏輯與部分程式碼是在 AI 的協助下完成開發。