How repeat/taiwan-high-speed-rail-train-diagram works
Project type and purpose
• There is no back‐end or database in the repo—only index.html, index.js, and a README describing data sources.
File structure
• Top‐level files:
• README.md – project description, data references
• index.html – entry point, loads scripts and container for SVG
• No node_modules or build scripts: this deploys as a static site (e.g., GitHub Pages).
README for additional insights
• Data comes from:
• THSRC official timetable web page or Open Data portal
• A separate GitHub repo of pre‐processed timetable JSON/CSV
Elements
• Clear labels:
• “Static HTTP Server (GitHub Pages)”
• “Browser / Client”
• “External Data API / JSON Source”
• “D3 Visualization Module”
• “SVG Output in DOM”
1. Server → Browser (serves index.html & index.js)
2. Browser → External API (fetch timetable data)
3. API → Browser (returns JSON/CSV)
4. index.js → D3 → SVG (render)
Detailed breakdown
• Data Fetcher (index.js)
• D3 Renderer
• SVG Canvas
• Optionally, annotate the D3 pipeline: Data → Scales → Axes → Lines & Stations.