forked from emeryberger/CSrankings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
csrankings.min.js
72 lines (72 loc) · 29 KB
/
csrankings.min.js
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
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,d){a!=Array.prototype&&a!=Object.prototype&&(a[b]=d.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";
$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var a=0;return function(b){return $jscomp.SYMBOL_PREFIX+(b||"")+a++}}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(a){var b=0;return $jscomp.iteratorPrototype(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})};
$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};$jscomp.makeIterator=function(a){$jscomp.initSymbolIterator();var b=a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};
$jscomp.iteratorFromArray=function(a,b){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var d=0,c={next:function(){if(d<a.length){var f=d++;return{value:b(f,a[f]),done:!1}}c.next=function(){return{done:!0,value:void 0}};return c.next()}};c[Symbol.iterator]=function(){return c};return c};
$jscomp.polyfill=function(a,b,d,c){if(b){d=$jscomp.global;a=a.split(".");for(c=0;c<a.length-1;c++){var f=a[c];f in d||(d[f]={});d=d[f]}a=a[a.length-1];c=d[a];b=b(c);b!=c&&null!=b&&$jscomp.defineProperty(d,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a){return a})}},"es6","es3");
$jscomp.findInternal=function(a,b,d){a instanceof String&&(a=String(a));for(var c=a.length,f=0;f<c;f++){var e=a[f];if(b.call(d,e,f,a))return{i:f,v:e}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,d){return $jscomp.findInternal(this,a,d).v}},"es6","es3");
var CSRankings=function(){var a=this;this.authorFile="/csrankings.csv";this.authorinfoFile="/generated-author-info.csv";this.countryinfoFile="/country-info.csv";this.aliasFile="/dblp-aliases.csv";this.turingFile="./turing.csv";this.homepageImage="/house-logo.png";this.allowRankingChange=!1;this.areaMap=[{area:"ai",title:"AI"},{area:"aaai",title:"AI"},{area:"ijcai",title:"AI"},{area:"vision",title:"Vision"},{area:"cvpr",title:"Vision"},{area:"eccv",title:"Vision"},{area:"iccv",title:"Vision"},{area:"mlmining",
title:"ML"},{area:"icml",title:"ML"},{area:"kdd",title:"ML"},{area:"nips",title:"ML"},{area:"nlp",title:"NLP"},{area:"acl",title:"NLP"},{area:"emnlp",title:"NLP"},{area:"naacl",title:"NLP"},{area:"ir",title:"Web+IR"},{area:"sigir",title:"Web+IR"},{area:"www",title:"Web+IR"},{area:"arch",title:"Arch"},{area:"asplos",title:"Arch"},{area:"isca",title:"Arch"},{area:"micro",title:"Arch"},{area:"hpca",title:"Arch"},{area:"comm",title:"Networks"},{area:"sigcomm",title:"Networks"},{area:"nsdi",title:"Networks"},
{area:"sec",title:"Security"},{area:"ccs",title:"Security"},{area:"oakland",title:"Security"},{area:"usenixsec",title:"Security"},{area:"ndss",title:"Security"},{area:"pets",title:"Security"},{area:"mod",title:"DB"},{area:"sigmod",title:"DB"},{area:"vldb",title:"DB"},{area:"icde",title:"DB"},{area:"pods",title:"DB"},{area:"hpc",title:"HPC"},{area:"sc",title:"HPC"},{area:"hpdc",title:"HPC"},{area:"ics",title:"HPC"},{area:"mobile",title:"Mobile"},{area:"mobicom",title:"Mobile"},{area:"mobisys",title:"Mobile"},
{area:"sensys",title:"Mobile"},{area:"metrics",title:"Metrics"},{area:"imc",title:"Metrics"},{area:"sigmetrics",title:"Metrics"},{area:"ops",title:"OS"},{area:"sosp",title:"OS"},{area:"osdi",title:"OS"},{area:"fast",title:"OS"},{area:"usenixatc",title:"OS"},{area:"eurosys",title:"OS"},{area:"pldi",title:"PL"},{area:"popl",title:"PL"},{area:"icfp",title:"PL"},{area:"oopsla",title:"PL"},{area:"plan",title:"PL"},{area:"soft",title:"SE"},{area:"fse",title:"SE"},{area:"icse",title:"SE"},{area:"ase",title:"SE"},
{area:"issta",title:"SE"},{area:"act",title:"Theory"},{area:"focs",title:"Theory"},{area:"soda",title:"Theory"},{area:"stoc",title:"Theory"},{area:"crypt",title:"Crypto"},{area:"crypto",title:"Crypto"},{area:"eurocrypt",title:"Crypto"},{area:"log",title:"Logic"},{area:"cav",title:"Logic"},{area:"lics",title:"Logic"},{area:"graph",title:"Graphics"},{area:"siggraph",title:"Graphics"},{area:"siggraph-asia",title:"Graphics"},{area:"chi",title:"HCI"},{area:"chiconf",title:"HCI"},{area:"ubicomp",title:"HCI"},
{area:"uist",title:"HCI"},{area:"robotics",title:"Robotics"},{area:"icra",title:"Robotics"},{area:"iros",title:"Robotics"},{area:"rss",title:"Robotics"},{area:"bio",title:"Comp. Bio"},{area:"ismb",title:"Comp. Bio"},{area:"recomb",title:"Comp. Bio"},{area:"da",title:"EDA"},{area:"dac",title:"EDA"},{area:"iccad",title:"EDA"},{area:"bed",title:"Embedded"},{area:"emsoft",title:"Embedded"},{area:"rtas",title:"Embedded"},{area:"rtss",title:"Embedded"},{area:"visualization",title:"Visualization"},{area:"vis",
title:"Visualization"},{area:"vr",title:"Visualization"},{area:"ecom",title:"ECom"},{area:"ec",title:"ECom"},{area:"wine",title:"ECom"}];this.aiAreas=["ai","vision","mlmining","nlp","ir"];this.systemsAreas="arch comm sec mod hpc mobile metrics ops plan soft da bed".split(" ");this.theoryAreas=["act","crypt","log"];this.interdisciplinaryAreas="graph chi robotics bio visualization ecom".split(" ");this.areaNames=[];this.fields=[];this.aiFields=[];this.systemsFields=[];this.theoryFields=[];this.otherFields=
[];this.areaDict={};this.areaPosition={};this.scholarInfo={};this.aliases={};this.turing={};this.countryInfo={};this.homepages={};this.useDenseRankings=!1;this.authors=[];this.authorAreas={};this.stats={};this.areaDeptAdjustedCount={};this.color="#f30000 #0600f3 #00b109 #14e4b4 #0fe7fb #67f200 #ff7e00 #8fe4fa #ff5300 #640000 #3854d1 #d00ed8 #7890ff #01664d #04231b #e9f117 #f3228e #7ce8ca #ff5300 #ff5300 #7eff30 #9a8cf6 #79aff9 #bfbfbf #56b510 #00e2f6 #ff4141 #61ff41".split(" ");this.RightTriangle=
"►";this.DownTriangle="▼";this.PieChart="<img src='png/piechart.png'>";CSRankings.theInstance=this;this.navigoRouter=new Navigo(null,!0);for(var b=0;b<this.areaMap.length;b++){var d=this.areaMap[b],c=d.area;d=d.title;CSRankings.areas[b]=c;this.areaNames[b]=d;this.fields[b]=c;this.areaDict[c]=d;this.areaPosition[c]=b}c=$jscomp.makeIterator(this.aiAreas);for(b=c.next();!b.done;b=c.next())this.aiFields.push(this.areaPosition[b.value]);c=$jscomp.makeIterator(this.systemsAreas);for(b=c.next();!b.done;b=
c.next())this.systemsFields.push(this.areaPosition[b.value]);c=$jscomp.makeIterator(this.theoryAreas);for(b=c.next();!b.done;b=c.next())this.theoryFields.push(this.areaPosition[b.value]);c=$jscomp.makeIterator(this.interdisciplinaryAreas);for(b=c.next();!b.done;b=c.next())this.otherFields.push(this.areaPosition[b.value]);b=0;for(var f in CSRankings.parentMap)c=CSRankings.parentMap[f],c in CSRankings.childMap?CSRankings.childMap[c].push(f):(CSRankings.childMap[c]=[f],CSRankings.parentIndex[c]=b,b+=
1);this.displayProgress(1);this.loadAliases(this.aliases,function(){a.loadTuring(a.turing,function(){a.displayProgress(2);a.loadAuthorInfo(function(){a.displayProgress(3);a.loadAuthors(function(){a.setAllOn();a.navigoRouter.on({"/index":a.navigation,"/fromyear/:fromyear/toyear/:toyear/index":a.navigation}).resolve();a.displayProgress(4);a.loadCountryInfo(a.countryInfo,function(){setTimeout(function(){a.addListeners();CSRankings.geoCheck()},0)})})})})})};CSRankings.getInstance=function(){return CSRankings.theInstance};
CSRankings.promise=function(a){"undefined"!==typeof Promise?Promise.resolve().then(a):setTimeout(a,0)};
CSRankings.prototype.translateNameToDBLP=function(a){a=a.replace(/'|\-|\./g,"=");a=a.replace(/\u00c1/g,"=Aacute=");a=a.replace(/\u00e1/g,"=aacute=");a=a.replace(/\u00e8/g,"=egrave=");a=a.replace(/\u00e9/g,"=eacute=");a=a.replace(/\u00ef/g,"=iuml=");a=a.replace(/\u00f3/g,"=oacute=");a=a.replace(/\u00e7/g,"=ccedil=");a=a.replace(/\u00e4/g,"=auml=");a=a.replace(/\u00f6/g,"=ouml=");a=a.replace(/\u00f8/g,"=oslash=");a=a.replace(/\u00d6/g,"=Ouml=");a=a.replace(/\u00fc/g,"=uuml=");a=a.split(" ");var b=a[a.length-
1];0<parseInt(b)&&(a.pop(),b=a[a.length-1]+"_"+b);a.pop();a=a.join(" ");a=a.replace(/\s/g,"_");a=a.replace(/\-/g,"=");return"http://dblp.uni-trier.de/pers/hd"+("/"+b[0].toLowerCase()+"/"+b+":"+a)};CSRankings.prototype.makePrologue=function(){return'<div class="table-responsive" style="overflow:auto; height:700px;"><table class="table table-fit table-sm table-striped"id="ranking" valign="top">'};CSRankings.sum=function(a){for(var b=0,d=0;d<a.length;d++)b+=a[d];return b};
CSRankings.average=function(a){return CSRankings.sum(a)/a.length};CSRankings.stddev=function(a){var b=CSRankings.average(a),d=a.map(function(a){a-=b;return a*a});return Math.sqrt(CSRankings.sum(d)/(a.length-1))};
CSRankings.prototype.areaString=function(a){if(!this.authorAreas[a])return"";for(var b={},d=CSRankings.areas,c=0,f=0;f<d.length;f++){var e=d[f];if(!(e in CSRankings.nextTier)){var g=this.authorAreas[a][e];e in CSRankings.parentMap&&(e=this.areaDict[e]);0<g&&(e in b||(b[e]=0),b[e]+=g,c=b[e]>c?b[e]:c)}}a=[];for(var k in b)a.push(b[k]);k=CSRankings.sum(a);d=0;1<a.length&&(d=Math.ceil(1*CSRankings.stddev(a)));a=[];for(var l in b)b[l]>=c-d&&.2<=1*b[l]/k&&1<b[l]&&a.push(l);return a.sort(function(a,c){return b[c]-
b[a]}).slice(0,3).join(",")};CSRankings.prototype.compareNames=function(a,b){a=a.split(" ");b=b.split(" ");a=a[a.length-1];b=b[b.length-1];return a<b?-1:a>b?1:0};
CSRankings.prototype.makeChart=function(a){for(var b=[],d={},c=CSRankings.areas,f=unescape(a),e=0;e<c.length;e++){var g=c[e];if(!(f in this.authorAreas))return;if(!(g in CSRankings.nextTier)){var k=this.authorAreas[f][g];k=Math.round(10*k)/10;0<k&&(g in CSRankings.parentMap&&(g=CSRankings.parentMap[g]),g in d||(d[g]=0),d[g]+=k)}}for(var l in d)b.push({label:this.areaDict[l],value:Math.round(10*d[l])/10,color:this.color[CSRankings.parentIndex[l]]});new d3pie(a+"-chart",{header:{title:{text:f,fontSize:24,
font:"open sans"},subtitle:{text:"Publication Profile",color:"#999999",fontSize:14,font:"open sans"},titleSubtitlePadding:9},size:{canvasHeight:500,canvasWidth:500,pieInnerRadius:"38%",pieOuterRadius:"83%"},data:{content:b,smallSegmentGrouping:{enabled:!0,value:1}},labels:{outer:{pieDistance:32},inner:{format:"value",hideWhenLessThanPercentage:5},mainLabel:{fontSize:10.5},percentage:{color:"#ffffff",decimalPlaces:0},value:{color:"#ffffff",fontSize:10},lines:{enabled:!0},truncation:{enabled:!0}},effects:{load:{effect:"none"},
pullOutSegmentOnClick:{effect:"linear",speed:400,size:8}},misc:{gradient:{enabled:!0,percentage:100}}})};CSRankings.prototype.displayProgress=function(a){var b="",d=1;["Loading alias data.","Loading author information.","Loading publication data.","Computing ranking."].map(function(c){b=d==a?b+("<strong>"+c+"</strong>"):b+("<font color='gray'>"+c+"</font>");b+="<br />";d+=1});jQuery("#progress").html(b)};
CSRankings.prototype.loadAliases=function(a,b){Papa.parse(this.aliasFile,{header:!0,download:!0,complete:function(d){d=$jscomp.makeIterator(d.data);for(var c=d.next();!c.done;c=d.next())c=c.value,a[c.alias]=c.name;CSRankings.promise(b)}})};CSRankings.prototype.loadTuring=function(a,b){Papa.parse(this.turingFile,{header:!0,download:!0,complete:function(d){d=$jscomp.makeIterator(d.data);for(var c=d.next();!c.done;c=d.next())c=c.value,a[c.name]=c.year;CSRankings.promise(b)}})};
CSRankings.prototype.loadCountryInfo=function(a,b){Papa.parse(this.countryinfoFile,{header:!0,download:!0,complete:function(d){d=$jscomp.makeIterator(d.data);for(var c=d.next();!c.done;c=d.next())c=c.value,a[c.institution]=c.region;CSRankings.promise(b)}})};
CSRankings.prototype.loadAuthorInfo=function(a){var b=this;Papa.parse(this.authorFile,{download:!0,header:!0,complete:function(d){d=d.data;for(var c=0;c<d.length;c++){var f=d[c],e=f.name;b.homepages[e.trim()]=f.homepage;b.scholarInfo[e.trim()]=f.scholarid}CSRankings.promise(a)}})};CSRankings.prototype.loadAuthors=function(a){var b=this;Papa.parse(this.authorinfoFile,{download:!0,header:!0,complete:function(d){b.authors=d.data;CSRankings.promise(a)}})};
CSRankings.prototype.inRegion=function(a,b){switch(b){case "USA":if(a in this.countryInfo)return!1;break;case "europe":if(!(a in this.countryInfo)||"europe"!=this.countryInfo[a])return!1;break;case "canada":if(!(a in this.countryInfo)||"canada"!=this.countryInfo[a])return!1;break;case "northamerica":if(a in this.countryInfo&&"canada"!=this.countryInfo[a])return!1;break;case "australasia":if(!(a in this.countryInfo)||"australasia"!=this.countryInfo[a])return!1;break;case "southamerica":if(!(a in this.countryInfo)||
"southamerica"!=this.countryInfo[a])return!1;break;case "asia":if(!(a in this.countryInfo)||"asia"!=this.countryInfo[a])return!1}return!0};
CSRankings.prototype.activateFields=function(a,b){for(var d=0;d<b.length;d++){var c=this.fields[b[d]],f="input[name="+c+"]";jQuery(f).prop("checked",a);c in CSRankings.childMap&&(jQuery(f).prop("disabled",!1),CSRankings.childMap[c].forEach(function(b){b in CSRankings.nextTier?jQuery("input[name="+b+"]").prop("checked",!1):jQuery("input[name="+b+"]").prop("checked",a)}))}this.rank();return!1};
CSRankings.prototype.sortIndex=function(a){var b=Object.keys(a);b.sort(function(b,c){return a[b]>a[c]?-1:a[c]>a[b]?1:b<c?-1:c<b?1:0});return b};
CSRankings.prototype.countAuthorAreas=function(a,b){for(var d in this.authors)if(this.authors.hasOwnProperty(d)){var c=this.authors[d],f=c.year;if(!(f<a||f>b||(f=c.area,f in CSRankings.nextTier))){var e=c.dept,g=parseFloat(c.count);c=c.name;c in this.aliases&&(c=this.aliases[c]);if(!(c in this.authorAreas)){this.authorAreas[c]={};for(var k in this.areaDict)this.areaDict.hasOwnProperty(k)&&(this.authorAreas[c][k]=0)}if(!(e in this.authorAreas)){this.authorAreas[e]={};for(var l in this.areaDict)this.areaDict.hasOwnProperty(l)&&
(this.authorAreas[e][l]=0)}this.authorAreas[c][f]+=g;this.authorAreas[e][f]+=g}}};
CSRankings.prototype.buildDepartments=function(a,b,d,c,f,e,g,k){var l={},h;for(h in this.authors)if(this.authors.hasOwnProperty(h)){var m=this.authors[h],n=m.name,q=m.year,p=m.area;m=m.dept;n in this.aliases&&(n=this.aliases[n]);if("undefined"!==typeof m&&!(0===d[p]||q<a||q>b)&&this.inRegion(m,c)){p in CSRankings.parentMap&&(p=CSRankings.parentMap[p]);q=p+m;p=n+m;q in this.areaDeptAdjustedCount||(this.areaDeptAdjustedCount[q]=0);var t=parseInt(this.authors[h].count),r=parseFloat(this.authors[h].adjustedcount);
this.areaDeptAdjustedCount[q]+=r;n in l||(l[n]=!0,g[p]=0,k[p]=0,m in f||(f[m]=0,e[m]=[]),e[m].push(n),f[m]+=1);g[p]+=t;k[p]+=r}}};
CSRankings.prototype.computeStats=function(a,b,d){this.stats={};for(var c in a)if(a.hasOwnProperty(c)){this.stats[c]=1;for(var f=$jscomp.makeIterator(CSRankings.areas),e=f.next();!e.done;e=f.next())if(e=e.value,!(e in CSRankings.parentMap)){var g=e+c;g in this.areaDeptAdjustedCount||(this.areaDeptAdjustedCount[g]=0);0!=d[e]&&(this.stats[c]*=this.areaDeptAdjustedCount[g]+1)}this.stats[c]=Math.pow(this.stats[c],1/b)}};
CSRankings.prototype.updateWeights=function(a){for(var b=0,d=0;d<CSRankings.areas.length;d++){var c=CSRankings.areas[d];a[c]=jQuery("input[name="+this.fields[d]+"]").prop("checked")?1:0;1!==a[c]||c in CSRankings.parentMap||b++}return b};
CSRankings.prototype.canonicalizeNames=function(a,b,d){for(var c in a)if(a.hasOwnProperty(c))for(var f=0;f<a[c].length;f++){var e=a[c][f];e in this.aliases&&(a[c][f]=this.aliases[e],this.aliases[e]+c in b?(b[this.aliases[e]+c]+=b[e+c],d[this.aliases[e]+c]+=d[e+c]):(b[this.aliases[e]+c]=b[e+c],d[this.aliases[e]+c]=d[e+c]))}};
CSRankings.prototype.buildDropDown=function(a,b,d){var c=this,f={},e={},g;for(g in a)if(e.dept=g,a.hasOwnProperty(e.dept)){var k='<div class="table"><table class="table table-sm table-striped"><thead><th></th><td><small><em><abbr title="Click on an author\'s name to go to their home page.">Faculty</abbr></em></small></td><td align="right"><small><em> <abbr title="Total number of publications (click for DBLP entry)."># Pubs</abbr></em></small></td><td align="right"><small><em><abbr title="Count divided by number of co-authors">Adj. #</abbr></em></small></td></thead><tbody>';e.fc=
{};for(var l=$jscomp.makeIterator(a[e.dept]),h=l.next();!h.done;h=l.next())h=h.value,e.fc[h]=b[h+e.dept];l=Object.keys(e.fc);l.sort(function(a){return function(b,e){if(a.fc[e]===a.fc[b]){var f=Math.round(10*d[e+a.dept])/10,g=Math.round(10*d[b+a.dept])/10;return f===g?c.compareNames(b,e):f-g}return a.fc[e]-a.fc[b]}}(e));l=$jscomp.makeIterator(l);for(h=l.next();!h.done;h=l.next()){h=h.value;var m=encodeURI(this.homepages[h]),n=this.translateNameToDBLP(h);k+='<tr><td> </td><td><small><a title="Click for author\'s home page." target="_blank" href="'+
m+'" onclick="trackOutboundLink(\''+m+"', true); return false;\">"+h+"</a> ";this.turing.hasOwnProperty(h)&&(k+="<b>[Turing Award winner]</b> ");k+='<font style="font-variant:small-caps" size="-1">'+this.areaString(h).toLowerCase()+"</em></font> ";k+='<a title="Click for author\'s home page." target="_blank" href="'+m+'" onclick="trackOutboundLink(\''+m+'\', true); return false;"><img src="'+this.homepageImage+'"></a> ';this.scholarInfo.hasOwnProperty(h)&&"NOSCHOLARPAGE"!=this.scholarInfo[h]&&
(m="https://scholar.google.com/citations?user="+this.scholarInfo[h]+"&hl=en&oi=ao",k+='<a title="Click for author\'s Google Scholar page." target="_blank" href="'+m+'" onclick="trackOutboundLink(\''+m+'\', true); return false;"><img src="scholar-favicon.ico" height="10" width="10"></a> ');k+='<a title="Click for author\'s DBLP entry." target="_blank" href="'+n+'" onclick="trackOutboundLink(\''+n+'\', true); return false;"><img src="dblp.png"></a>';k+="<span onclick='csr.toggleChart(\""+escape(h)+
'");\' title="Click for author\'s publication profile." class="hovertip" ><font size="+1" color="blue">'+this.PieChart+'</font></span></small></td><td align="right"><small><a title="Click for author\'s DBLP entry." target="_blank" href="'+n+'" onclick="trackOutboundLink(\''+n+"', true); return false;\">"+e.fc[h]+'</a></small></td><td align="right"><small>'+(Math.round(10*d[h+e.dept])/10).toFixed(1)+'</small></td></tr><tr><td colspan="4"><div style="display:none;" id="'+escape(h)+'-chart"></div></td></tr>'}k+=
"</tbody></table></div>";f[e.dept]=k;e={fc:e.fc,dept:e.dept}}return f};
CSRankings.prototype.buildOutputString=function(a,b,d){var c=this.makePrologue();c+='<thead><tr><th align="left">Rank </th><th align="right">Institution </th><th align="right"><abbr title="Geometric mean count of papers published across all areas.">Count</abbr></th><th align="right"> <abbr title="Number of faculty who have published in these areas.">Faculty</abbr></th></th></tr></thead><tbody>';if(0<a){a=1;for(var f=0,e=9999999.999,g=this.sortIndex(this.stats),k=0;k<g.length;k++){var l=
g[k],h=Math.round(10*this.stats[l])/10;if(99999<=k&&h!=e)break;if(0===h)break;e!=h&&(this.useDenseRankings?f+=1:(f+=a,a=0));e=escape(l);c+="\n<tr><td>"+f+"</td>";c+='<td><span class="hovertip" onclick="csr.toggleFaculty(\''+e+'\')";" id="'+e+'-widget"><font color="blue">'+this.RightTriangle+"</font></span>";c+=" "+l+' <font color="blue"><span class="hovertip" onclick="csr.toggleChart(\''+e+'\')";" >'+this.PieChart+"</span></font>";c+="</td>";c+='<td align="right">'+(Math.round(10*h)/10).toFixed(1)+
"</td>";c+='<td align="right">'+b[l]+"<br />";c+="</td>";c+="</tr>\n";c+='<tr><td colspan="4"><div style="display:none;" style="width: 100%; height: 350px;" id="'+e+'-chart"></div></td></tr>';c+='<tr><td colspan="4"><div style="display:none;" id="'+e+'-faculty">'+d[l]+"</div></td></tr>";a++;e=h}c+="</tbody></table><br /></div></div>\n<br></body></html>"}else c="<h3>Please select at least one area by clicking one or more checkboxes.</h3>";return c};
CSRankings.prototype.setAllOn=function(a){a=void 0===a?!0:a;for(var b=0;b<CSRankings.areas.length;b++){var d=this.fields[b],c="input[name="+d+"]";a?d in CSRankings.nextTier?jQuery(c).prop("checked",!1):(jQuery(c).prop("checked",!0),jQuery(c).prop("disabled",!1)):(jQuery(c).prop("checked",!1),jQuery(c).prop("disabled",!1))}};
CSRankings.prototype.rank=function(a){a=void 0===a?!0:a;var b={},d={},c={},f={},e={};this.areaDeptAdjustedCount={};var g=parseInt(jQuery("#fromyear").find(":selected").text()),k=parseInt(jQuery("#toyear").find(":selected").text()),l=jQuery("#regions").find(":selected").val(),h=this.updateWeights(e);this.authorAreas={};this.countAuthorAreas(g,k);this.buildDepartments(g,k,e,l,d,b,c,f);this.computeStats(b,h,e);this.canonicalizeNames(b,c,f);b=this.buildDropDown(b,c,f);d=this.buildOutputString(h,d,b);
jQuery("#success").html(d);a?this.navigoRouter.resume():this.navigoRouter.pause();this.urlUpdate();return!1};CSRankings.prototype.toggleChart=function(a){var b=document.getElementById(a+"-chart");"block"===b.style.display?(b.style.display="none",b.innerHTML=""):(b.style.display="block",this.makeChart(a))};
CSRankings.prototype.toggleConferences=function(a){var b=document.getElementById(a+"-conferences");a=document.getElementById(a+"-widget");"block"===b.style.display?(b.style.display="none",a.innerHTML='<font color="blue">'+this.RightTriangle+"</font>"):(b.style.display="block",a.innerHTML='<font color="blue">'+this.DownTriangle+"</font>")};
CSRankings.prototype.toggleFaculty=function(a){var b=document.getElementById(a+"-faculty");a=document.getElementById(a+"-widget");"block"===b.style.display?(b.style.display="none",a.innerHTML='<font color="blue">'+this.RightTriangle+"</font>"):(b.style.display="block",a.innerHTML='<font color="blue">'+this.DownTriangle+"</font>")};CSRankings.prototype.activateAll=function(a){this.setAllOn(void 0===a?!0:a);this.rank();return!1};CSRankings.prototype.activateNone=function(){return this.activateAll(!1)};
CSRankings.prototype.activateSystems=function(a){return this.activateFields(void 0===a?!0:a,this.systemsFields)};CSRankings.prototype.activateAI=function(a){return this.activateFields(void 0===a?!0:a,this.aiFields)};CSRankings.prototype.activateTheory=function(a){return this.activateFields(void 0===a?!0:a,this.theoryFields)};CSRankings.prototype.activateOthers=function(a){return this.activateFields(void 0===a?!0:a,this.otherFields)};CSRankings.prototype.deactivateSystems=function(){return this.activateSystems(!1)};
CSRankings.prototype.deactivateAI=function(){return this.activateAI(!1)};CSRankings.prototype.deactivateTheory=function(){return this.activateTheory(!1)};CSRankings.prototype.deactivateOthers=function(){return this.activateOthers(!1)};
CSRankings.prototype.urlUpdate=function(){for(var a="",b=0,d=0,c={},f=0;f<this.fields.length;c={allChecked:c.allChecked},f++){var e="input[name="+this.fields[f]+"]";this.fields[f]in CSRankings.parentMap||(d+=1);!jQuery(e).prop("checked")||this.fields[f]in CSRankings.parentMap||(c.allChecked=1,this.fields[f]in CSRankings.childMap&&CSRankings.childMap[this.fields[f]].forEach(function(a){return function(b){var c=jQuery("input[name="+b+"]").prop("checked");a.allChecked=b in CSRankings.nextTier?a.allChecked&
(c?0:1):a.allChecked&c}}(c)),c.allChecked&&(a+=this.fields[f]+"&",b+=1))}0<b&&(a=a.slice(0,-1));c=jQuery("#regions").find(":selected").val();f="";e=(new Date).getFullYear();var g=parseInt(jQuery("#fromyear").find(":selected").text()),k=parseInt(jQuery("#toyear").find(":selected").text());if(g!=e-10||k!=e)f+="/fromyear/"+g.toString(),f+="/toyear/"+k.toString();f=b==d?f+"/index?all":0==b?f+"/index?none":f+("/index?"+a);"USA"!=c&&(f+="&"+c);this.navigoRouter.navigate(f)};
CSRankings.geoCheck=function(){jQuery.getJSON("http://freegeoip.net/json/",function(a){switch(a.country_code){case "US":case "CN":case "IN":case "KR":case "JP":case "TW":case "SG":jQuery("#regions").val("USA");CSRankings.getInstance().rank();break;default:jQuery("#regions").val("world"),CSRankings.getInstance().rank()}}).fail(function(){CSRankings.getInstance().rank()})};
CSRankings.prototype.navigation=function(a,b){null!==a&&Object.keys(a).forEach(function(b){jQuery("#"+b).prop("value",a[b].toString())});CSRankings.clearNonSubsetted();var d=b.split("&");b=d.some(function(a){return"all"==a});var c=d.some(function(a){return"none"==a});if(d.some(function(a){return 0<=CSRankings.regions.indexOf(a)})){var f=0;d.forEach(function(a){0<=CSRankings.regions.indexOf(a)&&d.splice(f,1);jQuery("#regions").val(a);f+=1})}if(b)for(b=0;b<CSRankings.areas.length;b++){if(c=CSRankings.areas[b],
!(c in CSRankings.nextTier)){var e="input[name="+c+"]";jQuery(e).prop("checked",!0);c in CSRankings.childMap&&(jQuery(e).prop("disabled",!1),CSRankings.childMap[c].forEach(function(a){a in CSRankings.nextTier||jQuery("input[name="+a+"]").prop("checked",!0)}))}}else if(c)CSRankings.clearNonSubsetted();else for(CSRankings.clearNonSubsetted(),b=$jscomp.makeIterator(d),c=b.next();!c.done;c=b.next())c=c.value,"none"!=c&&""!=c&&(e="input[name="+c+"]",jQuery(e).prop("checked",!0),jQuery(e).prop("disabled",
!1),c in CSRankings.childMap&&CSRankings.childMap[c].forEach(function(a){a in CSRankings.nextTier||jQuery("input[name="+a+"]").prop("checked",!0)}))};
CSRankings.clearNonSubsetted=function(){for(var a=$jscomp.makeIterator(CSRankings.areas),b=a.next();!b.done;b=a.next()){var d=b.value;d in CSRankings.childMap&&(b=CSRankings.childMap[d],CSRankings.subsetting(b)||(d="input[name="+d+"]",jQuery(d).prop("checked",!1),jQuery(d).prop("disabled",!1),b.forEach(function(a){jQuery("input[name="+a+"]").prop("checked",!1)})))}};
CSRankings.subsetting=function(a){var b=[],d=[];a.forEach(function(a){a in CSRankings.nextTier?d.push(a):b.push(a)});var c=0;b.forEach(function(a){jQuery("input[name="+a+"]").prop("checked")&&c++});var f=0;d.forEach(function(a){jQuery("input[name="+a+"]").prop("checked")&&f++});a=0<f&&0!=d.length;return 0<c&&c<b.length||a};
CSRankings.prototype.addListeners=function(){var a=this;["toyear","fromyear","regions"].forEach(function(b){document.getElementById(b).addEventListener("change",function(){a.rank()})});for(var b={},d=0;d<CSRankings.areas.length;b={area:b.area},d++)b.area=CSRankings.areas[d],b.area in CSRankings.parentMap||document.getElementById(b.area+"-widget").addEventListener("click",function(b){return function(){a.toggleConferences(b.area)}}(b));b={};for(d=0;d<this.fields.length;b={field:b.field,str:b.str},d++)b.str=
"input[name="+this.fields[d]+"]",b.field=this.fields[d],jQuery(b.str).click(function(b){return function(){var c=!0;if(b.field in CSRankings.parentMap){c=!1;var d=CSRankings.parentMap[b.field],e="input[name="+d+"]",f=0,m=1;CSRankings.childMap[d].forEach(function(a){var b=jQuery("input[name="+a+"]").prop("checked");f|=b;m=a in CSRankings.nextTier?m&(b?0:1):m&b});jQuery(e).prop("checked",f);f&&!m||jQuery(e).prop("disabled",!1);f&&!m&&jQuery(e).prop("disabled",!0)}else if(d=jQuery(b.str).prop("checked"),
b.field in CSRankings.childMap){e=$jscomp.makeIterator(CSRankings.childMap[b.field]);for(var n=e.next();!n.done;n=e.next()){n=n.value;var q="input[name="+n+"]";n in CSRankings.nextTier?jQuery(q).prop("checked",!1):jQuery(q).prop("checked",d)}}a.rank(c)}}(b));var c={all_areas_on:function(){a.activateAll()},all_areas_off:function(){a.activateNone()},ai_areas_on:function(){a.activateAI()},ai_areas_off:function(){a.deactivateAI()},systems_areas_on:function(){a.activateSystems()},systems_areas_off:function(){a.deactivateSystems()},
theory_areas_on:function(){a.activateTheory()},theory_areas_off:function(){a.deactivateTheory()},other_areas_on:function(){a.activateOthers()},other_areas_off:function(){a.deactivateOthers()}};b={};for(var f in c)b.item=f,document.getElementById(b.item).addEventListener("click",function(a){return function(){c[a.item]()}}(b)),b={item:b.item}};CSRankings.areas=[];CSRankings.regions="USA europe canada northamerica southamerica australasia asia world".split(" ");CSRankings.parentIndex={};
CSRankings.parentMap={aaai:"ai",ijcai:"ai",cvpr:"vision",eccv:"vision",iccv:"vision",icml:"mlmining",kdd:"mlmining",nips:"mlmining",acl:"nlp",emnlp:"nlp",naacl:"nlp",sigir:"ir",www:"ir",asplos:"arch",isca:"arch",micro:"arch",hpca:"arch",ccs:"sec",oakland:"sec",usenixsec:"sec",ndss:"sec",pets:"sec",vldb:"mod",sigmod:"mod",icde:"mod",pods:"mod",dac:"da",iccad:"da",emsoft:"bed",rtas:"bed",rtss:"bed",sc:"hpc",hpdc:"hpc",ics:"hpc",mobicom:"mobile",mobisys:"mobile",sensys:"mobile",imc:"metrics",sigmetrics:"metrics",
osdi:"ops",sosp:"ops",eurosys:"ops",fast:"ops",usenixatc:"ops",popl:"plan",pldi:"plan",oopsla:"plan",icfp:"plan",fse:"soft",icse:"soft",ase:"soft",issta:"soft",nsdi:"comm",sigcomm:"comm",siggraph:"graph","siggraph-asia":"graph",focs:"act",soda:"act",stoc:"act",crypto:"crypt",eurocrypt:"crypt",cav:"log",lics:"log",ismb:"bio",recomb:"bio",ec:"ecom",wine:"ecom",chiconf:"chi",ubicomp:"chi",uist:"chi",icra:"robotics",iros:"robotics",rss:"robotics",vis:"visualization",vr:"visualization"};
CSRankings.nextTier={ase:!0,issta:!0,icde:!0,pods:!0,hpca:!0,ndss:!0,pets:!0,eurosys:!0,fast:!0,usenixatc:!0,icfp:!0,oopsla:!0};CSRankings.childMap={};var csr=new CSRankings;