guard(() => {
if (!cmp || !it) return emptyNote("unavailable", "The comparisons");
const rows = peers.filter(p => p.converted_to_our_window?.low != null)
.map(p => ({name: `${p.agency} (${p.country})`, lo: p.converted_to_our_window.low, hi: p.converted_to_our_window.high}));
const ours = it.recount_under_our_rule;
if (rows.length === 0) return html`<p class="empty">No other agency's figure could be converted yet.</p>`;
const all = [{name: "Island Transit (ours)", lo: ours, hi: ours, us: true}, ...rows];
return ch.figure({
title: "On time under our rule, 1 minute early to 5 minutes late",
note: `Island Transit: ${pct(ours, 1)} of ${count(it.departures)} departures at timepoints from ${longDate(it.first_service_date)} to ${longDate(it.last_service_date)}, with every moment counted alike. Each bar spans the converted figure under the assumptions tried.`,
chart: ch.responsive((width, narrow) => Plot.plot({
ariaLabel: "Converted on-time shares of other bus systems, beside Island Transit's",
ariaDescription: all.map(d => `${d.name}: ${d.us ? pct(d.lo, 1) : `${pct(d.lo)} to ${pct(d.hi)}`}`).join("; "),
style: {background: "transparent", fontSize: "12px", overflow: "visible"},
width, height: 34 * all.length + 50,
marginLeft: narrow ? 6 : Math.min(320, 14 + 6.6 * Math.max(...all.map(d => d.name.length))), marginRight: 30, marginTop: narrow ? 24 : 8, marginBottom: 36,
x: {domain: [0, 1], grid: true, tickFormat: d => pct(d), label: null},
y: {domain: all.map(d => d.name), label: null, axis: narrow ? null : "left", tickSize: 0},
marks: [
Plot.ruleY(all, {y: "name", x1: "lo", x2: "hi", stroke: "var(--range)", strokeWidth: 6, strokeLinecap: "round"}),
Plot.dot(all.filter(d => d.us), {y: "name", x: "lo", r: 6, fill: "var(--series-1)", stroke: "var(--surface)", strokeWidth: 1.5}),
narrow ? Plot.text(all, {y: "name", x: 0, text: "name", textAnchor: "start", dy: -16, fill: "currentColor"}) : null,
Plot.tip(all, Plot.pointerY({y: "name", x: "hi", title: d => d.us ? `${d.name}\n${pct(d.lo, 1)}` : `${d.name}\n${pct(d.lo)} to ${pct(d.hi)} under our rule`})),
],
}), {height: 34 * all.length + 50}),
methods: "comparisons",
});
}, "The comparison chart")Compared with other bus systems
Each agency’s figure on the same footing as ours
How Island Transit’s on-time record compares with other bus systems, adjusted for their different definitions of on time.
Bus agencies don’t all mean the same thing by “on time.” One counts a bus up to 5 minutes late, another only up to 3, and some time arrivals at every stop while others time departures at a few. So two published percentages can’t be set side by side as they are: a stricter rule makes the same buses look worse. Below, each agency’s own figure is put on the same footing as ours in one of two ways, and each row says which.
The first way recounts our own departures under the other agency’s rule (marked R). That shows how Island Transit would score if it used that agency’s definition. The second turns the other agency’s published figure into a figure under our rule, 1 minute early to 5 minutes late (marked B). We don’t have the other agency’s departure times, so we assume its buses run early and late in a pattern like ours, only wider or narrower, and try several such patterns. The result is a range, not a single number, and a wide range means the answer depends a lot on that assumption.
A few agencies publish their own live bus locations, as Island Transit does. For those, we also run our own method on two hours of their buses once a week (marked A) and report the share on time under our rule, with a range that allows for chance. Two hours on one day is a small slice of their service, so treat it as a spot check.
Every agency we looked at
These comparisons are rough by nature. They can’t adjust for differences in what each agency times (a departure or an arrival), at which stops, or how it counts a trip that never ran, and the agencies’ figures cover different periods from ours. Each row links to the agency’s own report.