-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
635 lines (616 loc) · 22.7 KB
/
Copy pathindex.html
File metadata and controls
635 lines (616 loc) · 22.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#e8e7e3" media="(prefers-color-scheme: light)" />
<meta name="theme-color" content="#081420" media="(prefers-color-scheme: dark)" />
<script>
// Resolve theme before paint to avoid a flash.
(function () {
const saved = localStorage.getItem("nfl-flight-paths-theme");
const prefersDark = window.matchMedia(
"(prefers-color-scheme: dark)",
).matches;
const theme = saved || (prefersDark ? "dark" : "light");
document.documentElement.setAttribute("data-theme", theme);
})();
</script>
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="canonical" href="https://cypherpoet.github.io/THREE-JS-NFL-Flight-Paths/" />
<title>NFL Flight Paths</title>
<meta
name="description"
content="An interactive Three.js globe of every NFL team's 2025 and 2026 road trips — great-circle arcs, team-coloured, total miles tallied."
/>
<meta property="og:type" content="website" />
<meta property="og:site_name" content="NFL Flight Paths" />
<meta property="og:title" content="NFL Flight Paths" />
<meta
property="og:description"
content="An interactive Three.js globe of every NFL team's 2025 and 2026 road trips — great-circle arcs, team-coloured, total miles tallied."
/>
<meta property="og:url" content="https://cypherpoet.github.io/THREE-JS-NFL-Flight-Paths/" />
<meta property="og:image" content="https://cypherpoet.github.io/THREE-JS-NFL-Flight-Paths/og-image.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="NFL Flight Paths — Three.js globe with team flight arcs across North America" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="NFL Flight Paths" />
<meta
name="twitter:description"
content="An interactive Three.js globe of every NFL team's 2025 and 2026 road trips — great-circle arcs, team-coloured, total miles tallied."
/>
<meta name="twitter:image" content="https://cypherpoet.github.io/THREE-JS-NFL-Flight-Paths/og-image.png" />
<link rel="modulepreload" href="/src/main.js" />
<link rel="stylesheet" href="/styles.css" />
</head>
<body>
<div id="app">
<canvas
id="scene-canvas"
role="img"
aria-label="Interactive globe of NFL team flight paths"
></canvas>
<header class="topbar">
<div class="topbar__brand">
<img
class="topbar__mark"
src="/assets/images/logos/logo_concept-02.png"
srcset="
/assets/images/logos/logo_concept-02@0_5x.png 0.5x,
/assets/images/logos/logo_concept-02.png 1x,
/assets/images/logos/logo_concept-02@2x.png 2x
"
width="67"
height="56"
alt=""
aria-hidden="true"
decoding="async"
fetchpriority="high"
/>
<div class="topbar__titles">
<h1>NFL Flight Paths</h1>
<p class="topbar__season" id="season-sublabel">
2026 Season · Confirmed slate
</p>
</div>
<div class="season-switch" role="tablist" aria-label="Season">
<button
type="button"
class="season-switch__button"
data-season="2026"
data-active="true"
role="tab"
aria-selected="true"
>
2026
</button>
<button
type="button"
class="season-switch__button"
data-season="2025"
data-active="false"
role="tab"
aria-selected="false"
>
2025
</button>
</div>
</div>
<div class="topbar__meta">
<!-- Mobile-only duplicate of the season switch. The desktop instance
lives in the brand cluster paired with the "2026 Season · …"
sublabel; this instance surfaces the toggle on phones where
that brand-side switch is hidden by media query. Both share the
same JS wiring (querySelectorAll on .season-switch__button). -->
<div
class="season-switch season-switch--mobile"
role="tablist"
aria-label="Season"
>
<button
type="button"
class="season-switch__button"
data-season="2026"
data-active="true"
role="tab"
aria-selected="true"
>
2026
</button>
<button
type="button"
class="season-switch__button"
data-season="2025"
data-active="false"
role="tab"
aria-selected="false"
>
2025
</button>
</div>
<span class="metric" aria-live="polite" aria-busy="true">
<span class="metric__label">League total miles</span>
<span class="metric__value" id="league-miles">—</span>
</span>
<span class="metric" aria-live="polite" aria-busy="true">
<span class="metric__label">International miles</span>
<span class="metric__value" id="international-miles">—</span>
<span class="metric__sub" id="international-games">— games</span>
</span>
<div class="topbar__icons" role="group" aria-label="View options">
<button
type="button"
id="mileage-toggle"
class="theme-toggle"
aria-label="Per-team mileage breakdown"
aria-haspopup="dialog"
aria-controls="mileage"
data-tooltip="Mileage by team"
>
<svg
viewBox="0 0 24 24"
width="18"
height="18"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
aria-hidden="true"
>
<line x1="3" y1="6" x2="20" y2="6" />
<line x1="3" y1="12" x2="14" y2="12" />
<line x1="3" y1="18" x2="9" y2="18" />
</svg>
</button>
<button
type="button"
id="methodology-toggle"
class="theme-toggle"
aria-label="How travel miles are calculated"
aria-haspopup="dialog"
aria-controls="methodology"
data-tooltip="How miles are calculated"
>
<svg
viewBox="0 0 24 24"
width="18"
height="18"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<circle cx="12" cy="12" r="9" />
<path d="M12 8h.01M11 12h1v4h1" />
</svg>
</button>
<button
type="button"
id="share-link-toggle"
class="theme-toggle"
aria-label="Copy a link to this view"
data-tooltip="Copy link to this view"
>
<svg
class="share-toggle__icon share-toggle__icon--link"
viewBox="0 0 24 24"
width="18"
height="18"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<path d="M10 13a5 5 0 0 0 7.07 0l3-3a5 5 0 0 0-7.07-7.07l-1.4 1.4" />
<path d="M14 11a5 5 0 0 0-7.07 0l-3 3a5 5 0 0 0 7.07 7.07l1.4-1.4" />
</svg>
<svg
class="share-toggle__icon share-toggle__icon--check"
viewBox="0 0 24 24"
width="18"
height="18"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<polyline points="4 12 10 18 20 6" />
</svg>
</button>
<button
type="button"
id="theme-toggle"
class="theme-toggle"
aria-label="Toggle dark mode"
data-tooltip="Toggle dark mode"
>
<svg
class="theme-toggle__icon theme-toggle__icon--sun"
viewBox="0 0 24 24"
width="18"
height="18"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<circle cx="12" cy="12" r="4" />
<path d="M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6l1.4 1.4M17 17l1.4 1.4M5.6 18.4l1.4-1.4M17 7l1.4-1.4" />
</svg>
<svg
class="theme-toggle__icon theme-toggle__icon--moon"
viewBox="0 0 24 24"
width="18"
height="18"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<path d="M21 12.8A8.5 8.5 0 1 1 11.2 3a6.5 6.5 0 0 0 9.8 9.8z" />
</svg>
</button>
</div>
</div>
</header>
<aside class="panel" id="team-panel">
<div class="panel__handle" aria-hidden="true"></div>
<div class="panel__head">
<div class="panel__head-row">
<h2>Teams</h2>
<div class="panel__sort" role="group" aria-label="Sort teams">
<button
type="button"
class="panel__sort-button"
data-sort="division"
data-active="true"
aria-pressed="true"
data-tooltip="Group by AFC / NFC division"
>
By division
</button>
<button
type="button"
class="panel__sort-button"
data-sort="mileage"
data-active="false"
aria-pressed="false"
data-tooltip="Longest travel first"
>
By miles
</button>
</div>
</div>
<p class="panel__head-meta" id="panel-intl">
<!-- populated by buildTeamPanel: "8 abroad · 32,140 mi" (mobile prepends league total) -->
</p>
</div>
<div class="panel__presets" role="group" aria-label="Filter teams">
<button
type="button"
class="panel__preset"
data-preset="all"
aria-pressed="false"
>
All
</button>
<button
type="button"
class="panel__preset"
data-preset="afc"
aria-pressed="false"
>
AFC
</button>
<button
type="button"
class="panel__preset"
data-preset="nfc"
aria-pressed="false"
>
NFC
</button>
<button
type="button"
class="panel__preset"
data-preset="longest5"
data-active="true"
aria-pressed="true"
data-tooltip="Five teams with the most travel miles"
>
Longest 5
</button>
<button
type="button"
class="panel__preset"
data-preset="international"
aria-pressed="false"
data-tooltip="Teams with a game played abroad"
>
International
</button>
<button
type="button"
class="panel__head-clear"
data-preset="none"
aria-label="Clear team selection"
data-tooltip="Reset filters"
>
Clear
</button>
</div>
<div class="panel__empty" id="panel-empty" role="status" hidden>
<span class="panel__empty-text">No teams selected.</span>
<button
type="button"
class="panel__empty-restore"
id="panel-empty-restore"
hidden
>
Restore last selection
</button>
</div>
<ol class="team-list" id="team-list"></ol>
</aside>
<div class="hint" id="hint">
Drag to rotate · scroll to zoom · hover a stadium · click a team to toggle · shift-click to isolate
</div>
<div class="legend" id="legend">
<span class="legend__dot legend__dot--home"></span>
<span class="legend__text">Home stadium</span>
<span class="legend__dot legend__dot--away"></span>
<span class="legend__text">Away venue</span>
</div>
<div class="attribution" id="attribution">
<span class="attribution__text">
Built by
<a
href="https://github.com/CypherPoet"
target="_blank"
rel="noopener noreferrer"
class="attribution__byline"
aria-label="@cypherpoet on GitHub (opens in a new tab)"
>@cypherpoet</a>
</span>
<span class="attribution__sep" aria-hidden="true">·</span>
<a
href="https://buymeacoffee.com/cypherpoet"
target="_blank"
rel="noopener noreferrer"
class="attribution__link"
aria-label="Buy me a coffee (opens in a new tab)"
>
<svg
class="attribution__link-icon"
viewBox="0 0 24 24"
width="12"
height="12"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<path d="M6 2v2" />
<path d="M10 2v2" />
<path d="M14 2v2" />
<path
d="M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1"
/>
</svg>
<span class="attribution__text">Buy me a coffee</span>
</a>
</div>
<div
class="loading"
id="loading"
role="status"
aria-live="polite"
>
<div class="loading__bar"></div>
<span>Loading globe</span>
</div>
<div
class="mileage"
id="mileage"
role="dialog"
aria-modal="true"
aria-labelledby="mileage-title"
data-show="false"
hidden
>
<div class="mileage__scrim" data-mileage-close></div>
<article class="mileage__card">
<header class="mileage__head">
<div class="mileage__head-text">
<h2 id="mileage-title">Team travel miles</h2>
<div class="mileage__subtitle-row">
<p class="mileage__subtitle" id="mileage-subtitle">
Full-season distances by team
</p>
<div
class="mileage__view"
role="tablist"
aria-label="Mileage view"
>
<button
type="button"
class="mileage__view-button"
role="tab"
data-mileage-view="regular"
data-active="true"
aria-selected="true"
>
Regular season
</button>
<button
type="button"
class="mileage__view-button"
role="tab"
data-mileage-view="international"
data-active="false"
aria-selected="false"
>
International
</button>
</div>
</div>
</div>
<button
type="button"
class="mileage__close"
aria-label="Close"
data-mileage-close
>
×
</button>
</header>
<ol class="mileage__list" id="mileage-list"></ol>
</article>
</div>
<div
class="methodology"
id="methodology"
role="dialog"
aria-modal="true"
aria-labelledby="methodology-title"
data-show="false"
hidden
>
<div class="methodology__scrim" data-methodology-close></div>
<article class="methodology__card">
<header class="methodology__head">
<h2 id="methodology-title">How travel miles are calculated</h2>
<button
type="button"
class="methodology__close"
aria-label="Close"
data-methodology-close
>
×
</button>
</header>
<div class="methodology__body">
<p>
Every mile reported here is <strong>great-circle (haversine)
air distance</strong> between stadium coordinates, totalled by
walking each team's schedule in chronological order. Between any
two away games — even back-to-back ones — the team is modeled as
flying <strong>home and back out</strong>. NFL teams almost
always return home immediately after a road game (own beds,
training facility, normal practice routine). The one exception
modeled here is when the home detour would add more than
<strong>1,500 mi</strong> versus going straight to the next
venue — which captures rare patterns like a West Coast team
playing back-to-back games in the Northeast, or a team staying
in London for two consecutive International Series games. Totals
are rounded to the nearest mile.
</p>
<h3>Distance formula</h3>
<p>
Haversine on a spherical Earth with
<code>R = 3958.8 mi</code>, implemented in
<code>src/geo.js · greatCircleMiles</code>:
</p>
<pre>a = sin²(Δφ/2) + cos(φ₁)·cos(φ₂)·sin²(Δλ/2)
c = 2·atan2(√a, √(1−a))
d = R·c</pre>
<p>
Using a sphere rather than the WGS-84 ellipsoid shifts a
transatlantic distance by less than 0.3% — well below the
precision of stadium coordinates.
</p>
<h3>Per-team accounting</h3>
<p>
For each team we sort that team's away and neutral-site legs by
week and walk them in order, starting and ending at the home
stadium:
</p>
<ul>
<li>
Every road trip begins and ends with a flight from / to the
team's home stadium. Bye and home weeks anchor the team at
home in between trips.
</li>
<li>
Between two <strong>consecutive</strong> road weeks the team
still flies home in between by default. If going home would
add more than <strong>1,500 mi</strong> compared to flying
straight to the next venue, the team is modeled as staying on
the road and going directly venue-to-venue — the cross-coast
back-to-back and back-to-back London cases.
</li>
<li>
Neutral-site / international games count for
<strong>both</strong> participating teams — including the
team listed as the home designate. The 49ers' Mexico City
"home" game is the canonical example: SF still travels.
</li>
</ul>
<h3>What gets totalled</h3>
<p>
<strong>League total miles</strong> sums all 32 teams across the
full schedule. <strong>International miles</strong> sums only the
great-circle distance to neutral overseas venues, counted once
per traveling team. Per-team rows in the sidebar show each team's
full-season miles and stack the international portion as a
contrasting bar segment.
</p>
<h3>Arcs vs. totals</h3>
<p>
The arcs on the globe show each team's home → venue flights as
independent visual tracks; they don't include return-home flights
or the rare venue → venue legs. The numeric totals reflect the
realistic chronological path instead, so summing arc lengths by
eye will undercount a team's total miles.
</p>
<h3>What's <em>not</em> modelled</h3>
<ul>
<li>
We assume bye weeks are spent at home (typical, not universal).
</li>
<li>
No driving or local transit — pure stadium-to-stadium air
distance.
</li>
<li>
Preseason and playoffs are excluded; regular-season only.
</li>
</ul>
<h3>Where it lives in code</h3>
<ul>
<li><code>src/geo.js</code> — <code>greatCircleMiles(latA, lonA, latB, lonB)</code></li>
<li><code>src/schedule.js</code> — <code>buildTravelLegs(schedule)</code>, <code>summariseByTeam(legs)</code>, and the internal <code>computeSequentialMiles</code> walk</li>
<li><code>src/ui.js</code> — <code>formatMiles(miles)</code></li>
</ul>
</div>
</article>
</div>
</div>
<div
id="share-status"
role="status"
aria-live="polite"
aria-atomic="true"
class="visually-hidden"
></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>