Skip to main content
Public

Share visualization

Send this visualization to others.

Toronto bus delay

Public visualization

By be001 on VizHub

LinkedIn caption

LinkedIn cannot prefill the post text. Copy the caption, then paste it in LinkedIn. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code

The embed preserves the visualization's visibility and project dataset permissions.

Download & exportHTML, source ZIP and authorized project data

Source ZIP contains editable visualization files; it does not include project datasets. Standalone HTML is available where authorized and packages readable referenced data for offline use. Dataset ZIP requires project read permission.

Standalone HTMLSource ZIP
Publishing & handoffCopy a client maintenance summary

Includes the canonical link, visibility, and available export formats. Confirm dataset attribution, licensing and maintenance responsibilities with the publisher.

Toronto bus delay

0 stars0Public
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

Six figures are rendered, in this order:

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

Comments

Sign in to join the discussion.

MIT Licensed