-
Notifications
You must be signed in to change notification settings - Fork 0
/
link4.html
559 lines (513 loc) · 20.2 KB
/
link4.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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>新闻地图|数量分析</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. We have chosen the skin-blue for this starter
page. However, you can choose any other skin. Make sure you
apply the skin class to the body tag so the changes take effect.
-->
<link rel="stylesheet" href="dist/css/skins/skin-blue.min.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="admin/year.js"></script>
</head>
<!--
BODY TAG OPTIONS:
=================
Apply one or more of the following classes to get the
desired effect
|---------------------------------------------------------|
| SKINS | skin-blue |
| | skin-black |
| | skin-purple |
| | skin-yellow |
| | skin-red |
| | skin-green |
|---------------------------------------------------------|
|LAYOUT OPTIONS | fixed |
| | layout-boxed |
| | layout-top-nav |
| | sidebar-collapse |
| | sidebar-mini |
|---------------------------------------------------------|
-->
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<!-- Main Header -->
<header class="main-header">
<!-- Logo -->
<a href="index2.html" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"> <b>A</b>
LT
</span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"> <b>News</b>
MAP
</span>
</a>
<!-- Header Navbar -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
</a>
<!-- Navbar Right Menu -->
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<!-- /.messages-menu -->
<!-- Control Sidebar Toggle Button -->
<li>
<a href="#" data-toggle="control-sidebar"> <i class="fa fa-gears"></i>
</a>
</li>
</ul>
</div>
</nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- search form (Optional) -->
<form action="#" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search...">
<span class="input-group-btn">
<button type="submit" name="search" id="search-btn" class="btn btn-flat"> <i class="fa fa-search"></i>
</button>
</span>
</div>
</form>
<!-- /.search form -->
<!-- Sidebar Menu -->
<ul class="sidebar-menu">
<li class="header">HEADER</li>
<!-- Optionally, you can add icons to the links -->
<li>
<a href="index.html">
<i class="fa fa-link"></i>
<span>首页</span>
</a>
</li>
<li>
<a href="link1.html">
<i class="fa fa-link"></i>
<span>数量分析</span>
</a>
</li>
<li>
<a href="link2.html">
<i class="fa fa-link"></i>
<span>事件分析</span>
</a>
</li>
<li>
<a href="link3.html">
<i class="fa fa-link"></i>
<span>影响力分析</span>
</a>
</li>
<li class="active">
<a href="link4.html">
<i class="fa fa-link"></i>
<span>全球分析</span>
</a>
</li>
<li class="treeview active">
<a href="#">
<i class="fa fa-calendar"></i>
<span>选择年份</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li id="tag2015" class="">
<a href="#" onclick="setYear('2015')">
<i class="fa fa-circle-o"></i>
2015
</a>
</li>
<li id="tag2014" >
<a href="#" onclick="setYear('2014')">
<i class="fa fa-circle-o"></i>
2014
</a>
</li>
<li id="tag2013" >
<a href="#" onclick="setYear('2013')">
<i class="fa fa-circle-o"></i>
2013
</a>
</li>
<li id="tag2012" >
<a href="#" onclick="setYear('2012')">
<i class="fa fa-circle-o"></i>
2012
</a>
</li>
<li id="tag2011" >
<a href="#" onclick="setYear('2011')">
<i class="fa fa-circle-o"></i>
2011
</a>
</li>
<li id="tag2010" >
<a href="#" onclick="setYear('2010')">
<i class="fa fa-circle-o"></i>
2010
</a>
</li>
<li id="tag2009" >
<a href="#" onclick="setYear('2009')">
<i class="fa fa-circle-o"></i>
2009
</a>
</li>
<li id="tag2008" >
<a href="#" onclick="setYear('2008')">
<i class="fa fa-circle-o"></i>
2008
</a>
</li>
<li id="tag2007" >
<a href="#" onclick="setYear('2007')">
<i class="fa fa-circle-o"></i>
2007
</a>
</li>
<li id="tag2006" >
<a href="#" onclick="setYear('2006')">
<i class="fa fa-circle-o"></i>
2006
</a>
</li>
<li id="tag2005" >
<a href="#" onclick="setYear('2005')">
<i class="fa fa-circle-o"></i>
2005
</a>
</li>
<li id="tag2004" >
<a href="#" onclick="setYear('2004')">
<i class="fa fa-circle-o"></i>
2004
</a>
</li>
<li id="tag2003" >
<a href="#" onclick="setYear('2003')">
<i class="fa fa-circle-o"></i>
2003
</a>
</li>
<li id="tag2002" >
<a href="#" onclick="setYear('2002')">
<i class="fa fa-circle-o"></i>
2002
</a>
</li>
<li id="tag2001" >
<a href="#" onclick="setYear('2001')">
<i class="fa fa-circle-o"></i>
2001
</a>
</li>
<li id="tag2000" >
<a href="#" onclick="setYear('2000')">
<i class="fa fa-circle-o"></i>
2000
</a>
</li>
</ul>
</li>
</ul>
<!-- /.sidebar-menu --> </section>
<!-- /.sidebar --> </aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
新闻地图
<small>全球分析</small>
</h1>
<ol class="breadcrumb">
<li>
<a href="#">
<i class="fa fa-dashboard"></i>
Level
</a>
</li>
<li class="active">Here</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<!-- main row -->
<div class="col-md-8">
<!-- Custom Tabs -->
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active">
<a href="#tab_1" data-toggle="tab" id="worldmaptitle">2015年世界范围新闻事件统计</a>
</li>
<li>
<a href="#tab_2" data-toggle="tab"></a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab_1">
<div id="worldmap" style="min-width: 310px; max-width: 1600px; height: 400px; margin: 0 auto"></div>
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="tab_2">
</div>
<!-- /.tab-pane -->
<!-- /.tab-pane --> </div>
<!-- /.tab-content --> </div>
<!-- nav-tabs-custom -->
<!-- /.box --> </div>
<div class="col-md-4">
<div class="box box-widget">
<div class='box-header with-border'>
<div class='user-block'>
<img class='img-circle' src='dist/img/ccc.png' alt='user image'>
<span class='username'>
<a href="http://datalab.nju.edu.cn">Datalab@NJU</a>
</span>
<span class='description'>Shared publicly </span>
</div><!-- /.user-block -->
<div class='box-tools'>
<button class='btn btn-box-tool' data-toggle='tooltip' title='Mark as read'><i class='fa fa-circle-o'></i></button>
<button class='btn btn-box-tool' data-widget='collapse'><i class='fa fa-minus'></i></button>
<button class='btn btn-box-tool' data-widget='remove'><i class='fa fa-times'></i></button>
</div><!-- /.box-tools -->
</div><!-- /.box-header -->
<div class='box-body'>
<!-- post text -->
<p>gdelt数据库中包含由1979年至今的新闻数据</p>
<p>其中ActionGeo_CountryCode字段标识了事件的国家地理信息</p>
<p>对该字段数量的统计可以看出各国新闻事件的差异性。</p>
<br>
<!-- Social sharing buttons -->
</div><!-- /.box-body -->
</div><!-- /.box -->
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="box box-primary box-solid">
<div class="box-header with-border">
<h3 class="box-title">80年代至今全球新闻变化趋势</h3>
<!-- /.box-tools --> </div>
<!-- /.box-header -->
<div class="box-body">
<div id="mixchart" style="min-width: 310px; max-width: 1600px; height: 400px; margin: 0 auto"></div>
</div>
<!-- /.box-body --> </div>
<!-- /.box --> </div>
</div>
<!-- main row end--> </section>
<!-- Your Page Content Here -->
<!-- /.content --> </div>
<!-- /.content-wrapper -->
<!-- Main Footer -->
<footer class="main-footer">
<!-- To the right -->
<div class="pull-right hidden-xs">Anything you want</div>
<!-- Default to the left --> <strong>Copyright © 2016
<a href="http://computational-communication.com">计算传播网</a>
.</strong>
All rights reserved.
</footer>
<!-- jQuery 2.1.4 -->
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<script src="js/echarts.min.js"></script>
<script type="text/javascript">
function ReDraw(){
$.get("admin/yearchoose.php?type=get",function(data){
setTag(data);
setWorldMap(data);
});
}
</script>
<script type="text/javascript" id="init">
$(document).ready(function() {
$.get("admin/yearchoose.php?type=get",function(data){
setTag(data);
setWorldMap(data);
});
});
</script>
<script type="text/javascript">
// Step:3 echarts & zrender as a Global Interface by the echarts-plain.js.
// Step:3 echarts和zrender被echarts-plain.js写入为全局接口
var allChart = echarts.init(document.getElementById('mixchart'));
$.get('data/all_year_news.json', function (data) {
allChart.setOption(option = {
tooltip : {
trigger: 'axis'
},
toolbox: {
show : true,
feature : {
mark : {show: true},
dataView : {show: true, readOnly: false},
magicType: {show: true, type: ['line', 'bar']},
restore : {show: true},
saveAsImage : {show: true}
}
},
calculable : true,
legend: {
data:['中国新闻','世界新闻']
},
xAxis : [
{
type : 'category',
name : '年度',
data : ['1980','1981','1982','1983','1984','1985','1986','1987','1988','1989','1990','1991','1992','1993','1994','1995','1996','1997','1998','1999','2000','2001','2002', '2003','2004','2005','2006','2007','2008','2009','2010','2011','2012','2013','2014','2015']
}
],
yAxis : [
{
type : 'value',
name : '新闻数',
axisLabel : {
formatter: '{value} '
}
}
],
series : [
{
name:'中国',
type:'bar',
data:data.china.slice(0,36)
},
{
name:'世界',
type:'bar',
data:data.world.slice(1,37)
},
]
});
});
</script>
<script src="js/echarts-all.js"></script>
<script type="text/javascript">
function setWorldMap(year){
document.getElementById("worldmaptitle").innerHTML=year+"年世界范围新闻事件统计";
// Step:3 echarts & zrender as a Global Interface by the echarts-plain.js.
// Step:3 echarts和zrender被echarts-plain.js写入为全局接口
var myChart = echarts.init(document.getElementById('worldmap'));
$.get('data/world_news_'+year+'.json', function (data) {
myChart.setOption(
option = {
title : {
text: 'World News ('+year+')',
x:'center',
y:'top'
},
tooltip : {
trigger: 'item',
formatter : function (params) {
var value = (params.value + '').split('.');
value = value[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, '$1,')
+ '.' + value[1];
return params.seriesName + '<br/>' + params.name + ' : ' + value;
}
},
toolbox: {
show : false,
orient : 'vertical',
x: 'right',
y: 'center',
feature : {
mark : {show: true},
dataView : {show: true, readOnly: false},
restore : {show: true},
saveAsImage : {show: true}
}
},
dataRange: {
min: 0,
max: 3000000,
text:['High','Low'],
realtime: false,
calculable : true,
color: ['orangered','yellow','lightskyblue']
},
series : [
{
name: 'World News ('+year+')',
type: 'map',
mapType: 'world',
roam: true,
mapLocation: {
y : 60
},
itemStyle:{
emphasis:{label:{show:true}}
},
data:(function(){
var datalist = [];
var len = data["value"].length;
var geoCoord
while(len>=0) {
len--;
if(data["country"][len]!=null){
datalist.push({
name : data["country"][len],
value : data["value"][len]
})
}
}
return datalist;
})()
}
]
}
);
});
}
</script>
<!-- Control Sidebar -->
<!-- /.control-sidebar -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->
<!-- REQUIRED JS SCRIPTS -->
<!-- jQuery 2.1.4 -->
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/app.min.js"></script>
<!-- Optionally, you can add Slimscroll and FastClick plugins.
Both of these plugins are recommended to enhance the
user experience. Slimscroll is required when using the
fixed layout. -->
</body>
</html>