Skip to main content
Public

Share visualization

Loading preview…

Toronto bus delay

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Viewing a saved revision (read-only)

kUbS_dRreZ4ANR_wnkVai

Toronto bus delay

0 stars1Public
BBeniam001@outlook.com
Last edited Nov 2, 2026
Created on Nov 1, 2026

This example demonstrates a minimal Hello World visualization created with D3 v6, displaying the text “Hello VizHub!” centered on the page. It showcases VizHub’s support for loading D3 from UNPKG, importing D3 API functions like `select`, and combining local ES6 modules such as `message.js` alongside HTML and CSS. The rendering approach uses the DOM—D3’s `select` method targets the `#message` div to set its text content, with styling controlled by the linked `styles.css` file. This serves as a template for more complex projects.

TTC Bus Delay Dashboard (2022)

An interactive ECharts dashboard that summarises TTC bus delay reports for the 2022 dataset. Reports are restricted to January–June (2022 H1).

Files

  • index.html — page structure and script includes.
  • css/styles.css — dashboard styling.
  • js/month-filter.js — restricts the dataset to Jan–Jun and builds the monthly report and delay-minute series.
  • js/format.js — number formatting helpers.
  • js/data.js — loads and normalises the CSV.
  • js/charts.js — builds every ECharts figure, including the incident-category pie chart.
  • js/summary.js — fills in the summary cards.
  • js/filters.js — wires up the filter controls.
  • js/main.js — orchestrates loading, filtering and redraw.
  • ttc-bus-delay-data-2022.csv — the source CSV must be placed next to index.html. Rename the file or edit CSV_FILENAME inside js/data.js if your CSV has a different name.

Charts

Seven figures are rendered:

  1. Monthly incident reports (bars for report count, line for total delay minutes, Jan–Jun).
  2. Reports by incident category — pie chart.
  3. Reports by hour of day (bar).
  4. Reports by day of week (bar).
  5. Delay duration distribution (bar).
  6. Top routes by report count (horizontal bar).
  7. Reports by direction (bar).

Every chart responds to the filter bar above them.

Why do I see "Failed to fetch"?

Browsers block fetch() requests for local files when you double-click index.html (the URL looks like file:///...). There are two ways to fix it:

Option 1 — use a tiny local web server (recommended)

Run one of the following commands from this folder:

  • python3 -m http.server 8000
  • npx serve
  • php -S localhost:8000

Then open http://localhost:8000/ in your browser.

Option 2 — use the "Load local CSV" button

The dashboard includes a Load local CSV button above the charts. Click it and pick ttc-bus-delay-data-2022.csv from your machine; the page will parse the file locally without needing a web server.

MIT Licensed