-
Notifications
You must be signed in to change notification settings - Fork 21
/
charts.html
338 lines (283 loc) · 13.1 KB
/
charts.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
<!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(drawChartDepts);
// google.charts.setOnLoadCallback(drawChartProfs);
google.charts.setOnLoadCallback(drawTableProfsList);
google.charts.setOnLoadCallback(drawTablePapers);
google.charts.setOnLoadCallback(drawTableStats);
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_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";
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 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 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 Indexed Papers'); // 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() {
$.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][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>";
// "<a href=\"" + arrayData[i][8] + "\" target=\"_blank\">[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', 'Type'); // 7
data.addColumn('string', 'arxiv'); // 8 - type={no_arxiv,arxiv_url}
data.addColumn('number', 'Citations'); // 9 - citations
data.addRows(arrayData2);
var table = new google.visualization.Table(document.getElementById('chart_papers'));
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 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'); // 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%'});
});
}
</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="#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</a>
</li>
<li class="nav-item">
<a class="nav-link small" data-toggle="tab" href="#stats" role="tab">Stats (2017)</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="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"></div>
</div>
<div class="tab-pane" id="stats" role="tabpanel">
<div id="chart_stats"></div>
</div>
</div>
<script src="libs/popper.min.js"> </script>
<script src="libs/bootstrap.min.js"> </script>
</body>
</html>