-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
318 lines (297 loc) · 11.2 KB
/
Copy pathindex.html
File metadata and controls
318 lines (297 loc) · 11.2 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Achievement Matrix</title>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
height: 100vh;
flex-direction: column;
justify-content: flex-start;
align-items: center;
background-color: #FCFFC1;
p{
color: #1B1833;
}
}
.container {
display: flex;
width: 100%;
flex: 1;
}
h2 {
color: #1C325B;
}
button {
background-color: #A1D6CB;
border-radius: 6px;
border-color: #A1D6CB;
color: white;
}
.right-section {
width: 40%;
padding: 20px;
border-right: 2px solid #ccc;
position: sticky;
top: 0;
height: 100vh;
overflow: auto;
}
.left-section {
width: 60%;
padding: 20px;
position: relative;
button {
float: left;
}
#note {
display: contents;
}
}
.matrix-container {
text-align: center;
}
.matrix {
display: none;
text-align: left;
margin-top: 20px;
}
.content {
font-size: 12px;
transition: all 0.5s ease;
}
#deprivationVector, #zSet, #g0Matrix, #cVector, #g1Matrix {
display: none;
margin-top: 20px;
}
#note {
position: absolute;
left: 20px;
top: 575px;
font-size: 14px;
color: #3E5879;
font-weight: bold;
}
#ruralityFormulas {
display: none;
font-size: 16px;
font-weight: bold;
position: relative;
margin-top: 20px;
#formula6 {
color: #3E5879;
}
}
#heading-text {
text-align: center;
margin-top: 10px;
h1 {
margin: 0px;
color: #1B1833;
}
}
#introduction-text {
text-align: left;
padding-left: 40px;
width: 100%;
}
</style>
</head>
<body>
<!-- Heading and paragraph at the top center -->
<div id="heading-text">
<h1>A Snapshot of Method</h1>
</div>
<div id="introduction-text">
<p><i>Let n be the number of locations and d be the number of dimensions.</i></p>
</div>
<div class="container">
<!-- Left Section -->
<div class="left-section">
<div class="matrix-container">
<!-- Achievement Matrix -->
<button id="achievementMatrixBtn" onclick="showAchievementMatrix()">Show Achievement Matrix</button>
<br/>
<div class="matrix content" id="achievementMatrix">
<h2>Achievement Matrix</h2>
<p>
\[
y =
\begin{pmatrix}
y_{1,1} & y_{1,2} & \dots & y_{1,d} \\
y_{2,1} & y_{2,2} & \dots & y_{2,d} \\
\vdots & \vdots & \ddots & \vdots \\
y_{n,1} & y_{n,2} & \dots & y_{n,d}
\end{pmatrix}
\]
</p>
</div>
<br/>
<!-- Deprivation Vector -->
<button id="zVectorBtn" onclick="showZVector()">Show Z Vector</button>
<br/>
<div class="matrix content" id="deprivationVector">
<h2>Deprivation Cut-offs Vector</h2>
<p>
\[
z = \begin{bmatrix} z_1 & z_2 & \dots & z_d \ \end{bmatrix}
\]
</p>
</div>
<br/>
<!-- Z Set -->
<button id="zSetBtn" onclick="showZSet()">Show Z Set</button>
<br/>
<div class="matrix content" id="zSet">
<h2>Z Set</h2>
<p>
\[
Z = \{Z_1, Z_2, \dots, Z_n\}
\]
</p>
</div>
<br/>
<button id="g0Btn" onclick="showG0()">Show g₀ Matrix</button>
<br/>
<!-- g₀ Matrix -->
<div class="matrix content" id="g0Matrix">
<h2>g₀ Matrix</h2>
<p>
\[
g_0 =
\begin{pmatrix}
g_{1,1} & g_{1,2} & \dots & g_{1,d} \\
g_{2,1} & g_{2,2} & \dots & g_{2,d} \\
\vdots & \vdots & \ddots & \vdots \\
g_{n,1} & g_{n,2} & \dots & g_{n,d}
\end{pmatrix}
\]
</p>
</div>
<br/>
<button id="cBtn" onclick="showC()">c Vector</button>
<br/>
<!-- c Vector -->
<div class="matrix content" id="cVector">
<h2>c Vector</h2>
<p>
\[
c = \begin{bmatrix} c_1 \\
c_2 \\
\vdots \\
c_n \end{bmatrix}
\]
</p>
</div>
<br/>
<button id="g1Btn" onclick="showG1()">g₁ Matrix</button>
<br/>
<!-- g₁ Matrix -->
<div class="matrix content" id="g1Matrix">
<h2>g₁ Matrix</h2>
<p>
\[
g_1 =
\begin{pmatrix}
\frac{z_1 - y_{1,1}}{z_1} & \frac{z_2 - y_{1,2}}{z_2} & \dots & \frac{z_d - y_{1,d}}{z_d} \\
\frac{z_1 - y_{2,1}}{z_1} & \frac{z_2 - y_{2,2}}{z_2} & \dots & \frac{z_d - y_{2,d}}{z_d} \\
\vdots & \vdots & \ddots & \vdots \\
\frac{z_1 - y_{n,1}}{z_1} & \frac{z_2 - y_{n,2}}{z_2} & \dots & \frac{z_d - y_{n,d}}{z_d}
\end{pmatrix}
\]
</p>
</div>
</div>
<br/>
<br/>
<br/>
<!-- Added note section -->
<div id="note">
<p>Note: Set Z is function of k as identification is based on c and k. <br> Further c, g0 and g1 are also functions of k. <br> Clearly g1 is censored matrix</p>
</div>
</div>
<!--Right section-->
<div class="right-section">
<h2>Rurality Formulas</h2>
<br/>
<button id="next-formula" onclick="displayFormula()">Show Next Formula</button>
<!-- Rurality Formulas -->
<div id="ruralityFormulas">
<p id="formula1" style="display:none;">H = \( \frac{q}{n} \)</p>
<p id="formula2" style="display:none;">A = \( \frac{|C_k|}{q \cdot d} \)</p>
<p id="formula3" style="display:none;">G = \( \frac{|g^{\prime}(k)|}{|g^0(k)|} \) ≡ \( \frac{|g^{\prime}(k)|}{|c(k)|} \)</p>
<p id="formula4" style="display:none;">Rurality (M₀) = \( \frac{q}{n} \) * \( \frac{|C_k|}{q \cdot d} \) ≡ \( \frac{|c(k)|}{n \cdot d} \) (0-Urban; 1-Most Rural)</p>
<p id="formula5" style="display:none;">Rurality (M₁) = H * A * G = \( \frac{q}{n} \) * \( \frac{|C_k|}{q \cdot d} \) * \( \frac{|g^{\prime}(k)|}{|g^0(k)|} \) ≡ \( \frac{|g^{\prime}(k)|}{n \cdot d} \) (0-Urban; 1-Most Rural)</p>
<p id="formula6" style="display:none;">Note: As discussed, the notation \( |v| \) implies the sum of all the elements in the given vector/matrix.</p>
</div>
</div>
</div>
<script>
let currentFormula = 1;
function displayFormula() {
var ruralityContainer = document.getElementById('ruralityFormulas');
ruralityContainer.style.display = 'block';
if (currentFormula <= 6) {
let formula = document.getElementById('formula' + currentFormula);
formula.style.display = 'block';
currentFormula++;
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
}
if(currentFormula == 7) {
var nextformulaBtn = document.getElementById('next-formula');
nextformulaBtn.style.display = 'none';
}
}
function showAchievementMatrix() {
var achievementMatrix = document.getElementById('achievementMatrix');
achievementMatrix.style.display = 'block';
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
var achievementMatrixBtn = document.getElementById("achievementMatrixBtn");
achievementMatrixBtn.style.display = 'none';
}
function showZVector() {
var deprivationContainer = document.getElementById('deprivationVector');
deprivationContainer.style.display = 'block';
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
var zVectorBtn = document.getElementById("zVectorBtn");
zVectorBtn.style.display = 'none';
}
function showZSet() {
var zSetContainer = document.getElementById('zSet');
zSetContainer.style.display = 'block';
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
var zSetBtn = document.getElementById("zSetBtn");
zSetBtn.style.display = 'none';
}
function showG0() {
var g0Container = document.getElementById('g0Matrix');
g0Container.style.display = 'block';
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
var g0Btn = document.getElementById("g0Btn");
g0Btn.style.display = 'none';
}
function showC() {
var cVectorContainer = document.getElementById('cVector');
cVectorContainer.style.display = 'block';
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
var cBtn = document.getElementById("cBtn");
cBtn.style.display = 'none';
}
function showG1() {
var g1Container = document.getElementById('g1Matrix');
g1Container.style.display = 'block';
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
var g1Btn = document.getElementById("g1Btn");
g1Btn.style.display = 'none';
}
</script>
</body>
</html>