-
Notifications
You must be signed in to change notification settings - Fork 21
/
charts2.html
459 lines (388 loc) · 17.7 KB
/
charts2.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
<!doctype html>
<html lang="en">
<head>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-8249107-7', 'auto');
ga('send', 'pageview');
</script>
<script>
var trackOutboundLink = function(url) {
ga('send', 'event', 'outbound', 'click', url, {
'transport': 'beacon',
'hitCallback': function(){window.open(url);}
});
}
</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>CSIndexbr: Exploring Brazilian Scientific Production in Computer Science</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="libs/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" src="libs/jquery.csv.js"></script>
<script type="text/javascript">
google.charts.load('45.2', {'packages':['corechart']});
google.charts.load('45.2', {'packages':['table']});
google.charts.setOnLoadCallback(drawChartConfs);
google.charts.setOnLoadCallback(drawChartJournals);
google.charts.setOnLoadCallback(drawChartDepts);
// google.charts.setOnLoadCallback(drawChartProfs);
google.charts.setOnLoadCallback(drawTableProfsList);
google.charts.setOnLoadCallback(drawTablePapersConf);
google.charts.setOnLoadCallback(drawTablePapersJournal);
google.charts.setOnLoadCallback(drawTableStats);
google.charts.setOnLoadCallback(drawTableStatsJournals);
corebr_area_prefix= sessionStorage.getItem('corebr_area_prefix');
ga('send', 'event', 'Research Area Click', corebr_area_prefix);
var corebr_confs_file = "data/" + corebr_area_prefix + "-out-confs.csv";
var corebr_journals_file = "data/" + corebr_area_prefix + "-out-journals.csv";
var corebr_depts_file = "data/" + corebr_area_prefix + "-out-scores.csv";
// var corebr_profs_file = "data/" + corebr_area_prefix + "-out-profs.csv";
var corebr_profs_list_file = "data/" + corebr_area_prefix + "-out-profs-list.csv";
var corebr_papers_file = "data/" + corebr_area_prefix + "-out-papers.csv";
var corebr_stats_file = "data/" + corebr_area_prefix + "-out-stats.csv";
var corebr_stats_journals_file = "data/" + corebr_area_prefix + "-out-stats-journals.csv";
function drawChartConfs() {
$.get(corebr_confs_file, function(csvString) {
var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});
var data= new google.visualization.DataTable();
data.addColumn('string', 'Conferences');
data.addColumn('number', 'Papers');
data.addRows(arrayData);
var view = new google.visualization.DataView(data);
view.setColumns([0, 1,
{ calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation" },
]);
var options = { 'width': 800,
'height': 500,
'fontSize': 12,
'legend': { position: "none" },
'chartArea': {left:40, top:40, right:30, width:'80%',height:'65%'},
'hAxis': { slantedText:true, slantedTextAngle:45 },
'vAxis': { gridlines: { counts: -1} },
'annotations': { alwaysOutside:true },
'titleTextStyle': { bold: false },
'title': 'Number of full papers by Brazilian professors in tracked conferences'
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart_confs'));
chart.draw(view, options);
});
}
function drawChartJournals() {
$.get(corebr_journals_file, function(csvString) {
var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});
var data= new google.visualization.DataTable();
data.addColumn('string', 'Journals');
data.addColumn('number', 'Papers');
data.addRows(arrayData);
var view = new google.visualization.DataView(data);
view.setColumns([0, 1,
{ calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation" },
]);
var options = { 'width': 800,
'height': 500,
'fontSize': 12,
'legend': { position: "none" },
'chartArea': {left:40, top:40, right:30, width:'80%',height:'65%'},
'hAxis': { slantedText:true, slantedTextAngle:45 },
'vAxis': { gridlines: { counts: -1} },
'annotations': { alwaysOutside:true },
'titleTextStyle': { bold: false },
'title': 'Number of papers by Brazilian professors in tracked journals'
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart_journals'));
chart.draw(view, options);
});
}
function drawChartDepts() {
$.get(corebr_depts_file, function(csvString) {
var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});
if (arrayData.length > 16) {
arrayData = arrayData.slice(0,16);
}
var data= new google.visualization.DataTable();
data.addColumn('string', 'Departments');
data.addColumn('number', 'Score');
data.addRows(arrayData);
var view = new google.visualization.DataView(data);
view.setColumns([0, 1,
{ calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation" },
]);
var options = { 'width': 800,
'height': 500,
'fontSize': 12,
'legend': { position: "none" },
'chartArea': {left:40, top:40, right:30, width:'80%',height:'65%'},
'hAxis': { slantedText:true, slantedTextAngle:45 },
'annotations': { alwaysOutside:true },
'titleTextStyle': { bold: false },
'title': "Score= A + (0.40 * B) + (0.33 * C), where A= papers in top-venues; B= papers in journals; C= papers in conferences or in \"other\" journals"
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart_depts'));
chart.draw(view, options);
});
}
function drawChartProfs() {
$.get(corebr_profs_file, function(csvString) {
var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});
var data= new google.visualization.DataTable();
data.addColumn('string', 'Departments');
data.addColumn('number', 'Profs');
data.addRows(arrayData);
var view = new google.visualization.DataView(data);
view.setColumns([0, 1,
{ calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation" },
]);
var options = { 'width': 800,
'height': 500,
'fontSize': 12,
'legend': { position: "none" },
'chartArea': {left:40, top:30, right:30, width:'80%',height:'65%'},
'hAxis': { slantedText:true, slantedTextAngle:45 },
'annotations': { alwaysOutside:true },
'titleTextStyle': { bold: false },
'title': 'Number of faculty members co-authoring full papers in tracked conferences'
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart_profs'));
chart.draw(view, options);
});
}
function drawTableProfsList() {
$.get(corebr_profs_list_file, function(csvString) {
var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});
for (var i = 0; i < arrayData.length; i++) {
prof = arrayData[i][0];
prof2 = prof.split(" ").join("-");
// url = '<small> <a href="https://csindexbr.org/authors.html?p=';
// url = url + prof2 + '" target="_blank">[papers]</a> </small>';
// arrayData[i][0] = prof + url;
url = '<a href="https://csindexbr.org/authors.html?p=';
url = url + prof2 + '" target="_blank">' + prof + '</a>';
arrayData[i][0] = url;
}
var data= new google.visualization.DataTable();
data.addColumn('string', 'Brazilian Professors (with papers in the area)'); // 0
data.addColumn('string', 'Department'); // 1
data.addRows(arrayData);
var table = new google.visualization.Table(document.getElementById('chart_profs2'));
table.draw(data, {allowHtml: true, showRowNumber: true, width: '100%', height: '100%'});
});
}
function drawTablePapers(type) {
$.get(corebr_papers_file, function(csvString) {
var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});
arrayData2 = [];
for (var i = 0; i < arrayData.length; i++) {
if (arrayData[i][7] == type) {
if (arrayData[i][8] == "no_arxiv") {
arrayData[i][8] = "";
} else {
arrayData[i][8] = "<a href=\"" + arrayData[i][8] + "\" target=\"_blank\" onclick=\"trackOutboundLink(this.href); return false;\">[arxiv]</a>";
}
arrayData2.push(arrayData[i]);
}
}
var data= new google.visualization.DataTable();
data.addColumn('number', 'Year'); // 0
data.addColumn('string', 'Venue'); // 1
data.addColumn('string', 'Title'); // 2
data.addColumn('string', 'Depts'); // 3
data.addColumn('string', 'Authors'); // 4
data.addColumn('string', 'DOI'); // 5
data.addColumn('string', 'top'); // 6
data.addColumn('string', ''); // 7 - type={C,J}
data.addColumn('string', ''); // 8 - type={no_arxiv,arxiv_url}
data.addColumn('number', 'Citations'); // 9 - citations
data.addRows(arrayData2);
if (type == "C") {
var table = new google.visualization.Table(document.getElementById('chart_papers_conf'));
} else {
var table = new google.visualization.Table(document.getElementById('chart_papers_journal'));
}
var formatter = new google.visualization.NumberFormat( {pattern: '####'} );
formatter.format(data, 0); // format year
var formatter = new google.visualization.PatternFormat(
'{0} <a href="{1}" onclick="trackOutboundLink(this.href); return false;">[doi]</a> {2}');
formatter.format(data, [2, 5, 8]);
var formatter2 = new google.visualization.PatternFormat('<img src="figs/{1}.gif">{0}');
formatter2.format(data, [2, 6]);
var view = new google.visualization.DataView(data);
// view.setColumns([0,1,2,3,4,9]);
view.setColumns([0,1,2,3,4]); // citações foram removidas (i=9)
var table2= view.toDataTable();
table2.sort({column: 1, desc: false});
table2.sort({column: 0, desc: true});
table.draw(table2, {allowHtml: true, showRowNumber: true, width: '100%', height: '550'});
});
}
function drawTablePapersConf() {
drawTablePapers("C");
}
function drawTablePapersJournal() {
drawTablePapers("J");
}
function drawTableStats() {
$.get(corebr_stats_file, function(csvString) {
var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});
var data= new google.visualization.DataTable();
data.addColumn('string', 'Conference'); // 0
data.addColumn('string', 'Sponsor'); // 1
data.addColumn('number', 'Submitted'); // 2
data.addColumn('number', 'Accepted <small>(2017)</small>'); // 3
data.addColumn('number', 'Rate'); // 4
data.addColumn('number', 'h5-index'); // 5
data.addColumn('string', 'Rank'); // 6
data.addColumn('number', 'Pages'); //7
data.addRows(arrayData);
var table = new google.visualization.Table(document.getElementById('chart_stats'));
var formatter1 = new google.visualization.ColorFormat();
formatter1.addRange(50, 90, 'black', 'LemonChiffon');
formatter1.addRange(0, 50, 'black', 'Khaki');
formatter1.format(data, 2); // Apply formatter to submitted papers
var formatter2 = new google.visualization.ColorFormat();
formatter2.addRange(31, 40, 'black', 'LemonChiffon');
formatter2.addRange(40, 100, 'black', 'Khaki');
formatter2.format(data, 4);
var formatter3 = new google.visualization.ColorFormat();
formatter3.addRange(15, 19, 'black', 'LemonChiffon');
formatter3.addRange(0, 15, 'black', 'Khaki');
formatter3.format(data, 5);
var formatter4 = new google.visualization.ColorFormat();
formatter4.addRange(0, 9, 'black', 'LemonChiffon');
formatter4.format(data, 7);
var view = new google.visualization.DataView(data);
view.setColumns([
0,1,2,3,4,5,
{ type: 'number',
label: 'Norm h5',
calc: function(dataTable, rowNum){
r = dataTable.getValue(rowNum, 5) / dataTable.getValue(rowNum, 3);
return Math.round(r * 100) / 100;
}
},6,7]);
var table2= view.toDataTable();
var formatter5 = new google.visualization.ColorFormat();
formatter5.addRange(0, 0.25, 'black', 'LemonChiffon');
formatter5.format(table2, 6);
table.draw(table2, {allowHtml: true, showRowNumber: true, width: '100%', height: '100%'});
});
}
function drawTableStatsJournals() {
$.get(corebr_stats_journals_file, function(csvString) {
var arrayData = $.csv.toArrays(csvString, {onParseValue: $.csv.hooks.castToScalar});
var data= new google.visualization.DataTable();
data.addColumn('string', 'Journal'); // 0
data.addColumn('string', 'Publisher'); // 1
data.addColumn('number', 'Published <small>(2017)</small>'); // 2
data.addColumn('number', 'h5-index'); // 3
data.addColumn('string', 'Rank'); // 4
data.addColumn('number', 'Pages'); // 5
data.addRows(arrayData);
var table = new google.visualization.Table(document.getElementById('chart_stats_journals'));
var view = new google.visualization.DataView(data);
view.setColumns([
0,1,2,3,
{ type: 'number',
label: 'Norm h5',
calc: function(dataTable, rowNum){
r = dataTable.getValue(rowNum, 3) / dataTable.getValue(rowNum, 2);
return Math.round(r * 100) / 100;
}
},4,5]);
var table2= view.toDataTable();
table2.sort({column: 0, desc: false});
var formatter1 = new google.visualization.ColorFormat();
formatter1.addRange(0.01, 0.2, 'black', 'Khaki');
formatter1.format(table2, 4);
var formatter2 = new google.visualization.ColorFormat();
formatter2.addRange(501, null, 'black', 'Khaki');
formatter2.format(table2, 2);
if (corebr_area_prefix != "theory") {
var formatter3 = new google.visualization.ColorFormat();
formatter3.addRange(0, 7, 'black', 'Khaki');
formatter3.format(table2, 6);
}
var formatter4 = new google.visualization.ColorFormat();
formatter4.addRange(20, 25, 'black', 'LemonChiffon');
formatter4.addRange(1, 20, 'black', 'Khaki');
formatter4.format(table2, 3);
table.draw(table2, {allowHtml: true, showRowNumber: true, width: '100%', height: '100%'});
});
}
</script>
</head>
<body>
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link small active" data-toggle="tab" href="#confs" role="tab">Conferences</a>
</li>
<li class="nav-item">
<a class="nav-link small" data-toggle="tab" href="#journals" role="tab">Journals</a>
</li>
<li class="nav-item">
<a class="nav-link small" data-toggle="tab" href="#depts" role="tab">Departments</a>
</li>
<li class="nav-item">
<a class="nav-link small" data-toggle="tab" href="#profs2" role="tab">Faculty</a>
</li>
<li class="nav-item">
<a class="nav-link small" data-toggle="tab" href="#papers" role="tab">Papers (C)</a>
</li>
<li class="nav-item">
<a class="nav-link small" data-toggle="tab" href="#papersjournal" role="tab">Papers (J)</a>
</li>
<li class="nav-item">
<a class="nav-link small" data-toggle="tab" href="#stats" role="tab">Stats (C)</a>
</li>
<li class="nav-item">
<a class="nav-link small" data-toggle="tab" href="#stats_journals" role="tab">Stats (J)</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="confs" role="tabpanel">
<div id="chart_confs"></div>
</div>
<div class="tab-pane" id="journals" role="tabpanel">
<div id="chart_journals"></div>
</div>
<div class="tab-pane" id="depts" role="tabpanel">
<div id="chart_depts"></div>
</div>
<div class="tab-pane" id="profs2" role="tabpanel">
<div id="chart_profs2"></div>
</div>
<div class="tab-pane" id="papers" role="tabpanel">
<div id="chart_papers_conf"></div>
</div>
<div class="tab-pane" id="papersjournal" role="tabpanel">
<div id="chart_papers_journal"></div>
</div>
<div class="tab-pane" id="stats" role="tabpanel">
<div id="chart_stats"></div>
</div>
<div class="tab-pane" id="stats_journals" role="tabpanel">
<div id="chart_stats_journals"></div>
</div>
</div>
<script src="libs/popper.min.js"> </script>
<script src="libs/bootstrap.min.js"> </script>
</body>
</html>