-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
267 lines (239 loc) · 11.2 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
<!doctype html>
<html>
<head>
<title>mondo-tx-heatmap</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="toggle.css">
<link rel="stylesheet" href="bower_components/components-font-awesome/css/font-awesome.css">
<link rel=“shortcut icon” href=“favicon.png” type=“image/png” />
</head>
<body>
<div class="hidebg"> </div>
<div class="authpopup">
<div class="authpopup__container authpopup__container__title">
Enter Your Credentials
</div>
<div class="authpopup__container">
<p>
Hello! OAuth signin isn't ready yet, so to play with the transaction heatmap, you'll need to sign in at
<a href="https://staging-developers.getmondo.co.uk/" target="_blank">https://staging-developers.getmondo.co.uk/</a>
(for staging) and paste your
<em>Sandbox Access Token</em> into the form field below. Remember that this isn't ready for public use yet!
</p>
<p>
Credentials you enter here will be saved in your web browser's local storage, and sent to the Mondo servers
to authorise your API call. Use at your own risk!
</p>
</div>
<div class="authpopup__container">
<div class="formgroup">
<label for="apiurlbox">Mondo API URL</label><br>
<input type="text" name="apiurlbox" id="apiurlbox" value=""/>
</div>
<div class="formgroup">
<label for="sandboxkeybox">Sandbox Access Token</label><br>
<input type="password" name="sandboxkeybox" id="sandboxkeybox" value=""/>
</div>
</div>
<div class="authpopup__container" style="text-align: center;">
<a class="authpopup__button" href="#" id="continue_btn" style="width: 120px">Continue</a>
</div>
</div>
<div id="sidebar">
<div class="sidebar__section">
<div class="sidebar__section__body">
<p class="sidebar__header">mondo-tx-heatmap</p>
<p style="text-align: center;">made by <i class="fa fa-twitter"></i>
<a href="https://twitter.com/rmuch" target="_blank">@rmuch</a> · #mondohack III</p>
<p style="text-align: center;">fork me <i class="fa fa-github-alt"></i>
<a href="https://github.com/rmuch/mondo-tx-heatmap">rmuch/mondo-tx-heatmap</a></p>
</div>
</div>
<div class="sidebar__section">
<div class="sidebar__section__title">Transaction Heat Map</div>
<div class="sidebar__section__body">
<p>This is a map of the world with your Mondo spending overlaid as a heatmap.</p>
<p>Some interesting things you might learn from this data are:</p>
<ul>
<li>Where you spend the most money on a regular basis</li>
<li>Which holiday destinations are more expensive</li>
</ul>
<p>With more effort, we could:</p>
<ul>
<li>
Connect many people's anonymised transactions for economic research, retail spending
metrics, etc.
</li>
</ul>
</div>
</div>
<div class="sidebar__section">
<div class="sidebar__section__title">Options</div>
<div class="sidebar__section__body">
<div class="toggleopt">
<div class="toggleopt__label">
Weighted <br> <em class="toggleopt__label__descr">(bigger transactions appear hotter)</em>
</div>
<div class="togggleopt__switch toggleopt__switch--doubleheight">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="opt_weighted_onoff">
<label class="onoffswitch-label" for="opt_weighted_onoff"></label>
</div>
</div>
</div>
<div class="toggleopt">
<div class="toggleopt__label">
Time Decay <br> <em class="toggleopt__label__descr">(older transactions appear cooler)</em>
</div>
<div class="togggleopt__switch toggleopt__switch--doubleheight">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="opt_decay_onoff">
<label class="onoffswitch-label" for="opt_decay_onoff"></label>
</div>
</div>
</div>
</div>
</div>
<div class="sidebar__section">
<div class="sidebar__section__title">Filter by Category</div>
<!--
Top-ups have category “mondo”. Valid values are
general, eating_out, expenses, transport, cash, bills, entertainment, shopping, holidays, groceries.
-->
<div class="sidebar__section__body">
<!-- TODO: this would be nicer if it was automatic -->
<div class="toggleopt">
<div class="toggleopt__label">General</div>
<div class="togggleopt__switch">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="general_onoff"
checked>
<label class="onoffswitch-label" for="general_onoff"></label>
</div>
</div>
</div>
<div class="toggleopt">
<div class="toggleopt__label">Eating Out</div>
<div class="togggleopt__switch">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="eating_out_onoff"
checked>
<label class="onoffswitch-label" for="eating_out_onoff"></label>
</div>
</div>
</div>
<div class="toggleopt">
<div class="toggleopt__label">Expenses</div>
<div class="togggleopt__switch">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="expenses_onoff"
checked>
<label class="onoffswitch-label" for="expenses_onoff"></label>
</div>
</div>
</div>
<div class="toggleopt">
<div class="toggleopt__label">Transport</div>
<div class="togggleopt__switch">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="transport_onoff"
checked>
<label class="onoffswitch-label" for="transport_onoff"></label>
</div>
</div>
</div>
<div class="toggleopt">
<div class="toggleopt__label">Cash</div>
<div class="togggleopt__switch">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="cash_onoff"
checked>
<label class="onoffswitch-label" for="cash_onoff"></label>
</div>
</div>
</div>
<div class="toggleopt">
<div class="toggleopt__label">Bills</div>
<div class="togggleopt__switch">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="bills_onoff"
checked>
<label class="onoffswitch-label" for="bills_onoff"></label>
</div>
</div>
</div>
<div class="toggleopt">
<div class="toggleopt__label">Entertainment</div>
<div class="togggleopt__switch">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="entertainment_onoff"
checked>
<label class="onoffswitch-label" for="entertainment_onoff"></label>
</div>
</div>
</div>
<div class="toggleopt">
<div class="toggleopt__label">Shopping</div>
<div class="togggleopt__switch">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="shopping_onoff"
checked>
<label class="onoffswitch-label" for="shopping_onoff"></label>
</div>
</div>
</div>
<div class="toggleopt">
<div class="toggleopt__label">Holidays</div>
<div class="togggleopt__switch">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="holidays_onoff"
checked>
<label class="onoffswitch-label" for="holidays_onoff"></label>
</div>
</div>
</div>
<div class="toggleopt">
<div class="toggleopt__label">Groceries</div>
<div class="togggleopt__switch">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="groceries_onoff"
checked>
<label class="onoffswitch-label" for="groceries_onoff"></label>
</div>
</div>
</div>
</div>
</div>
<!--
<div class="section_footer section_body">
<p>by <a href="https://twitter.com/rmuch" target="_blank">@rmuch</a> · #mondohack III</p>
<p>github <a href="https://github.com/rmuch/mondo-tx-heatmap">rmuch/mondo-tx-heatmap</a></p>
</div>
-->
</div>
<div id="map"></div>
<!-- bower dependencies -->
<script type="text/javascript" src="bower_components/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="bower_components/underscore/underscore.js"></script>
<!-- application -->
<script type="text/javascript" src="lightgreystyle.js"></script>
<script type="text/javascript" src="main.js"></script>
<!-- google maps api -->
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?libraries=visualization"></script>
<!--
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?libraries=visualization&callback=initMap2"></script>
-->
<script type="text/javascript">
$(document).ready(function () {
if (navigator.userAgent.toLowerCase().indexOf('chrome') < 0) {
alert("This site is only tested with Google Chrome at the moment, because it requires some ES6 features." +
"You can try with your current browser, but if anything appears broken, please try Google Chrome.")
}
initMap2();
initJq();
});
</script>
</body>
</html>