Skip to content

Latest commit

 

History

History
179 lines (149 loc) · 7.05 KB

index.md

File metadata and controls

179 lines (149 loc) · 7.05 KB
layout title
home
REU2018 - Team 2
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.3.1/semantic.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.3.1/components/search.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.3.1/components/dropdown.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/vega@3"></script> <script src="https://cdn.jsdelivr.net/npm/vega-lite@2"></script> <script src="https://cdn.jsdelivr.net/npm/vega-embed@3"></script>

REU2018 - Team 2

Complex interactions between academic institutions


Year:


A. General Literature
B. Hardware
C. Computer Systems Organization
D. Software
E. Data
F. Theory of Computation
G. Mathematics of Computing
H. Information Systems
I. Computing Methodologies
J. Computer Applications
K. Computing Milieux
<script type="text/javascript"> var opts = {"renderer": "svg", "actions": {"export": false,"source": false,"editor": false } } var defaultSchool = 'Carnegie Mellon University'; var jStatic = $.getJSON({"url":"/affil_radial_static.json"}); jYear = $.getJSON({"url":"/affil_radial_year.json"}); jAffil = $.getJSON({"url":"/data/unique_STDName_icu.json"}); //create defered objets dfjAffil = $.when(jAffil); dfjYear = $.when(jYear); defjStatic = $.when(jStatic); // All the other plots rely on the affiliation JSON dfjAffil.done(function() { var select = '' $.each(JSON.parse(jAffil.responseText), function(key,entry) { select += ''+entry.AuthorAffiliation+'' }); select += ''; $('#select-span').append(select); // Make the slide year functionality $('#selectedYear').text($('#yearRange').val()); // show div $('#div-year').show(); //creates the search $('#search-select').dropdown({ 'maxSelections': 3, }); // sets the default school $('#search-select').dropdown('set selected',defaultSchool); $('#search-select').dropdown('set value',defaultSchool); $('#search-select').dropdown('setting','onAdd',function(addedValue, addedText){ if(jplt1.signals[3].value == ""){ jplt1.signals[3].value = addedText; } else if(jplt1.signals[4].value == ""){ jplt1.signals[4].value = addedText; } else { jplt1.signals[5].value = addedText; } updatePlot(jplt1,'#id-afill',opts); }); $('#search-select').dropdown('setting','onRemove',function(removedValue, removedText){ if (jplt1.signals[3].value == removedValue){ jplt1.signals[3].value = ""; } else if (jplt1.signals[4].value == removedValue){ jplt1.signals[4].value = ""; } else { jplt1.signals[5].value = ""; } updatePlot(jplt1,'#id-afill',opts); }); // console.log($('#search-select').dropdown('get value')); }); // Start year plot when select is ready dfjYear.done(function() { // get the initial year defined as 1995 jplt2 = JSON.parse(jYear.responseText); jplt2.signals[2].value = $('#yearRange').val(); updatePlot(jplt2,'#id-year',opts); }); // finnally run when radial is ready defjStatic.done(function() { // get JSON jplt1 = JSON.parse(jStatic.responseText); // update year to correct value jplt1.signals[2].value = $('#yearRange').val(); // update school to correct value jplt1.signals[3].value = defaultSchool; //updates the plot updatePlot(jplt1,'#id-afill',opts); $('#titleACMclass').show(); $('#acm-classes').removeClass(); $('#titleACMclass').removeClass(); }); // on year slide change $('#yearRange').on('input propertychange', function (){ $('#selectedYear').text( $('#yearRange').val()), // when the year changes, redraw the entire plot // jplt1 = JSON.parse(jStatic.responseText); // jplt2 = JSON.parse(jYear.responseText); //spec_plt1.signals[3].value = $('#yearRange').val(); jplt2.signals[2].value = $('#yearRange').val(); jplt1.signals[2].value = $('#yearRange').val(); //update plots on change //updatePlot(spec_plt1,'#id-afill',opts); updatePlot(jplt2,'#id-year',opts); updatePlot(jplt1,'#id-afill',opts); }); // $.getJSON({"url":"/affil_radial_year.json"}).done(function(result) { // spec_plt2 = JSON.parse(result.responseText); // console.log(spec_plt2); // }); function updatePlot(json,divId,opts){ vegaEmbed(divId, json, opts).then(function(result) {}).catch(console.error); } </script>