-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
302 lines (241 loc) · 8.21 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
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body { font: 12px Arial;}
.line {
fill: none;
/*stroke: steelblue;*/
stroke-width: 2px;
}
.axisSteelBlue text{
fill: steelblue;
}
.axisRed text{
fill: black;
}
.clear{
clear:both;
}
#sentiment {
height: 360px;
margin: 0 auto; /* NEW */
position: relative;
width: 360px;
}
.tooltip {
background: #eee;
box-shadow: 0 0 5px #999999;
color: #333;
display: none;
font-size: 12px;
left: 140px;
padding: 10px;
position: relative;
text-align: center;
top: 95px;
width: 80px;
z-index: 10;
height: 60px;
}
.legend {
font-size: 12px;
}
rect {
cursor: pointer; /* NEW */
stroke-width: 2;
}
rect.disabled { /* NEW */
fill: transparent !important; /* NEW */
} /* NEW */
div.tooltip {
position: absolute;
text-align: center;
width: 100px;
height: 50px;
padding: 2px;
font: 12px sans-serif;
background: lightsteelblue;
border: 0px;
border-radius: 8px;
pointer-events: none;
}
table { width:100%; } /* fit to contents */
th,td{
padding: 15px;
text-align: center;
border-bottom: 1px solid #ddd;
}
tr,th{
text-align: center;
}
tr:hover{background-color: #f5f5f5 }
header {
background-image: url('img/banner.jpg');
background-repeat: no-repeat;
background-attachment: scroll;
background-position: center center;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
text-align: center;
color: white;
height:450px;
}
header .intro-text {
padding-top: 100px;
padding-bottom: 50px;
}
header .intro-text .intro-lead-in {
font-family: "Droid Serif", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-style: italic;
font-size: 22px;
line-height: 22px;
margin-bottom: 25px;
}
header .intro-text .intro-heading {
font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
text-transform: uppercase;
font-weight: 700;
font-size: 50px;
line-height: 50px;
margin-bottom: 25px;
}
</style>
<!--<script src="//d3js.org/d3.v3.min.js"></script>-->
<script src="https://d3js.org/d3.v4.min.js" ></script>
<script src="//d3js.org/queue.v1.min.js"></script>
<script src="//d3js.org/topojson.v1.min.js"></script>
<script src="https://d3js.org/d3-dispatch.v1.min.js"></script>
<!--<link rel='stylesheet' href='nprogress.css'/>-->
<!--<script src='C:\Users\Ding\Desktop\547\VIS\de-cloud.js'></script>-->
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Raleway:400,300,600,800,900" rel="stylesheet" type="text/css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<header>
<div class="container">
<div class="intro-text">
<div class="intro-lead-in">INFX 547</div>
<h1>Twitter Sentiment</h1>
<h1>&</h1>
<h1>Guardians of the Galaxy Vol2</h1>
</div>
</div>
</header>
<div style="padding: 20px 10px 10px 30px">
<div data-role="header" data-position="fixed">
<p> <b> <h5> <center> Twitter Sentiment Analysis of Movie Review </center> </h5> </b> </p>
<p> <center><a href = "https://twitter.com/Guardians"> #Gurdians of Galaxy Vol 2 </a> </center></p>
</div>
<div id='title'>
<p> <b> <h4> <u><center> Performance Timeline </center> </u> </h4> </b> </p>
</div>
<!--<div class = "row">
<div id="line1">
<script src="line.js"></script>
</div>
</div>-->
<!--<div class = "row">
<div id = 'secondline'>
<script src="line2.js"></script>
</div>-->
<div class="clear"></div>
<div class = "row">
<div id="line1">
<script src="line.js"></script>
</div>
</div>
<div class = "row">
<div id = 'secondline'>
<script src="line2.js"></script>
</div>
<div class="row">
<div id="filter">
<select id="select">
<option value="total"><center>Please choose a date</center></option>
<option value="total">All</option>
<option value="5">2017-05-05</option>
<option value="6">2017-05-06</option>
<option value="7">2017-05-07</option>
<option value="8">2017-05-08</option>
<option value="9">2017-05-09</option>
<option value="10">2017-05-10</option>
<option value="11">2017-05-11</option>
<option value="12">2017-05-12</option>
<option value="13">2017-05-13</option>
<option value="14">2017-05-14</option>
<option value="15">2017-05-15</option>
<option value="16">2017-05-16</option>
<option value="17">2017-05-17</option>
<option value="18">2017-05-18</option>
<option value="19">2017-05-19</option>
<option value="20">2017-05-20</option>
<option value="21">2017-05-21</option>
<option value="22">2017-05-22</option>
<option value="23">2017-05-23</option>
<option value="24">2017-05-24</option>
<option value="25">2017-05-25</option>
</select>
</div>
<div class = "col-md-6">
<p> <b> <h4> <u> Key Word Cloud </u></h4> </b> </p>
<div id="cloud">
<!--<script src='d3-cloud.js'></script>
<script src='index.js'></script>-->
<script src="https://d3js.org/d3-dispatch.v1.min.js"></script>
<script src="cloud.js"></script>
</div>
</div>
<div class = "col-md-6">
<p> <b> <h4> <u> Sentiment Analysis </u> </h4> </b> </p>
<div id="sentiment">
<script src="donut.js"></script>
</div>
</div>
</div>
<div class="row">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css">-->
<!-- font-awesome for icons -->
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">-->
<script src="data/sentiments_nrc.js"></script>
<script src="data/uw_ischool_sample.js"></script>
<script src="tweeter_sentiment.js"></script>
<h1> <center> Tweeter Sentiment Details</center></h1>
<table >
<thead>
<tr>
<th><center> Emotion </center></th>
<th><center> % of Total Words </center></th>
<th><center> Example Words </center></th>
<th><center> Hashtags </center></th>
</tr>
</thead>
<tbody id="emotionsTable">
<!--Table content will go here-->
</tbody>
</table>
</div>
</div>
<script>
function start(){
draw1();
draw2();
}
window.onload = start();
document.getElementById("select").onchange = function(){
var date = this.value;
// draw_donut(date);
draw_cloud(date);
// draw_donut(date);
}
</script>
</html>