-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathindex.html
More file actions
280 lines (253 loc) · 15.9 KB
/
Copy pathindex.html
File metadata and controls
280 lines (253 loc) · 15.9 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
<!DOCTYPE html>
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-127622082-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-127622082-1');
</script>
<!-- Custom Content -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Messenger Data Analysis</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="./img/icon.png">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" media="screen" href="style.css" />
</head>
<body>
<div id="header">
<div class="block header-bg-img">
<div class="container text-center">
<div class="graph-logo-bottom">
<div class="graph-bar-1"></div>
<div class="graph-bar-2"></div>
<div class="graph-bar-3"></div>
<div class="graph-bar-4"></div>
</div>
<h1 class="header-title-img display-4 font-weight-bold mt-4">Messenger Data Analysis</h1>
<!-- <img class="header-title-img img-fluid" src="./img/TestHeader.png" alt=""> -->
</div>
</div>
<div class="block header-intro text-light">
<div class="text-center">
<h3>Welcome to Messenger Data Analysis</h3>
<h4 class="h4-c">Take a dive into your Facebook messages and discover your most used words & emojis, message frequency, and more!</h3>
</div>
</div>
<div class="triangle-down-mid text-center"></div>
<div class="triangle-down-mid-center text-center"></div>
</div>
<div id="marketing-cards" class="container">
<div class="card-deck">
<div class="card text-center">
<div class="card-body">
<img src="./img/messenger-logo-colour.png" class="card-img-top mda-card-img" alt="...">
<h5 class="card-title">Works with Facebook Messenger</h5>
<p class="card-text">Download your data from Facebook and you can analyse both personal and group conversations!</p>
</div>
</div>
<div class="card text-center">
<div class="card-body">
<img src="./img/no-network.png" class="card-img-top mda-card-img" alt="...">
<h5 class="card-title">Runs completely offline</h5>
<p class="card-text">Your data is not uploaded to any server - analysis is done by your computer, locally in your browser. <a href="javascript:void(0);" data-toggle="modal" data-target="#learn-more-modal">Learn more</a>.</p>
</div>
</div>
<div class="card text-center">
<div class="card-body">
<img src="./img/bar-chart.png" class="card-img-top mda-card-img" alt="...">
<h5 class="card-title">Visually represent your data</h5>
<p class="card-text">Get beautiful charts of your data, and customise them to get a better look at what interests you.</p>
</div>
</div>
</div>
</div>
<div id="instructions" class="container">
<div class="mda-spacer"></div>
<div class="card w-75 mx-auto start-analysis-box mb-5">
<div class="card-body text">
<h3 class="text-center">Get Started Now!</h3>
<div class="w-75 mt-4 mx-auto">
<p><strong>Step 0.</strong> Analyse a sample file to get a taste of what it can do! <a id="start-demo-file" href="javascript:void(0);">Click here</a></p>
<p><strong>Step 1.</strong> Download your Messenger data from Facebook. Don't know how? <a href="javascript:void(0);" data-toggle="modal" data-target="#guide-modal">Click here for a guide</a>!</p>
<p><strong>Step 2.</strong> Browse for your file(s) (.json format only), then hit "Start" to begin the analysis. It's that easy!</p>
</div>
</div>
<div class="custom-file w-75 m-auto">
<input id="open-file" type="file" class="custom-file-input" accept=".json" multiple>
<label id="open-file-label" class="custom-file-label text-center" for="customFile" >Choose files</label>
</div>
<input id="submit-file" type="submit" class="btn btn-success w-25 mx-auto my-3" disabled value="Start">
<div id="status-display" class="text-center my-1">
<div id="status-googlechart-load">
<div class="spinner-grow text-danger" role="status">
<span class="sr-only">Loading...</span>
</div>
<p>Google Charts service is loading. Please wait.</p>
</div>
<div id="status-analysing" hidden>
<div class="spinner-border" role="status">
<span class="sr-only">Loading...</span>
</div>
<p>Analysing</p>
</div>
<div id="status-complete" hidden>
<div class="mda-tick-height">
<div class="mda-tick" role="status"></div>
</div>
<p>Complete! Results below.</p>
</div>
</div>
</div>
</div>
<!-- Modal - Messenger Data Download Guide -->
<div class="modal fade" id="guide-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Downloading Your Facebook Messenger Data</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>Go to Facebook and click on the small down arrow in the top right, near the notification icon. Go into settings.</p>
<div class="text-center">
<img class="w-100 my-3 border border-primary" src="./img//facebook-download-guide/guide-image-1.png" alt="">
</div>
<p>On the left panel, go into "Your Facebook Information" and click "Download Your Information".</p>
<div class="text-center ">
<img class="w-100 my-3 border border-primary" src="./img//facebook-download-guide/guide-image-2.png" alt="">
</div>
<p>On this page, make sure you have date range as "All of my data" and the format as "JSON". If you download your data as HTML, the analysis will not work. For media quality, low is recommended to reduce file size.</p>
<p>For Messenger Analysis, you only need to select "Messages", but you can download everything if you wish (the file can get quite big if you download it all).</p>
<div class="text-center">
<img class="w-100 my-3 border border-primary" src="./img//facebook-download-guide/guide-image-3.png" alt="">
</div>
<p>Facebook will take a few minutes to process your information before you can download the file - you will get a notification when it is ready.</p>
<p>Once it has downloaded, extract the files. On Windows, right click and select "Extract All". On a Mac just double click the file and it will extract to the same folder it is in.</p>
<p>Now you are ready to start the analysis!</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal - Emoji Display -->
<div class="modal fade" id="emoji-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Emoji Display Help</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>If you are running on Windows 7, you might have trouble viewing emojis, and they might appear as a box rather than the emoji itself. This is because Windows 7 does not come with the Segoe UI Emoji font that Windows 10 comes with. It is a font created and trademarked by Microsoft and released with Windows devices. However, if you simply take that font from the Windows 10 "Fonts" folder, you can install it on Windows 7 and get the Emojis to display. However, they will only be displayed in black and white, not full colour.</p>
<a href="./files/seguiemj.ttf">Click here to download the Segeo UI Emoji font</a>
<p>If you do not wish to download the font, you can view your Emojis in a table that uses images of the emojis rather than an Emoji font. I would use the images in the table too, except the Google Charts API does not allow for images to be placed as the labels for charts, so it needs to be a font.</p>
<a id="emoji-table-replace" href="javascript:void(0);">Click here to show the table that uses images in place of the default table.</a>
<p>Emoji icons supplied by <a href="https://www.emojione.com/">EmojiOne</a></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal - Learn more -->
<div class="modal fade" id="learn-more-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Keep your data safe - no file upload!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>This web application runs completely on <a href="https://en.wikipedia.org/wiki/JavaScript">Javascript</a>, which runs in the Browser. Javascript is used to add things such as interactivity to websites, and pretty much every site now uses some form of Javascript.</p>
<p>When you load this web page, you download the Javascript files that will be able to analyse your file. Then, when you select a file to analyse, you don't actually upload it anywhere, you just tell your web browser where it is on your computer.</p>
<blockquote class="blockquote">
<p class="mb-0 mx-5">If you wanted, you could even turn off your internet connection before you select your file, and the application will still work!</p>
</blockquote>
<p>Then when you click start, the browser reads that file and uses the Javascript to analyse it. Your data stays safe on your own computer!</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div id="analysis-results" class="container mb-5" hidden>
<div class="mda-spacer"></div>
<!-- General Conversation information -->
<div class="text-center">
<h3 class="display-4 mb-2">Conversation Information</h3>
<div id="conversation-info">
</div>
</div>
<div class="mda-spacer"></div>
<!-- Words/Average Words Table -->
<table id="participant-words-info-table" class="table-sm table-striped table-bordered text-center" style="margin: auto!important;">
<thead class="bg-primary text-light">
<th class="px-2">Name</th>
<th class="px-2">Messages Sent</th>
<th class="px-2">Words Sent</th>
<th class="px-2">Average Words/Message</th>
</thead>
<tbody id="participant-words-info-body">
</tbody>
</table>
<br>
<!-- Message Types Table -->
<table id="message-types-info-table" class="table-sm table-striped table-bordered text-center" style="margin: auto!important;">
<thead class="bg-primary text-light">
<th class="px-2">Name</th>
<th class="px-2">Text Messages</th>
<th class="px-2">Photos</th>
<th class="px-2">Videos</th>
<th class="px-2">Stickers</th>
<th class="px-2">GIFs</th>
<th class="px-2">Files</th>
<th class="px-2">Shared Links</th>
<th class="px-2">Audio Files</th>
<th class="px-2">Plans</th>
</thead>
<tbody id="message-types-info-body">
</tbody>
</table>
<div class="mda-spacer"></div>
<!-- Start Charts -->
<div id="chart-container" class="">
<div class="d-flex flex-row">
<h4>Messages Sent</h4>
<h4 class="ml-50pc">Words Sent</h4>
</div>
<div class="d-flex flex-row">
<div id="chart-MessagesSentCount" class="mda-chart"></div>
<div id="chart-WordsSentCount" class="mda-chart ml-auto"></div>
</div>
</div>
<!-- End Charts -->
</div>
<footer class="container d-block mt-5">
Created by Eric M 2022 || <a href="https://github.com/EricEzaM/EricEzaM.github.io">GitHub Source</a> || <a href="mailto:eric@iameric.net">eric@iameric.net</a></a>
</footer>
</body>
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/google-palette@1.1.0/palette.js" integrity="sha256-5f158MWiiHKxtoGF9P+WFLMLh3bMthtMx58ayBvTF38=" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" src="emojione.min.js"></script>
<script type="text/javascript" src="emojiSplitter.min.js"></script>
<script type="text/javascript" src="main.js"></script>
</html>