-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
168 lines (160 loc) · 8.27 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
<!doctype html>
<html>
<head>
<meta charset='UTF-8' />
<!-- bootstrap stylesheet -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<!-- self-made stylesheet -->
<link href='public/stylesheets/layout.css' rel='stylesheet' />
<link href='public/stylesheets/legend.css' rel='stylesheet' />
<title>InMap</title>
</head>
<body>
<div class="container-fluid p-0">
<!-- navbar -->
<nav class="navbar navbar-expand-lg z-2 navbar-dark bg-dark">
<div class="container-fluid">
<a class="btn btn-sm btn-outline-secondary" href="https://xiaor2.github.io/JupyterLiteForInMAP">
JupyterLite tutotial
</a>
<a class="navbar-brand" href="#">InMap</a>
<a class="btn btn-sm btn-outline-secondary" href="#" role="button" data-bs-toggle="modal"
data-bs-target="#instruction" aria-expanded="false">
Read Before Use
</a>
</div>
</nav>
<!-- Modal -->
<div class="modal fade" id="instruction" tabindex="-1" aria-labelledby="Modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="exampleModalLabel">Read Before Use</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>
<ul class="me-2">
<li><b>Step 1:</b> Left click on the Map to choose a location. (US only)</li>
<li><b>Step 2:</b> Enter the concentrations of emissions, and the default is 0.</li>
<li><b>Step 3:</b> Click the apply button and wait for few seconds and see the result.</li>
<li><b>Note:</b> The apply operation is accumulative, you can add another emissions source to the existing
ones unless you refresh the page.</li>
<li><b>Zoom in</b> to see the clear results.</li>
</ul>
</p>
</div>
</div>
</div>
</div>
<!-- mapbox -->
<div id="map" class="z-0" style='margin-top:50px'></div>
<!-- waiting -->
<div id="waiting" class="container position-absolute z-2">
<div class="row">
<div class="col-6 offset-6">
<div class="alert alert-success" role="alert">
<h4 class="alert-heading">Pollutant data loading!</h4>
<hr>
<p>This step might take a few seconds. While waiting, you can get yourself a cup of coffee and eat some
cookies, then it should be done.</p>
</div>
</div>
</div>
</div>
<!-- color legend -->
<div class="card position-absolute z-1" style="width: 28.5rem">
<ul class="list-group list-group-flush bg-dark text-bg-dark">
<li class="list-group-item bg-dark text-bg-dark">Legend (μg/m³)</li>
<li class="list-group-item bg-dark text-bg-dark">
<div id='legend'></div>
<div class="row">
<div class="col text-end" id="legend1">0</div>
<div class="col text-end" id="legend2">0</div>
<div class="col text-end" id="legend3">0</div>
<div class="col text-end" id="legend4">0</div>
<div class="col text-end" id="legend5">0</div>
</div>
</li>
</ul>
</div>
<div class="row fixed-bottom">
<div class="card col bg-dark text-bg-dark">
<div class="card-body row">
<h5 class="card-title">Place a power plant</h5>
<div class="row">
<div class="input-group mb-3 col bg-dark text-bg-dark">
<span class="input-group-text bg-dark text-bg-dark" id="inputGroup-sizing-default">SOA</span>
<input type="number" id="SOA" class="form-control bg-dark text-bg-dark" aria-label="Sizing example input"
aria-describedby="inputGroup-sizing-default" value="0">
</div>
<div class="input-group mb-3 col bg-dark text-bg-dark">
<span class="input-group-text bg-dark text-bg-dark" id="inputGroup-sizing-default">pNO3</span>
<input type="number" id="pNO3" class="form-control bg-dark text-bg-dark" aria-label="Sizing example input"
aria-describedby="inputGroup-sizing-default" value="0">
</div>
<div class="input-group mb-3 col bg-dark text-bg-dark">
<span class="input-group-text bg-dark text-bg-dark" id="inputGroup-sizing-default">pNH4</span>
<input type="number" id="pNH4" class="form-control bg-dark text-bg-dark" aria-label="Sizing example input"
aria-describedby="inputGroup-sizing-default" value="0">
</div>
<div class="input-group mb-3 col bg-dark text-bg-dark">
<span class="input-group-text bg-dark text-bg-dark" id="inputGroup-sizing-default">pSO4</span>
<input type="number" id="pSO4" class="form-control bg-dark text-bg-dark" aria-label="Sizing example input"
aria-describedby="inputGroup-sizing-default" value="0">
</div>
<div class="input-group mb-3 col bg-dark text-bg-dark">
<span class="input-group-text bg-dark text-bg-dark" id="inputGroup-sizing-default">PM25</span>
<input type="number" id="PM25" class="form-control bg-dark text-bg-dark" aria-label="Sizing example input"
aria-describedby="inputGroup-sizing-default" value="0">
</div>
</div>
<div class="row">
<div class="input-group mb-3 col bg-dark text-bg-dark">
<label class="input-group-text bg-dark text-bg-dark" for="inputGroupSelect01">Pollutant Unit</label>
<select class="form-select bg-dark text-bg-dark" id="inputGroupSelect01">
<option selected disabled>Choose...</option>
<option value="tons/year">Tons/Year</option>
<option value="kilograms/year">Kilograms/Year</option>
<option value="micrograms/sec">Micrograms/Second</option>
</select>
</div>
<div class="div col">
<div class="input-group mb-3 col bg-dark text-bg-dark">
<span class="location input-group-text bg-dark text-bg-dark"
id="inputGroup-sizing-default">Location</span>
<input id="location" type="number" class="location form-control bg-dark text-bg-dark"
aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default">
</div>
</div>
<button class="btn btn-success btn-sm bg-success p-2 text-white bg-opacity-50" id="deploy">Apply</button>
</div>
</div>
</div>
</div>
</div>
</body>
<!-- deck.gl -->
<script src="https://unpkg.com/deck.gl@latest/dist.min.js"></script>
<!-- bootstrap -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-mQ93GR66B00ZXjt0YO5KlohRA5SY2XofN4zfuZxLkoj1gXtW8ANNCe9d5Y3eG5eD" crossorigin="anonymous"></script>
<!-- mapbox -->
<script src='https://api.mapbox.com/mapbox-gl-js/v2.13.0/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v2.13.0/mapbox-gl.css' rel='stylesheet' />
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mapbox-gl/2.12.1/mapbox-gl.js"
integrity="sha512-W9vpYlNnHnjx95JC9UBdATCyWv2ciXAkseFarlUkk9bkV82wUfMZ6ygPfGz0sZ0CsOHzPIpmU5w8/JIvQebzJg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!-- d3.js -->
<script src="https://d3js.org/d3.v7.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.10.0/d3.min.js"></script>
<!-- Pyodide -->
<script src="https://cdn.jsdelivr.net/pyodide/v0.22.1/full/pyodide.js"></script>
<!-- inmap module -->
<script type="module" src="public/javascripts/legend.js"></script>
<script type="module" src="public/javascripts/index.js"></script>
</html>