-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
451 lines (431 loc) · 21.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="NASA API">
<meta name="keywords" content="HTML,CSS">
<meta name="author" content="Coole Sites 2018">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" href="assets/img/favicon/favicon.ico" type="image/gif" />
<meta name="theme-color" content="#ffffff">
<title>NASA API</title>
<!-- Bootstrap core CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
<!-- Custom fonts for this template -->
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<!-- Custom styles for this template -->
<link href="assets/css/mainStyles.css" rel="stylesheet">
</head>
<body id="page-top" data-spy="scroll" data-target="#mainNav">
<!-- Navigation -->
<nav id="mainNav" class="navbar navbar-expand-lg navbar-light fixed-top">
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="#page-top">NASA Images Portal</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#apodSection">APOD</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#epic">EPIC</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#library">Library</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#data">Data</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#contact">Contact</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- WELCOME TO NASA IMAGES PORTAL -->
<header class="intro text-center text-white d-flex">
<div class="container my-auto">
<div class="row">
<div class="col-12 mx-auto">
<h1 class="text-uppercase">
<strong>Welcome to NASA Images Portal</strong>
</h1>
</div>
<div class="col-12 mx-auto mb-3">
<p class="mx-auto p-3">This Portal site offers a brief introduction to the type of data NASA makes available to the public.</p>
<p class="mx-auto">APOD or Astronomy Picture of the Day is one of the most popular NASA websites. We have provided you with this picture and its brief explanation.</p>
<p class="mx-auto">The EPIC section provides information on the daily imagery collected by DSCOVR's Earth Polychromatic Imaging Camera (EPIC) instrument. Uniquely positioned at the Earth-Sun Lagrange point, EPIC provides full disc imagery of the Earth and captures
unique perspectives of certain astronomical events such as lunar transits using a 2048x2048 pixel CCD (Charge Coupled Device) detector coupled to a 30-cm aperture Cassegrain telescope. You can read more about the EPIC project on their site:
<a href="https://epic.gsfc.nasa.gov/epic" class="paralink">EPIC</a></p>
<p class="mx-auto">The Library section provides access to NASA's extensive Image and Video Library. You can search for any topic and see what interesting images and videos NASA have archived.</p>
</div>
</div>
</div>
</header>
<!-- Astronomy Picture of the Day (APOD) -->
<section id="apodSection" class="apod text-center text-white d-flex">
<div class="container my-auto">
<div class="row">
<div class="col-12 mx-auto mb-5">
<h2 class="text-uppercase">
<strong>Astronomy Picture of the day</strong>
</h2>
</div>
<div class="col-12 mx-auto mb-3">
<p class="text-faded mx-auto">One of the most popular websites at NASA is the Astronomy Picture of the Day. Each day a different image or photograph of our fascinating universe is featured, along with a brief explanation written by a professional astronomer.
<a href="https://apod.nasa.gov/apod/archivepix.html" class="paralink" target="blank">Click here</a> <i class='fa fa-external-link' aria-hidden='true'></i> to view all images archived since 1995.</p>
</div>
</div>
<div class="row" id="apod-error-row">
<div class="col-12 errorMessage" id="apod-error-message"></div>
</div>
<div class="row">
<!-- if apod is an image -->
<div class="col-12 col-sm-4 mx-auto" id="apod_img_container">
<img id="apod_img_id" class="apod-image mb-2" alt="Astronomy image of the day" />
<h3 id="apod_title_img"></h3>
</div>
<!-- if apod is a video -->
<div class="col-12 mx-auto video-container" id="apod_vid_container">
<iframe id="apod_vid_id" type="text/html" width="460" height="215"></iframe>
</div>
<div class="col-12 mx-auto" id="apod-title-vid-row">
<h3 id="apod_title_vid"></h3>
</div>
<div class="col-12 col-sm-8 mx-auto apod-para">
<p class="text-faded mb-4 px-3 py-3">
<span id="apod_date" class="apod-date"></span>
<span id="copyright" class="apod-copyright"></span>
</p>
<p class="text-faded px-3 py-3 apod-para-bg" id="apod_explaination">...loading image details.</p>
</div>
</div>
</div>
</section>
<!-- EPIC -->
<section id="epic" class="epicResults bg-black">
<div class="container" id="epicContainer">
<div class="row">
<div class="col-12 text-center">
<h2 class="section-heading text-white"><strong>EPIC</strong></h2>
<p class="text-faded mb-4">Please note that this section is not compatible with Internet Explorer. Please use Chrome or Firefox to search EPIC.</p>
<p class="text-faded mb-4">EPIC provides information on the daily imagery collected by DSCOVR's Earth Polychromatic Imaging Camera (EPIC) instrument. Uniquely positioned at the Earth-Sun Lagrange point, EPIC provides full disc imagery of the Earth and captures unique
perspectives of certain astronomical events such as lunar transits using a 2048x2048 pixel CCD (Charge Coupled Device) detector coupled to a 30-cm aperture Cassegrain telescope.</p>
<p class="text-faded mb-4">You can read more about EPIC and the DSCOVR project on the NASA website: <a href="https://epic.gsfc.nasa.gov/epic" target="blank">Earth Polychromatic Imaging Camera</a> <i class='fa fa-external-link' aria-hidden='true'></i></p>
<p class="text-faded nm-4" id="DateHelp"><a id="epic-recent-link" class="epic-click" onclick="getMostRecentEpic()">View the most recent EPIC image received <i class='fa fa-external-link' aria-hidden='true'></i></a><br> or enter a search date and click the search button<br> <span class="text-faded small">(the first acquired images began on 01 September 2015)</span></p>
</div>
</div>
<form id="epic-form" onsubmit="getEpicImageByDate()">
<!-- Date row -->
<div class="row">
<div class="col-12 col-sm-6 mx-auto">
<input type="text" class="form-control" name="formDate" id="formDate" aria-describedby="DateHelp" placeholder="Enter a date in the format: YYYY-MM-DD" />
</div>
</div>
<!-- Image Type row, Natural or Enhanced -->
<div class="row">
<div class="col-12 col-sm-6 mx-auto">
<div class="form-check">
<input class="form-check-input" type="radio" name="imageType" id="naturalImage" value="natural" checked>
<label class="form-check-label text-faded" for="naturalImage">Natural Image</label>
</div>
<div class="form-check ml-3">
<input class="form-check-input" type="radio" name="imageType" id="enhancedImage" value="enhanced">
<label class="form-check-label text-faded" for="enhancedImage">Enhanced Image</label>
</div>
</div>
</div>
<!-- Error Message Row -->
<div class="row">
<div class="col-12 col-sm-6 mx-auto">
<span id="errorMessage" class="errorMessage"></span>
</div>
</div>
<!-- Button row -->
<div class="row">
<div class="col-12 text-center mt-5">
<button id="epic-images-button" type="submit" class="btn btn-light btn-xl">Search</button>
</div>
</div>
</form>
</div>
<div id="jumpto1"></div>
<div class="container mt-5" id="epicResultsContainer">
<!--Title and number of images returned -->
<div class="row">
<div class="col-12 text-center">
<h3 class="section-heading text-white">EPIC Results</h3>
<div id="resultStatus"></div>
</div>
</div>
<!-- Results of EPIC date search -->
<div class="row">
<!-- image -->
<div class="col-12 col-sm-6 text-center">
<div id="imageCol">image loading...</div>
</div>
<!-- image information -->
<div class="col-12 col-sm-6 pt-5">
<div id="dataCol" class="text-faded"></div>
<!-- Paging -->
<div id="pagingRow">
<div class="mt-3">
<div class="mx-auto">
<input type="button" id="first" onclick="firstPage()" value="first" class="btn btn-light btn-sm" />
<input type="button" id="previous" onclick="previousPage()" value="previous" class="btn btn-light btn-sm" />
<input type="button" id="next" onclick="nextPage()" value="next" class="btn btn-light btn-sm" />
<input type="button" id="last" onclick="lastPage()" value="last" class="btn btn-light btn-sm" />
<input type="button" id="clearResults" onclick="clearEpicResults()" value="Clear Results" class="btn btn-light btn-sm mt-2" />
</div>
</div>
</div>
</div>
</div>
</div>
<div id="jumpto2"></div>
<div class="container mt-5" id="epicMostRecentContainer">
<!--Image Title -->
<div class="row">
<div class="col-12 text-center">
<h3 class="section-heading text-white">EPIC Most Recent Image</h3>
</div>
</div>
<!--Most Recent Results -->
<div class="row">
<div class="col-12 col-sm-6 text-center">
<div id="epicMostRecentImage">image loading...</div>
</div>
<div class="col-12 col-sm-6 pt-5">
<div id="epicMostRecentData" class="text-faded"></div>
<!-- Paging -->
<div id="pagingRowRecent">
<div class="mt-3">
<div class="mx-auto">
<input type="button" id="clear" onclick="clearEpicResults()" value="Clear Results" class="btn btn-light btn-sm mt-2" />
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Search NASA Image and Video Library -->
<section id="library" class="librarySection sr-search">
<!-- Heading Library -->
<div class="container">
<div class="row">
<div class="col-12 text-center">
<h2 class="section-heading">Search NASA Image and Video Library</h2>
</div>
</div>
</div>
<!-- Form Library -->
<div class="container">
<form id="library-form" onsubmit="getQueryText()">
<div class="row">
<div class="col-12 col-sm-10 mt-5 mx-auto">
<div class="form-group text-center">
<label for="searchLibraryText">Enter a topic to search and choose the media type.</label>
<input type="text" class="form-control" id="searchLibraryText" placeholder="e.g. apollo, moon, europe..." title="Enter a topic to search and choose the media type">
</div>
<div class="form-check ml-3">
<input class="form-check-input" type="radio" name="mediaType" id="image" value="image" title="image" checked>
<label class="form-check-label" for="image">Image</label>
</div>
<div class="form-check ml-3">
<input class="form-check-input" type="radio" name="mediaType" id="video" value="video" title="video">
<label class="form-check-label" for="video">Video</label>
</div>
<div class="form-check ml-3">
<input class="form-check-input" type="radio" name="mediaType" id="audio" value="audio" title="audio">
<label class="form-check-label" for="video">Audio</label>
</div>
<!-- error message -->
<div class="form-check ml-3 float-right errorMessage" id="errorLibraryMessage"></div>
</div>
</div>
<!-- Search NASA button -->
<div class="row">
<div class="col-12 col-md-6 mx-auto mt-3 text-center">
<button type="submit" class="btn btn-primary btn-xl" id="search-nasa-button" title="Search Nasa">Search NASA</button>
</div>
<div class="col-12 col-md-6 mx-auto mt-3 text-center" id="clearResultsDiv">
<button type="button" class="btn btn-primary btn-xl" onclick="clearLibraryResults()" title="Clear Results">Clear Results</button>
</div>
</div>
</form>
</div>
<!-- ruler hr -->
<div class="row">
<div class="col-12 mx-auto">
<hr>
</div>
</div>
<!-- Results Library -->
<div class="container" id="searchLibraryResultsContainer">
<!-- Paging Buttons -->
<div class="row">
<div class="col-12">
<div id="pagingRowLibrary">
<div class="float-sm-left text-center">
<h3>Search Results <span id="media-type"></span></h3>
</div>
<div class="float-sm-right text-center">
<!-- PAGING BUTTONS -->
<div id="paging-buttons">
<input type="button" id="first-Button" value="First" class="btn btn-dark btn-sm" />
<input type="button" id="previous-Button" value="Previous" class="btn btn-dark btn-sm" />
<input type="button" id="next-Button" value="Next" class="btn btn-dark btn-sm" />
<input type="button" id="last-Button" value="Last" class="btn btn-dark btn-sm" />
</div>
</div>
</div>
</div>
</div>
<!-- results error -->
<div class="row">
<div class="col-12 errorMessage" id="errorLibraryResultMessage"></div>
</div>
<!-- Total Result Hits -->
<div class="row">
<div class="col-12 mt-3">
Total results: <span id="totalLibraryHits"></span>
</div>
</div>
<!-- Paging Information -->
<div class="row">
<div class="col-12">
<div id="pagingInfo">
Page <span id="pageNumber"></span> of <span id="pageCount"></span><span id="result_ex"></span>
</div>
</div>
</div>
<!-- Library Results -->
<div class="row" id="libraryResults"></div>
<!-- Clear Results button -->
<div class="row">
<div class="col-12 mx-auto text-center mt-3">
<button type="button" class="btn btn-primary btn-xl" onclick="clearLibraryResults()">Clear Results</button>
</div>
</div>
</div>
</section>
<!-- Data -->
<section id="data" class="bg-dark text-white">
<div class="container text-center my-auto">
<div class="row">
<div class="col-12 text-center">
<h2 class="section-heading mb-4">Data</h2>
</div>
</div>
<div class="row">
<div class="col-12 text-center">
<p class="mx-auto">NASA has made available to the public a vast list of datasets. I have chosen to create chart views of the NASA Facilities dataset.<br> This dataset was last updated on August 26, 2015 and first created August 26, 2015. There are 485 rows of
data about facilities.<br> You will need to view this page on a desktop device to see all the charts.</p>
<p class="mx-auto">You can <a href="assets/img/NASA_Facilities.csv" class="paralink">download</a> a csv version of this data. <a href="assets/img/NASA_Facilities.csv" class="paralink">Download</a> <i class="fa fa-download" aria-hidden="true"></i></p>
</div>
</div>
<div class="row">
<div class="col-12 col-sm-12 col-lg-6">
<div id="data-city"></div>
<div>Pie-chart illustrating the number of NASA facilities in each city.</div>
</div>
<div class="col-12 col-sm-12 col-lg-6">
<div id="data-status-pie"></div>
<div>Pie-chart illustrating the number of NASA facilities by their status - for example active or inactive.</div>
</div>
</div>
<div class="row">
<div class="col-12 d-none d-sm-block mt-5" id="data-center"></div>
</div>
<div class="row">
<div class="col-12 d-none d-sm-block mt-5" id="data-status"></div>
</div>
</div>
</section>
<!-- Footer/Contact -->
<section id="contact" class="sr-contact">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto text-center">
<h2 class="section-heading">Further Information</h2>
<p class="mb-5">Want to find out more about NASA?</p>
</div>
</div>
<div class="row">
<div class="col-4 col-lg-2 ml-auto text-center">
<a href="https://www.nasa.gov/" target="blank" title="NASA website"><i class="fa fa-external-link fa-3x" aria-hidden="true"></i></a>
</div>
<div class="col-4 col-lg-2 mr-auto text-center">
<a href="https://www.instagram.com/nasa/?hl=en" target="blank" title="NASA on Instagram"><i class="fa fa-instagram fa-3x" aria-hidden="true"></i></a>
</div>
<div class="col-4 col-lg-2 mr-auto text-center">
<a href="https://twitter.com/NASA" target="blank" title="NASA on Twitter"><i class="fa fa-twitter fa-3x" aria-hidden="true"></i></a>
</div>
<div class="col-6 col-lg-2 mr-auto text-center mt-4">
<a href="https://www.youtube.com/channel/UCLA_DiR1FfKNvjuUpBHmylQ" target="blank" title="NASA on YouTube"><i class="fa fa-youtube fa-3x" aria-hidden="true"></i></a>
</div>
<div class="col-6 col-lg-2 mr-auto text-center mt-4">
<a href="https://www.facebook.com/NASA/" target="blank" title="NASA on Facebook"><i class="fa fa-facebook-official fa-3x" aria-hidden="true"></i></a>
</div>
</div>
</div>
</section>
<!-- Bootstrap core JavaScript -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" crossorigin="anonymous"></script>
<!-- Plugin JavaScript -->
<!-- animates the appearance of an image -->
<script src="assets/js/jquery-easing/jquery.easing.min.js"></script>
<!-- reveals page as you scroll -->
<script src="assets/js/scrollreveal/scrollreveal.min.js"></script>
<!-- Bootstrap Date-Picker Plugin -->
<!-- Bootstrap Date-Picker supplied by https://bootstrap-datepicker.readthedocs.io/ -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/css/bootstrap-datepicker3.css" />
<!-- DataPicker script used in EPIC -->
<script>
$(document).ready(function() {
var date_input = $('input[name="formDate"]'); //our date input has the name "date"
var container = $('.bootstrap-iso form').length > 0 ? $('.bootstrap-iso form').parent() : "body";
var options = {
format: 'yyyy-mm-dd',
container: container,
todayHighlight: true,
autoclose: true,
weekStart: 1,
startView: 1,
daysOfWeekHighlighted: "0,6"
};
date_input.datepicker(options);
})
</script>
<!-- d3/dc queue scripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.12/crossfilter.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dc/2.1.8/dc.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/queue-async/1.0.7/queue.min.js"></script>
<!-- My Custom scripts for this page -->
<script src="assets/js/custom.js"></script>
<script src="assets/js/helperTools.js"></script>
<script src="assets/js/nasaAPI-apod.js"></script>
<script src="assets/js/nasaAPI-epic.js"></script>
<script src="assets/js/nasaAPI-library.js"></script>
<script src="assets/js/nasaAPI-data.js"></script>
<!-- Ensures submit can be done by button click or key press return key -->
<script type="text/javascript">
$("#library-form").submit(function(e) {
e.preventDefault();
});
$("#epic-form").submit(function(e) {
e.preventDefault();
});
</script>
</body>
</html>