-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
413 lines (395 loc) · 18.5 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="description"
content="SpaceX interactive dashboard for exploring Launch History, Next Launch, Payload Analysis and Roadster stats.">
<!-- bootstrap -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<!-- dc css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dc/3.1.8/dc.min.css"
integrity="sha256-JxxmFZJjSBxxAjCludgb7ZMDLq9++jCr5pSVyoQLo2s=" crossorigin="anonymous" />
<!-- google font -->
<link href="https://fonts.googleapis.com/css?family=Share+Tech&display=swap" rel="stylesheet">
<!-- favicon -->
<link rel='icon' href='assets/img/favicon-32x32.png' type='image/x-icon'>
<!-- style.css -->
<link rel="stylesheet" href="assets/css/style.css">
<title>SpaceX Dashboard</title>
</head>
<body>
<!-- Nav Bar -->
<nav class="navbar navbar-expand-lg navbar-dark sticky-top">
<a class="navbar-brand" href="#" rel="noreferrer">
<img src="assets/img/rocket-icon-64.png" alt="Rocket Icon" id="rocket-icon" />
SpaceX Dashboard
</a>
<span class="navbar-text">
Data Source:
<a href="https://github.com/r-spacex/SpaceX-API" target="_blank" rel="noreferrer">SpaceX API
</a>
</span>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNavAltMarkup">
<!-- Nav links -->
<ul class="navbar-nav">
<li class="nav-item smooth-scroll active" data-toggle="collapse" data-target=".navbar-collapse.show"><a
class="nav-link" href="#" rel="noreferrer">LAUNCH HISTORY<span class="sr-only">(current)</span>
</a></li>
<li class="nav-item smooth-scroll" data-toggle="collapse" data-target=".navbar-collapse.show"><a
class="nav-link" href="#next-launch" rel="noreferrer">NEXT LAUNCH</a></li>
<li class="nav-item smooth-scroll" data-toggle="collapse" data-target=".navbar-collapse.show"><a
class="nav-link" href="#payload-analysis">PAYLOAD ANALYSIS</a></li>
<li class="nav-item smooth-scroll" data-toggle="collapse" data-target=".navbar-collapse.show"><a
class="nav-link" href="#roadster">ROADSTER</a></li>
</ul>
</div>
</nav>
<div class="container-fluid">
<!-- Launch Explorer -->
<div class="row">
<div class="heading-row">
<img src="assets/img/falcon-heavy-in-flight-icon.svg" class="heading-icon" alt="Falcon Heavy Flight Icon" />
<h2>Launch History</h2>
</div>
<div class="col-12">
<p class="section-subtext">Explore SpaceX's launch history - click chart
segments to filter.</p>
<!-- Data Count: Shows how many launch records are currently filtered -->
<div class="dc-data-count">
<span class="filter-count"></span>
<span class="total-count"></span>
</div>
<button class="btn btn-primary filter-button">Reset</button>
</div>
</div>
<div class="row">
<div class="col-md-6 col-lg-4">
<!-- Launches by Rocket Pie Chart -->
<div data-toggle="tooltip" data-placement="top" title="Number of times SpaceX has launched each rocket."
class="chart" id="pieChartLaunchesByRocket">
<h3> Launches by Rocket</h3>
<!-- Bootstrap Loading Spinner -->
<div class="spinner-grow text-light" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<!-- Launch Result Row Chart -->
<div class="chart" id="rowChartLaunchSuccess">
<h3>Launch Result</h3>
<!-- Bootstrap Loading Spinner -->
<div class="spinner-grow text-light" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<!-- Launches by Year Stacked Bar Chart -->
<div data-toggle="tooltip" title="SpaceX launches year on year, grouped by rocket." class="chart"
id="chartLaunchesPerYearByVehicle">
<h3>Launches by Year</h3>
<!-- Bootsrap Loading Spinner -->
<div class="spinner-grow text-light" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
<div class="col-md-12 col-lg-4">
<!-- Launches by Site stacked bar chart -->
<div data-toggle="tooltip"
title="Distribution of launches among SpaceX's four launch sites, grouped by rocket." class="chart"
id="chartLaunchesBySiteAndRocket">
<h3>Launches by Site</h3>
<!-- Bootstrap Loading Spinner -->
<div class="spinner-grow text-light" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<!-- Data Table Pagination -->
<div id="paging">
Showing <span id="begin"></span>-<span id="end"></span> of <span id="size"></span> <span
id="totalsize"></span>
<a id="prev" class="btn btn-primary" type="button">Previous</a>
<a id="next" class="btn btn-primary" type="button">Next</a>
</div>
<p>Filtered Records: </p>
<!-- Bootstrap Responsive Data Table, showing crossfiltered launch records -->
<div class="table-responsive">
<table id="dc-data-table" class="table table-dark table-sm">
</table>
</div>
<!-- Modal with image of large mission patch, which is activated on click of small mission patch -->
<!-- Modal also used for image of launch image, which is activated on click of rocket -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="modal-content"
aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content" id=modal-content>
<img src="" id="launch-image" class="large-modal-image" alt="Mission Patch Large" />
</div>
</div>
</div>
</div>
</div>
<hr>
<!-- Offset Anchor to Ensure Nav Bar doesn't cover content -->
<a class="anchor-offset" id="next-launch"></a>
<!-- Next Launch -->
<div class="row">
<div class="heading-row">
<img src="assets/img/falcon-heavy-icon.svg" class="heading-icon" alt="Falcon Heavy at Launchpad Icon" />
<h2>Next on the Launchpad</h2>
</div>
<div class="col-12">
<p class="section-subtext">SpaceX streams all launches live via YouTube. Catch the next one... </p>
</div>
<!-- Next Launch Rocket Image-->
<div class="col-md-1">
<img id="next-launch-rocket-image" class="lazyload" data-src="" height="440px" alt="Next Launch Rocket">
</div>
<div class="col-md-11 col-lg-5">
<img id="next-launch-patch" class="lazyload" data-src="" width="180" alt="Next Launch Patch">
<p>
Flight Number: <span id="flight-number"></span><br>
Rocket: <span id="rocket"></span><br>
Mission: <span id="mission-name"></span><br>
Launch Window: <span id="launch-date"></span>
</p>
<p id="next-mission-detail"></p>
<!-- Next Launch Countdown -->
<div data-toggle="tooltip" title="Counting down to the next launch..." id="nextLaunchCountdown">
<table id="countdown-table">
<col>
<col>
<col>
<col>
<tr id="counter">
<td id="days"> </td>
<td id="hours"> </td>
<td id="minutes"> </td>
<td id="seconds"> </td>
</tr>
<tr>
<td>days</td>
<td>hours</td>
<td>mins</td>
<td>secs</td>
</tr>
</table>
</div>
<!-- Add Launch to Calendar button -->
<div title="Add to Calendar" class="addeventatc" id=addToCalendar>
ADD TO CALENDAR
<span class="title"></span>
<!-- Timezone hardcoded to Europe/London because the launch time is in UTC -->
<span class="timezone">Europe/London</span>
<span class="start"></span>
<span class="location"></span>
<span class="description"></span>
</div>
</div>
<!-- Google Map of next launch pad location -->
<div class="col-md-12 col-lg-6">
<table class="table table-dark" id="launch-site-table">
<tr>
<td align="right">Launch Site:</td>
<td id="launch-site">
<td>
</tr>
</table>
<div id="map"></div>
</div>
</div>
<hr>
<!-- Offset Anchor to Ensure Nav Bar doesn't cover content -->
<a class="anchor-offset" id="payload-analysis"></a>
<!-- Payload Analysis -->
<div class="row">
<!-- Satellite icon source: https://www.iconfinder.com/icons/1587506/internet_line_satellite_icon -->
<div class="heading-row">
<img src="assets/img/satellite-icon.svg" class="heading-icon" alt="satellite icon" />
<h2>Payload Analysis</h2>
</div>
<div class="col-12">
<p class="section-subtext">SpaceX deploys payloads built by various
manufacturers into different
orbits.</p>
<!-- Data count showing how many payload records are currently filtered -->
<div class="dc-data-count-payloads">
<span class="filter-count"></span>
<span class="total-count"></span>
</div>
<button class="btn btn-primary filter-button">Reset</button>
</div>
</div>
<div class="row">
<div class="col-md-6 offset-md-3 offset-lg-0 col-lg-4">
<!-- Payloads by Type Row Chart -->
<div data-toggle="tooltip"
title="Number of payloads deployed of each type. The most common payload is 'Satellite' - all other types are SpaceX vehicles."
class="chart" id="rowChartPayloadType">
<h3>Payloads by Type</h3>
<!-- Bootstrap Loading Spinner -->
<div class="spinner-grow text-light" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<!-- Payloads by Orbit Row Chart -->
<div data-toggle="tooltip"
title="Number of payloads deployed to each orbit. The most common being Geostationary Transfer Orbit (GTO), followed by Low Earth Orbit (LEO)."
class="chart" id="barChartPayloadByOrbit">
<h3>Payloads by Orbit</h3>
<!-- Bootstrap Loading Spinner -->
<div class="spinner-grow text-light" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4">
<!-- Payloads by Manufacturer Row Chart -->
<div data-toggle="tooltip" title="Number of payloads built by each manufacturer." class="chart"
id="barChartPayloadManufacturer">
<h3>Payloads by Manufacturer</h3>
<!-- Bootstrap Loading Spinner -->
<div class="spinner-grow text-light" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
</div>
<hr>
<!-- Offset Anchor to Ensure Nav Bar doesn't cover content -->
<a class="anchor-offset" id="roadster"></a>
<!-- Dude, Where's My Car? (Tesla Roadster) -->
<div class="row">
<div class="heading-row">
<img src="assets/img/starman-icon.svg" class="heading-icon" alt="Starman Icon" />
<h2>Dude, Where's My Car?</h2>
</div>
</div>
<div class="row">
<div class="col-12">
<p class="section-subtext">Elon Musk's Tesla Roadster served as
the dummy payload for the February 2018 Falcon Heavy test flight and is now an artificial
satellite of the Sun. Starman, a mannequin dressed in a spacesuit, occupies the driver's seat.</p>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div id="carouselInterval" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active" data-interval="3000">
<img data-src="assets/img/roadster/roadster-1.jpg" class="d-block w-100 lazyload"
alt="Elon's Tesla Roadster">
</div>
<div class="carousel-item" data-interval="3000">
<img data-src="assets/img/roadster/roadster-2.jpg" class="d-block w-100 lazyload"
alt="Elon's Tesla Roadster">
</div>
<div class="carousel-item" data-interval="3000">
<img data-src="assets/img/roadster/roadster-3.jpg" class="d-block w-100 lazyload"
alt="Elon's Tesla Roadster">
</div>
<div class="carousel-item" data-interval="3000">
<img data-src="assets/img/roadster/roadster-4.jpg" class="d-block w-100 lazyload"
alt="Elon's Tesla Roadster">
</div>
</div>
<a class="carousel-control-prev" href="#carouselInterval" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselInterval" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="col-lg-6">
<!-- Roadster Data Table -->
<div class="table-responsive">
<table class="table table-dark" id="roadster-table">
<tr>
<td align="right">Current Speed:</td>
<td id="speed"></td>
</tr>
<tr>
<td align="right">Distance from Earth:</td>
<td id="earth-distance"></td>
</tr>
<tr>
<td align="right">Days in Orbit:</td>
<td id="days-in-space"></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer>
<div class="container-fluid">
<div class="row">
<div class="col-12">
<br>
<!-- Footer list -->
<ul id="footer-list">
<!-- SpaceX API -->
<li> Data Source: <a href="https://github.com/r-spacex/SpaceX-API" rel="noreferrer"
target="_blank">SpaceX API</a></li>
<!-- SpaceX Official Website -->
<li>Rocket Images: <a href="https://www.spacex.com" target="_blank" data-toggle="tooltip"
rel="noreferrer" title="SpaceX Official"><img data-src="assets/img/spacex_logo_white.png"
id="spacex-logo" class="lazyload" alt="SpaceX Logo"></a></li>
</ul>
<p>Developed by Thomas Dunn for Educational Purposes <a href="https://github.com/tdunn891"
target="_blank" rel="noreferrer">
<img data-src="assets/img/github-32.png" id="github-logo" class="lazyload" alt="GitHub Logo" /></a>
</p>
<br>
</div>
</div>
</div>
</footer>
<!-- SCRIPTS -->
<!-- d3 -->
<!-- <script src="https://d3js.org/d3.v5.min.js"></script> -->
<script src="assets/js/d3.v5.min.js"></script>
<!-- crossfilter -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/crossfilter2/1.5.0/crossfilter.min.js"
integrity="sha256-se5X4Z76HEuvDAemWFPeAT8JQ9lSjCLxK2JMmlEH/1Q=" crossorigin="anonymous"></script>
<!-- dc.js 3.1.8 -->
<script src="assets/js/dc.min.js"></script>
<!-- jquery 3.5.1 -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha256-4+XzXVhsDmqanXGHaHvgh1gMQKX40OUvDEBTu8JcmNs=" crossorigin="anonymous"></script>
<!-- popper.js -->
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<!-- bootstrap 4.4.1 js-->
<script src="assets/js/bootstrap.min.js"></script>
<!-- Google Maps API -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAAL9c7KZMQ6Bxqj7xLL5JSCF3OwWgHuN0" async
defer></script>
<!-- calendar js -->
<script type="text/javascript" src="https://addevent.com/libs/atc/1.6.1/atc.min.js" async defer></script>
<!-- YouTube -->
<script src="https://apis.google.com/js/platform.js"></script>
<!-- lazysizes -->
<script src="assets/js/lazysizes.min.js" async=""></script>
<!-- main.js -->
<script src="assets/js/main.js"></script>
</body>
</html>