From d07238287e7d8d2b84c2184919be20f74e1400c3 Mon Sep 17 00:00:00 2001 From: kongchinhua Date: Thu, 26 May 2011 23:31:39 +0000 Subject: [PATCH] Integration between science map widget and data table widget --- .../mapofscience/ControlPanel.js | 97 ++++++++++++ .../mapofscience/CustomMarker.js | 24 +++ .../mapofscience/CustomScimaps.js | 4 + .../mapofscience/DataTableWidget.js | 67 ++++++--- .../js/visualization/mapofscience/GMapAPI.js | 6 +- .../mapofscience/InitializeMap.js | 46 ++---- .../mapofscience/MarkerManager.js | 39 +++++ .../js/visualization/mapofscience/Polygon.js | 30 +++- .../mapofscience/ScimapWidget.js | 139 ++++++++++++++++++ .../mapofscience/VisCommonControl.js | 36 ----- .../mapofscience/VisModeControllers.js | 135 ++++++++--------- .../mapOfScience/mapOfScienceSetup.ftl | 2 + 12 files changed, 459 insertions(+), 166 deletions(-) create mode 100644 productMods/js/visualization/mapofscience/ControlPanel.js create mode 100644 productMods/js/visualization/mapofscience/ScimapWidget.js diff --git a/productMods/js/visualization/mapofscience/ControlPanel.js b/productMods/js/visualization/mapofscience/ControlPanel.js new file mode 100644 index 00000000..31b690fe --- /dev/null +++ b/productMods/js/visualization/mapofscience/ControlPanel.js @@ -0,0 +1,97 @@ + +var ControlPanel = Class.extend({ + init: function(options) { + this.options = $.extend({}, this.options, options); + this.initDiv(); + }, + options: { + divClass: null, // use this to set absolute position and style + controlPositions: google.maps.ControlPosition.RIGHT_TOP, // Refer to API for alternative value + map: null, // map to be add to + jQueryDiv: null // add custom div + }, + initDiv: function() { + var opt = this.options; + if (opt.jQueryDiv == null) { + opt.jQueryDiv = $(document.createElement('div')); + } + + if (opt.divClass) { + opt.jQueryDiv.addClass(opt.divClass); + } + this.div = opt.jQueryDiv[0]; + opt.map.controls[opt.controlPositions].push(this.div); + }, + getDiv: function() { + /* Allow to edit everything start from div level by returning div jquery object */ + return this.options.jQueryDiv; + }, + hide: function() { + var div = this.div; + if (div) { + div.style.display = "none"; + } + }, + show: function() { + var div = this.div; + if (div) { + div.style.display = "block"; + } + } +}); + +var SliderControlPanel = ControlPanel.extend({ + init: function(options) { + this._super(options); + this.initSlider(); + }, + initSlider: function() { + var me = this; + var label = $("
").width(20).css("font-size", "60%").css("float", "right").text("0"); + var slider = $("
").width(150).css("font-size","60%"); + slider.slider({ + slide: function(event, ui) { + me._setLabel(ui.value); + } + }); + + this.sliderDiv = slider; + this.labelDiv = label; + + var div = me.getDiv(); + div.css("margin-right", "10px"); + div.append(slider); + div.append(label); + }, + getValue: function () { + return this.sliderDiv.slider( "option", "value" ); + }, + setMin: function(min) { + this.sliderDiv.slider({ + min: min + }); + }, + setMax: function(max) { + this.sliderDiv.slider({ + max: max + }); + }, + setValue: function(value) { + this.sliderDiv.slider({ + value: value + }); + this._setLabel(value); + }, + _setLabel: function(value) { + if (value < 1) { + this.labelDiv.text("0"); + } else { + this.labelDiv.text(value); + } + }, + setChangeEventHandler: function(handlerFunc) { + this.sliderDiv.slider({ + change: handlerFunc + }); + } +}); diff --git a/productMods/js/visualization/mapofscience/CustomMarker.js b/productMods/js/visualization/mapofscience/CustomMarker.js index 7ef978fa..fa411e6e 100644 --- a/productMods/js/visualization/mapofscience/CustomMarker.js +++ b/productMods/js/visualization/mapofscience/CustomMarker.js @@ -13,6 +13,30 @@ var ScinodePolygon = Polygon.extend({ setSize: function(size) { this.polygon.setRadius(size); this.setZIndex(-size); + }, + focus: function() { + this.setOptions({strokeWeight: 2.0}); + }, + unfocus: function() { + this.setOptions({strokeWeight: 1.0}); + }, + registerEvents : function() { + var me = this; + var polygon = me.polygon; + this.registerEvent(addClickListener(polygon, function() { + INFO_WINDOW.setPosition(this.center); + var content = '
' + this.label +'
' + this.value + ' publications
'; + INFO_WINDOW.setContent(content); + INFO_WINDOW.open(this.map); + })); + + this.registerEvent(addMouseOverListener(polygon, function() { + me.focus(); + })); + + this.registerEvent(addMouseOutListener(polygon, function() { + me.unfocus(); + })); } }); diff --git a/productMods/js/visualization/mapofscience/CustomScimaps.js b/productMods/js/visualization/mapofscience/CustomScimaps.js index f73f63fa..88e0fef7 100644 --- a/productMods/js/visualization/mapofscience/CustomScimaps.js +++ b/productMods/js/visualization/mapofscience/CustomScimaps.js @@ -1,6 +1,10 @@ /* $This file is distributed under the terms of the license in /doc/license.txt$ */ var DISCIPLINES = {"11": {"color": "#61FFE0", "longitude": -74.53125, "label": "Chemical, Mechanical, & Civil Engineering", "latitude": 57.80419}, "10": {"color": "#A61815", "longitude": -52.734375, "label": "Earth Sciences", "latitude": -19.797}, "13": {"color": "#FF82FF", "longitude": -144.140625, "label": "Electrical Engineering & Computer Science", "latitude": 75.89095}, "12": {"color": "#A518FB", "longitude": -129.375, "label": "Math & Physics", "latitude": 81.8504}, "1": {"color": "#FFB52A", "longitude": 76.641, "label": "Health Professionals", "latitude": 83.2171}, "3": {"color": "#FFFF00", "longitude": 164.53125, "label": "Social Sciences", "latitude": 61.69543}, "2": {"color": "#1800FF", "longitude": -45.7031, "label": "Chemistry", "latitude": 81.64863}, "5": {"color": "#FF0000", "longitude": 99.84375, "label": "Brain Research", "latitude": 68.7247}, "4": {"color": "#FFFF80", "longitude": 163.125, "label": "Humanities", "latitude": -14.42333}, "7": {"color": "#B8140B", "longitude": 47.109375, "label": "Infectious Diseases", "latitude": 55.8819}, "6": {"color": "#FF7D47", "longitude": 44.296875, "label": "Medical Specialties", "latitude": 71.36081}, "9": {"color": "#349803", "longitude": -19.6875, "label": "Biology", "latitude": 1.593542}, "8": {"color": "#00FF80", "longitude": 0.0, "label": "Biotechnology", "latitude": 48.58235}}; var SUBDISCIPLINES = {"344": {"latitude": 75.320025, "discipline": "11", "longitude": -92.109375, "label": "Printing"}, "345": {"latitude": 12.554564, "discipline": "9", "longitude": -16.875, "label": "Genetics"}, "346": {"latitude": 74.402163, "discipline": "11", "longitude": -94.21875, "label": "Industrial Chemistry"}, "347": {"latitude": 77.617709, "discipline": "6", "longitude": 56.25, "label": "Obesity"}, "340": {"latitude": 11.178402, "discipline": "9", "longitude": 8.4375, "label": "Parasitology"}, "341": {"latitude": 54.162434, "discipline": "6", "longitude": -1.40625, "label": "Dairy Science"}, "342": {"latitude": 42.55308, "discipline": "11", "longitude": -65.390625, "label": "Water Policy"}, "343": {"latitude": -7.013668, "discipline": "11", "longitude": -38.671875, "label": "Fish Research"}, "348": {"latitude": -21.943046, "discipline": "4", "longitude": 165.234375, "label": "Literary Criticism"}, "349": {"latitude": 31.952162, "discipline": "6", "longitude": 40.78125, "label": "Hepatology"}, "298": {"latitude": 84.865782, "discipline": "1", "longitude": 89.296875, "label": "AIDS Treatment"}, "299": {"latitude": 77.31252, "discipline": "13", "longitude": -140.625, "label": "Wireless Communication"}, "296": {"latitude": 67.609221, "discipline": "11", "longitude": -99.84375, "label": "Vehicle System Design"}, "297": {"latitude": 59.888937, "discipline": "7", "longitude": 35.859375, "label": "Transfusion"}, "294": {"latitude": 27.683528, "discipline": "9", "longitude": -21.09375, "label": "Crop Science"}, "295": {"latitude": 74.775843, "discipline": "13", "longitude": -148.359375, "label": "Fuzzy Sets"}, "292": {"latitude": 79.560546, "discipline": "6", "longitude": 74.53125, "label": "Hospice Care"}, "293": {"latitude": -2.811371, "discipline": "11", "longitude": -54.140625, "label": "Climatology"}, "290": {"latitude": 58.447733, "discipline": "3", "longitude": 157.5, "label": "Science Education"}, "291": {"latitude": 74.775843, "discipline": "12", "longitude": -156.09375, "label": "Design & Analysis of Algorithms"}, "199": {"latitude": 82.214217, "discipline": "2", "longitude": -68.203125, "label": "Catalysis"}, "198": {"latitude": 49.382373, "discipline": "3", "longitude": 168.046875, "label": "Political Geography"}, "195": {"latitude": 81.723188, "discipline": "2", "longitude": -23.203125, "label": "Atomic Spectrometry"}, "194": {"latitude": 80.647035, "discipline": "1", "longitude": 62.578125, "label": "Dental Research"}, "197": {"latitude": 84.865782, "discipline": "1", "longitude": 63.984375, "label": "Public Health Service"}, "196": {"latitude": 16.636192, "discipline": "9", "longitude": -22.5, "label": "Botany"}, "191": {"latitude": 80.872827, "discipline": "1", "longitude": 63.984375, "label": "Prosthetic Dentistry"}, "190": {"latitude": 57.704147, "discipline": "6", "longitude": 33.046875, "label": "Clinical Infectious Disease"}, "193": {"latitude": 74.959392, "discipline": "13", "longitude": -139.921875, "label": "Robotic Systems"}, "192": {"latitude": 79.812302, "discipline": "1", "longitude": 60.46875, "label": "Orthodontics"}, "270": {"latitude": 53.330873, "discipline": "3", "longitude": -179.296875, "label": "Agricultural Economics"}, "271": {"latitude": 65.366837, "discipline": "3", "longitude": 143.4375, "label": "Social Work"}, "272": {"latitude": 83.753911, "discipline": "1", "longitude": 80.15625, "label": "Medical Insurance"}, "273": {"latitude": 81.823794, "discipline": "11", "longitude": -76.640625, "label": "Fluid Phase Equilibrium"}, "274": {"latitude": 52.05249, "discipline": "8", "longitude": 7.734375, "label": "Biotechnology Trends"}, "275": {"latitude": -15.961329, "discipline": "11", "longitude": -58.359375, "label": "Air Quality"}, "276": {"latitude": 68.911005, "discipline": "13", "longitude": -168.046875, "label": "Search Engines; Web Crawling"}, "277": {"latitude": 82.214217, "discipline": "2", "longitude": -78.75, "label": "Colloid"}, "278": {"latitude": 76.351896, "discipline": "1", "longitude": 61.875, "label": "Applied Physiology; Muscle"}, "279": {"latitude": -21.943046, "discipline": "4", "longitude": 164.53125, "label": "Biblical Literature"}, "524": {"latitude": -6.315299, "discipline": "9", "longitude": -23.90625, "label": "Mammals"}, "525": {"latitude": 30.751278, "discipline": "6", "longitude": 54.84375, "label": "Impotence"}, "526": {"latitude": 76.840816, "discipline": "13", "longitude": -144.140625, "label": "Fuzzy Logic"}, "527": {"latitude": 58.813742, "discipline": "3", "longitude": 168.75, "label": "Tourism"}, "520": {"latitude": 2.811371, "discipline": "9", "longitude": -35.859375, "label": "Rangeland Ecology"}, "521": {"latitude": 81.518272, "discipline": "11", "longitude": -100.546875, "label": "Welding"}, "522": {"latitude": 74.402163, "discipline": "3", "longitude": -168.75, "label": "Reliability Engineering"}, "523": {"latitude": 48.458352, "discipline": "7", "longitude": 18.984375, "label": "Molecular Biology Methods"}, "528": {"latitude": -14.604847, "discipline": "9", "longitude": -19.6875, "label": "Aquatic Disease"}, "529": {"latitude": -23.885838, "discipline": "11", "longitude": -63.28125, "label": "Geographic Information Science"}, "449": {"latitude": 38.822591, "discipline": "8", "longitude": 1.40625, "label": "Systematics & Evolutionary Microbiology"}, "448": {"latitude": 78.490552, "discipline": "11", "longitude": -97.03125, "label": "Sensors & Actuators"}, "443": {"latitude": 55.776573, "discipline": "6", "longitude": 23.90625, "label": "Sexually Transmitted Diseases"}, "442": {"latitude": 38.822591, "discipline": "11", "longitude": -75.9375, "label": "Applied Geophysics"}, "441": {"latitude": 59.534318, "discipline": "7", "longitude": 9.84375, "label": "Peptides"}, "440": {"latitude": 76.679785, "discipline": "11", "longitude": -88.59375, "label": "Digital Printing"}, "447": {"latitude": 83.277705, "discipline": "1", "longitude": 88.59375, "label": "Geratric Nursing"}, "446": {"latitude": 71.965388, "discipline": "13", "longitude": -157.5, "label": "Machine Learning"}, "445": {"latitude": 65.946472, "discipline": "5", "longitude": 81.5625, "label": "NeuroImmunology"}, "444": {"latitude": 58.813742, "discipline": "3", "longitude": 156.796875, "label": "Engineering Education"}, "108": {"latitude": 82.586106, "discipline": "12", "longitude": -127.265625, "label": "Chaos Fractals & Complexity"}, "109": {"latitude": 12.554564, "discipline": "11", "longitude": -21.09375, "label": "Environmental Contamination"}, "102": {"latitude": 81.823794, "discipline": "11", "longitude": -101.953125, "label": "Alloys"}, "103": {"latitude": 80.647035, "discipline": "12", "longitude": -116.015625, "label": "Astronomy & Astrophysics"}, "100": {"latitude": 84.673513, "discipline": "1", "longitude": 85.78125, "label": "Employee Health Benefit Plans"}, "101": {"latitude": 63.548552, "discipline": "6", "longitude": 51.328125, "label": "Transplantation"}, "106": {"latitude": 83.676943, "discipline": "6", "longitude": 59.0625, "label": "Drug Discovery"}, "107": {"latitude": 39.909736, "discipline": "6", "longitude": -2.109375, "label": "Animal Science"}, "104": {"latitude": 72.816074, "discipline": "1", "longitude": 112.5, "label": "Substance-abuse Treatment"}, "105": {"latitude": 64.472794, "discipline": "3", "longitude": 174.375, "label": "Research Policy; Technology Management"}, "39": {"latitude": 78.903929, "discipline": "6", "longitude": 45.0, "label": "Diabetes Care"}, "38": {"latitude": 82.308893, "discipline": "12", "longitude": -106.875, "label": "Semiconducting Materials"}, "33": {"latitude": 64.168107, "discipline": "1", "longitude": 30.234375, "label": "Toxicology Applied Pharmacology"}, "32": {"latitude": 21.943046, "discipline": "6", "longitude": 50.625, "label": "Digestion"}, "31": {"latitude": 62.267923, "discipline": "7", "longitude": 45.0, "label": "Developmental Biology"}, "30": {"latitude": -7.013668, "discipline": "11", "longitude": -38.671875, "label": "Marine Biology"}, "37": {"latitude": 81.823794, "discipline": "1", "longitude": 5.625, "label": "Pharmaceutical Research"}, "36": {"latitude": 76.184995, "discipline": "11", "longitude": -84.375, "label": "Chemical Engineering"}, "35": {"latitude": 83.111071, "discipline": "2", "longitude": -49.921875, "label": "Inorganic Chemistry"}, "34": {"latitude": 63.548552, "discipline": "11", "longitude": -93.515625, "label": "Transportation Research"}, "438": {"latitude": 52.05249, "discipline": "3", "longitude": 171.5625, "label": "Regional Studies"}, "439": {"latitude": 81.823794, "discipline": "11", "longitude": -102.65625, "label": "Electrochemical Development"}, "436": {"latitude": 68.39918, "discipline": "11", "longitude": -88.59375, "label": "Construction"}, "437": {"latitude": 56.944974, "discipline": "11", "longitude": -82.265625, "label": "Dams & Tunnels"}, "434": {"latitude": 51.179343, "discipline": "3", "longitude": 169.453125, "label": "Environmental Policy"}, "435": {"latitude": 80.532071, "discipline": "12", "longitude": -145.546875, "label": "Topology"}, "432": {"latitude": 82.214217, "discipline": "2", "longitude": -47.109375, "label": "Liquid Crystals"}, "433": {"latitude": 76.840816, "discipline": "13", "longitude": -144.140625, "label": "Control Systems"}, "430": {"latitude": 71.965388, "discipline": "13", "longitude": -146.953125, "label": "User Interface Design"}, "431": {"latitude": 47.040182, "discipline": "3", "longitude": 168.046875, "label": "Public Policy"}, "339": {"latitude": 83.111071, "discipline": "2", "longitude": -32.34375, "label": "Environmental Chemistry"}, "338": {"latitude": -14.604847, "discipline": "10", "longitude": -62.578125, "label": "Geology (International)"}, "335": {"latitude": 44.087585, "discipline": "11", "longitude": -67.5, "label": "Hydrology Soil Contamination"}, "334": {"latitude": -31.952162, "discipline": "4", "longitude": 172.96875, "label": "Contemporary Philosophy"}, "337": {"latitude": 81.823794, "discipline": "12", "longitude": -144.84375, "label": "Mathematics Research"}, "336": {"latitude": 67.339861, "discipline": "3", "longitude": 132.1875, "label": "Child Abuse"}, "331": {"latitude": 77.617709, "discipline": "13", "longitude": -153.984375, "label": "Logic"}, "330": {"latitude": 78.767792, "discipline": "13", "longitude": -131.484375, "label": "Test Equipment"}, "333": {"latitude": 77.157163, "discipline": "11", "longitude": -82.265625, "label": "Textiles"}, "332": {"latitude": 78.903929, "discipline": "11", "longitude": -82.265625, "label": "Pulp Paper Science"}, "6": {"latitude": 65.366837, "discipline": "5", "longitude": 72.421875, "label": "Neuroscience; Molecular & Cellular"}, "99": {"latitude": 75.320025, "discipline": "3", "longitude": 177.890625, "label": "BioStatistics"}, "98": {"latitude": 72.60712, "discipline": "11", "longitude": -108.28125, "label": "Automotive Engineering"}, "91": {"latitude": 59.534318, "discipline": "6", "longitude": 30.9375, "label": "AIDS"}, "90": {"latitude": 81.518272, "discipline": "11", "longitude": -97.734375, "label": "Ceramics"}, "93": {"latitude": 84.474065, "discipline": "1", "longitude": 87.890625, "label": "Medical Records"}, "92": {"latitude": 68.138852, "discipline": "12", "longitude": -109.6875, "label": "Military Aviation"}, "95": {"latitude": 52.48278, "discipline": "3", "longitude": 179.296875, "label": "Applied Economics"}, "94": {"latitude": 74.211983, "discipline": "3", "longitude": -174.375, "label": "Statistics"}, "97": {"latitude": -4.214943, "discipline": "11", "longitude": -55.546875, "label": "Atmospheric Science"}, "96": {"latitude": 75.497157, "discipline": "13", "longitude": -136.40625, "label": "Automatic Control"}, "554": {"latitude": 55.37911, "discipline": "6", "longitude": 23.203125, "label": "Agricultural Environmental Medicine"}, "551": {"latitude": -9.102097, "discipline": "9", "longitude": -33.75, "label": "Wetlands"}, "550": {"latitude": 54.162434, "discipline": "11", "longitude": -82.265625, "label": "Bulk Solid Handling"}, "553": {"latitude": 72.60712, "discipline": "13", "longitude": -124.453125, "label": "Power Transmission & Control"}, "552": {"latitude": -21.943046, "discipline": "11", "longitude": -59.0625, "label": "GIS (non English)"}, "238": {"latitude": 77.31252, "discipline": "6", "longitude": 47.109375, "label": "Diabetes Metabolism"}, "239": {"latitude": 59.534318, "discipline": "11", "longitude": -79.453125, "label": "Geotechnical Engineering"}, "234": {"latitude": 59.888937, "discipline": "3", "longitude": 158.203125, "label": "Symbolic Interaction"}, "235": {"latitude": 69.411242, "discipline": "3", "longitude": 124.453125, "label": "Child & Adolescent Psychiatry"}, "236": {"latitude": 83.277705, "discipline": "1", "longitude": 83.671875, "label": "General Practice"}, "237": {"latitude": 50.736455, "discipline": "3", "longitude": 175.078125, "label": "Environmental Management"}, "230": {"latitude": -21.943046, "discipline": "4", "longitude": 165.234375, "label": "Hispanic Studies"}, "231": {"latitude": 7.013668, "discipline": "9", "longitude": -33.046875, "label": "Forest Science"}, "232": {"latitude": 82.214217, "discipline": "12", "longitude": -118.125, "label": "Plasma Physics"}, "233": {"latitude": 65.07213, "discipline": "8", "longitude": 4.921875, "label": "Proteomics"}, "1": {"latitude": 59.888937, "discipline": "7", "longitude": 35.859375, "label": "Clinical Cancer Research"}, "146": {"latitude": 54.162434, "discipline": "8", "longitude": 4.921875, "label": "BioInformatics"}, "147": {"latitude": 76.184995, "discipline": "11", "longitude": -104.765625, "label": "Mechanics of Solids & Structures"}, "144": {"latitude": 71.524909, "discipline": "5", "longitude": 94.21875, "label": "Vision"}, "145": {"latitude": 59.888937, "discipline": "3", "longitude": 168.046875, "label": "Communication Research"}, "142": {"latitude": -39.909736, "discipline": "4", "longitude": 163.828125, "label": "Music & Theatre"}, "143": {"latitude": 66.791909, "discipline": "5", "longitude": 113.203125, "label": "Memory & Cognition"}, "140": {"latitude": 74.775843, "discipline": "6", "longitude": 64.6875, "label": "Alternative Complementary Medicine"}, "141": {"latitude": 54.572062, "discipline": "11", "longitude": -82.265625, "label": "Petroleum Engineering"}, "148": {"latitude": 76.679785, "discipline": "6", "longitude": 48.515625, "label": "Pharmacy"}, "149": {"latitude": -7.013668, "discipline": "10", "longitude": -58.359375, "label": "Geomorphology"}, "133": {"latitude": 43.068888, "discipline": "6", "longitude": 9.140625, "label": "Veterinary Science"}, "132": {"latitude": 83.520162, "discipline": "11", "longitude": -82.96875, "label": "Corrosion"}, "131": {"latitude": 8.407168, "discipline": "9", "longitude": -9.84375, "label": "Pest Management Science"}, "130": {"latitude": 58.813742, "discipline": "7", "longitude": 45.0, "label": "Pathology"}, "137": {"latitude": 74.402163, "discipline": "13", "longitude": -149.765625, "label": "Neural Networks"}, "136": {"latitude": 76.840816, "discipline": "13", "longitude": -146.953125, "label": "Image Processing"}, "135": {"latitude": 69.411242, "discipline": "6", "longitude": 32.34375, "label": "Stem Cells"}, "134": {"latitude": 63.233627, "discipline": "3", "longitude": 158.203125, "label": "Teacher Education; Evaluation"}, "494": {"latitude": 84.541361, "discipline": "1", "longitude": 81.5625, "label": "Medical Libraries"}, "495": {"latitude": -31.952162, "discipline": "4", "longitude": 164.53125, "label": "Opera"}, "139": {"latitude": 68.39918, "discipline": "6", "longitude": 59.0625, "label": "Intensive Care"}, "138": {"latitude": 83.520162, "discipline": "1", "longitude": 99.84375, "label": "Nursing Education"}, "490": {"latitude": 73.428424, "discipline": "6", "longitude": 41.484375, "label": "Menopause"}, "491": {"latitude": 82.765373, "discipline": "2", "longitude": -44.296875, "label": "Chemistry (Russia)"}, "492": {"latitude": 49.837982, "discipline": "3", "longitude": 166.640625, "label": "GeoPolitics"}, "493": {"latitude": -10.487812, "discipline": "11", "longitude": -57.65625, "label": "Glaciology"}, "24": {"latitude": 76.351896, "discipline": "1", "longitude": 47.8125, "label": "Dermatology"}, "25": {"latitude": 66.791909, "discipline": "6", "longitude": 54.84375, "label": "Kidney"}, "26": {"latitude": 62.267923, "discipline": "5", "longitude": 56.953125, "label": "Pharmacology Science"}, "27": {"latitude": 38.822591, "discipline": "3", "longitude": 167.34375, "label": "Law"}, "20": {"latitude": 49.837982, "discipline": "7", "longitude": 25.3125, "label": "Virology"}, "21": {"latitude": 31.952162, "discipline": "9", "longitude": -7.734375, "label": "Plant Physiology"}, "22": {"latitude": 62.593341, "discipline": "6", "longitude": 47.8125, "label": "Allergy & Clinical Immunology"}, "23": {"latitude": 81.823794, "discipline": "11", "longitude": -102.65625, "label": "Material Science"}, "28": {"latitude": 63.233627, "discipline": "1", "longitude": 64.6875, "label": "Medical Imaging"}, "29": {"latitude": 52.05249, "discipline": "7", "longitude": 10.546875, "label": "Bacteriology"}, "407": {"latitude": -15.961329, "discipline": "4", "longitude": 165.234375, "label": "Ethics"}, "406": {"latitude": 79.171335, "discipline": "11", "longitude": -99.140625, "label": "Metallurgy"}, "405": {"latitude": 65.07213, "discipline": "6", "longitude": 56.25, "label": "Clinical Rehabilitation"}, "404": {"latitude": 3.513421, "discipline": "9", "longitude": -33.75, "label": "Ecological Modeling"}, "403": {"latitude": 58.447733, "discipline": "3", "longitude": 167.34375, "label": "Human Resource Management"}, "402": {"latitude": 82.214217, "discipline": "1", "longitude": 26.015625, "label": "Molecular Medicine"}, "401": {"latitude": 2.811371, "discipline": "9", "longitude": -16.875, "label": "Sociobiology"}, "400": {"latitude": 73.428424, "discipline": "13", "longitude": -139.21875, "label": "Chip Design & Manufacturing"}, "409": {"latitude": 74.402163, "discipline": "12", "longitude": -121.640625, "label": "Aerospace"}, "408": {"latitude": 66.791909, "discipline": "3", "longitude": 133.59375, "label": "Marital & Family Therapy"}, "379": {"latitude": -14.604847, "discipline": "4", "longitude": 167.34375, "label": "German Studies"}, "378": {"latitude": 50.736455, "discipline": "6", "longitude": 63.984375, "label": "Radiology"}, "371": {"latitude": 71.074056, "discipline": "13", "longitude": -153.984375, "label": "Functional Programing"}, "370": {"latitude": 78.349411, "discipline": "13", "longitude": -146.25, "label": "Electronic Imaging"}, "373": {"latitude": 14.604847, "discipline": "9", "longitude": -15.46875, "label": "Plant Disease"}, "372": {"latitude": 18.646245, "discipline": "9", "longitude": -9.84375, "label": "Applied Genetics"}, "375": {"latitude": 53.330873, "discipline": "3", "longitude": -179.296875, "label": "Developmental Economics"}, "374": {"latitude": 23.885838, "discipline": "11", "longitude": -59.0625, "label": "Water Resource"}, "377": {"latitude": 53.330873, "discipline": "3", "longitude": -179.296875, "label": "International Economics"}, "376": {"latitude": 81.723188, "discipline": "12", "longitude": -108.28125, "label": "Nuclear Physics"}, "393": {"latitude": 80.532071, "discipline": "12", "longitude": -145.546875, "label": "Mathematical Science (Russia)"}, "392": {"latitude": 81.20142, "discipline": "12", "longitude": -145.546875, "label": "Optimization Theory"}, "88": {"latitude": 84.267172, "discipline": "2", "longitude": -77.34375, "label": "Computational Chemistry"}, "89": {"latitude": 58.813742, "discipline": "6", "longitude": 58.359375, "label": "Surgery"}, "397": {"latitude": 83.753911, "discipline": "1", "longitude": 83.671875, "label": "Rural Health Care"}, "396": {"latitude": 81.518272, "discipline": "11", "longitude": -100.546875, "label": "Materials Processing"}, "395": {"latitude": 73.2267, "discipline": "13", "longitude": -146.953125, "label": "Security; Cryptography"}, "394": {"latitude": 55.776573, "discipline": "7", "longitude": 37.265625, "label": "Gene Therapy"}, "82": {"latitude": 75.497157, "discipline": "6", "longitude": 40.78125, "label": "Clinical Endocrinology"}, "83": {"latitude": 78.767792, "discipline": "6", "longitude": 42.1875, "label": "Dietetics"}, "80": {"latitude": 76.840816, "discipline": "6", "longitude": 57.65625, "label": "Hypertension"}, "81": {"latitude": 55.776573, "discipline": "7", "longitude": 53.4375, "label": "Human Molecular Genetics"}, "86": {"latitude": 73.428424, "discipline": "11", "longitude": -98.4375, "label": "Gas Turbines"}, "87": {"latitude": -12.554564, "discipline": "11", "longitude": -53.4375, "label": "Remote Sensing"}, "84": {"latitude": 54.162434, "discipline": "6", "longitude": 18.28125, "label": "Clinical Microbiology"}, "85": {"latitude": 81.518272, "discipline": "6", "longitude": 63.984375, "label": "Hospital Pharmacy"}, "7": {"latitude": 70.140364, "discipline": "6", "longitude": 61.171875, "label": "Anesthetics & Analgesics"}, "245": {"latitude": 43.068888, "discipline": "11", "longitude": -64.6875, "label": "Water Quality & Resource Management"}, "244": {"latitude": 68.911005, "discipline": "3", "longitude": 141.328125, "label": "Eating Disorders; Sex Roles"}, "247": {"latitude": 68.911005, "discipline": "1", "longitude": 104.0625, "label": "Geriatric Psychiatry"}, "246": {"latitude": 46.073231, "discipline": "3", "longitude": 168.046875, "label": "Ethnic Migration"}, "241": {"latitude": 68.911005, "discipline": "6", "longitude": 47.8125, "label": "Clinical Chemistry"}, "240": {"latitude": 81.20142, "discipline": "13", "longitude": -125.15625, "label": "Instrumentation"}, "243": {"latitude": 71.074056, "discipline": "1", "longitude": 71.015625, "label": "Arthroscopy"}, "242": {"latitude": 71.074056, "discipline": "11", "longitude": -94.921875, "label": "Fluid Engineering"}, "249": {"latitude": 72.60712, "discipline": "11", "longitude": -90.703125, "label": "Ore Processing"}, "248": {"latitude": 71.965388, "discipline": "11", "longitude": -107.578125, "label": "Sound & Vibration"}, "519": {"latitude": 73.2267, "discipline": "1", "longitude": 99.140625, "label": "Forensic Science"}, "518": {"latitude": 82.494824, "discipline": "11", "longitude": -101.25, "label": "Defects & Diffusion in Materials"}, "511": {"latitude": 47.040182, "discipline": "3", "longitude": 165.9375, "label": "Human Rights"}, "510": {"latitude": 62.593341, "discipline": "1", "longitude": 77.34375, "label": "Hearing Research"}, "513": {"latitude": 53.330873, "discipline": "3", "longitude": 178.59375, "label": "Social Economics"}, "512": {"latitude": 59.534318, "discipline": "6", "longitude": 54.140625, "label": "Lung Cancer"}, "515": {"latitude": 55.37911, "discipline": "8", "longitude": 2.109375, "label": "Biotechnology Bioengineering"}, "514": {"latitude": 65.946472, "discipline": "8", "longitude": -20.390625, "label": "Carbohydrate Research"}, "517": {"latitude": 81.413933, "discipline": "13", "longitude": -125.15625, "label": "Electronics"}, "516": {"latitude": 43.068888, "discipline": "3", "longitude": 168.75, "label": "Rural Studies"}, "458": {"latitude": 72.181804, "discipline": "13", "longitude": -150.46875, "label": "Computer Systems Theory"}, "459": {"latitude": 69.657086, "discipline": "11", "longitude": -94.21875, "label": "Combustion"}, "450": {"latitude": 78.903929, "discipline": "13", "longitude": -140.625, "label": "Image Processing"}, "451": {"latitude": 81.823794, "discipline": "1", "longitude": 70.3125, "label": "Medical Education"}, "452": {"latitude": 62.593341, "discipline": "1", "longitude": 70.3125, "label": "Magnetic Resonance Imagery"}, "453": {"latitude": 84.865782, "discipline": "1", "longitude": 78.046875, "label": "Hospital Management"}, "454": {"latitude": 0.703107, "discipline": "9", "longitude": -6.328125, "label": "Insect Physiology"}, "455": {"latitude": 78.061989, "discipline": "13", "longitude": -134.296875, "label": "Power Transmission"}, "456": {"latitude": 55.776573, "discipline": "8", "longitude": -7.734375, "label": "Food Engineering"}, "457": {"latitude": 77.617709, "discipline": "1", "longitude": 67.5, "label": "Oral Surgery"}, "179": {"latitude": 84.124973, "discipline": "2", "longitude": -91.40625, "label": "Molecular Physics"}, "178": {"latitude": 74.775843, "discipline": "1", "longitude": 68.90625, "label": "Biomechanics"}, "177": {"latitude": 77.157163, "discipline": "11", "longitude": -82.265625, "label": "Wool"}, "176": {"latitude": 82.765373, "discipline": "12", "longitude": -117.421875, "label": "Optics & Lasers"}, "175": {"latitude": 80.872827, "discipline": "12", "longitude": -122.34375, "label": "Solid State Electronics"}, "174": {"latitude": 68.911005, "discipline": "1", "longitude": 107.578125, "label": "Geriatrics"}, "173": {"latitude": 70.140364, "discipline": "3", "longitude": -166.640625, "label": "Computer-Aided Process Planning"}, "172": {"latitude": 31.952162, "discipline": "11", "longitude": -42.1875, "label": "Agricultural Engineering"}, "171": {"latitude": 65.07213, "discipline": "3", "longitude": 172.96875, "label": "Leadership & Organizational Behavior"}, "170": {"latitude": -2.811371, "discipline": "4", "longitude": 165.9375, "label": "History; Gender Studies"}, "253": {"latitude": 80.297927, "discipline": "13", "longitude": -126.5625, "label": "Dialectics"}, "182": {"latitude": -17.978733, "discipline": "4", "longitude": 168.75, "label": "History Philosophy"}, "183": {"latitude": -21.943046, "discipline": "4", "longitude": 165.9375, "label": "Poetry"}, "180": {"latitude": -4.214943, "discipline": "9", "longitude": -20.390625, "label": "Comparative Animal Physiology"}, "181": {"latitude": 49.382373, "discipline": "3", "longitude": 165.9375, "label": "Political Science"}, "186": {"latitude": 77.157163, "discipline": "13", "longitude": -143.4375, "label": "Speech Recognitation"}, "187": {"latitude": 76.184995, "discipline": "11", "longitude": -103.359375, "label": "Fluid Mechanics"}, "184": {"latitude": 51.179343, "discipline": "1", "longitude": 63.28125, "label": "Nuclear Medicine"}, "185": {"latitude": 82.765373, "discipline": "12", "longitude": -92.109375, "label": "Nanotechnology"}, "188": {"latitude": 76.184995, "discipline": "13", "longitude": -149.0625, "label": "Computer Graphics"}, "189": {"latitude": 77.31252, "discipline": "11", "longitude": -73.125, "label": "Filtration Membrane"}, "11": {"latitude": 70.844673, "discipline": "1", "longitude": 109.6875, "label": "Affective Disorders"}, "10": {"latitude": 79.812302, "discipline": "2", "longitude": -54.140625, "label": "Macromolecules & Polymers"}, "13": {"latitude": 83.026219, "discipline": "12", "longitude": -106.171875, "label": "Surface Science"}, "12": {"latitude": 58.447733, "discipline": "6", "longitude": 52.03125, "label": "Oncology"}, "15": {"latitude": 84.124973, "discipline": "1", "longitude": 85.78125, "label": "Hospital Financial Management"}, "14": {"latitude": 79.935918, "discipline": "12", "longitude": -149.0625, "label": "Nonlinear Analysis"}, "17": {"latitude": 81.518272, "discipline": "1", "longitude": 32.34375, "label": "Occupational Health"}, "16": {"latitude": 67.339861, "discipline": "7", "longitude": 47.8125, "label": "Rheumatology"}, "19": {"latitude": 61.606396, "discipline": "7", "longitude": 38.671875, "label": "Leukemia"}, "18": {"latitude": 83.111071, "discipline": "2", "longitude": -44.296875, "label": "Organic Chemistry"}, "62": {"latitude": 72.816074, "discipline": "1", "longitude": 69.609375, "label": "Bone Joint Surgery"}, "322": {"latitude": 79.171335, "discipline": "12", "longitude": -122.34375, "label": "Space Research"}, "323": {"latitude": -7.013668, "discipline": "9", "longitude": -15.46875, "label": "Entomology"}, "320": {"latitude": 53.330873, "discipline": "7", "longitude": 28.828125, "label": "Mutation; DNA Repair"}, "321": {"latitude": -12.554564, "discipline": "9", "longitude": -24.609375, "label": "Human Evolution"}, "326": {"latitude": 83.676943, "discipline": "2", "longitude": -35.859375, "label": "Computer Aided Molecular Design"}, "327": {"latitude": 60.586967, "discipline": "3", "longitude": 144.84375, "label": "Criminology"}, "324": {"latitude": 65.946472, "discipline": "5", "longitude": 92.8125, "label": "Epilepsy"}, "325": {"latitude": 0.703107, "discipline": "9", "longitude": -29.53125, "label": "Plant Ecology"}, "328": {"latitude": 70.844673, "discipline": "3", "longitude": 122.34375, "label": "Forensic Psychiatry"}, "329": {"latitude": 70.844673, "discipline": "3", "longitude": 139.921875, "label": "Personality"}, "201": {"latitude": 80.647035, "discipline": "11", "longitude": -108.984375, "label": "Machine Tools"}, "200": {"latitude": 40.446947, "discipline": "6", "longitude": 68.203125, "label": "Radiation Protection"}, "203": {"latitude": 80.178714, "discipline": "1", "longitude": 59.765625, "label": "Periodontology"}, "202": {"latitude": 44.590467, "discipline": "6", "longitude": 6.328125, "label": "Veterinary Medicine"}, "205": {"latitude": 71.074056, "discipline": "6", "longitude": 52.03125, "label": "Thrombosis"}, "204": {"latitude": 70.140364, "discipline": "7", "longitude": 52.03125, "label": "Birth Defects"}, "207": {"latitude": 82.494824, "discipline": "1", "longitude": 104.0625, "label": "Mental Health Nursing"}, "206": {"latitude": -7.013668, "discipline": "9", "longitude": -35.859375, "label": "Freshwater Biology"}, "209": {"latitude": -21.943046, "discipline": "4", "longitude": 165.234375, "label": "English Literature"}, "208": {"latitude": 72.60712, "discipline": "13", "longitude": -157.5, "label": "Artificial Evolution"}, "77": {"latitude": 71.965388, "discipline": "6", "longitude": 54.140625, "label": "Cardiovascular"}, "76": {"latitude": 68.39918, "discipline": "6", "longitude": 45.0, "label": "Pediatrics"}, "75": {"latitude": 80.532071, "discipline": "2", "longitude": -20.390625, "label": "Chromatography; Electrophoresis"}, "74": {"latitude": 70.844673, "discipline": "3", "longitude": -167.34375, "label": "Operations Research"}, "73": {"latitude": 76.184995, "discipline": "1", "longitude": 75.9375, "label": "Sports Medicine"}, "72": {"latitude": 3.513421, "discipline": "11", "longitude": -58.359375, "label": "Oceanography"}, "71": {"latitude": 72.181804, "discipline": "1", "longitude": 127.265625, "label": "Psychoanalysis"}, "70": {"latitude": 75.320025, "discipline": "11", "longitude": -108.984375, "label": "Aeronautics & Astronautics"}, "79": {"latitude": 50.736455, "discipline": "3", "longitude": 177.890625, "label": "Economics"}, "78": {"latitude": -15.961329, "discipline": "10", "longitude": -51.328125, "label": "Paleobiology"}, "2": {"latitude": 73.428424, "discipline": "6", "longitude": 59.765625, "label": "Circulation"}, "542": {"latitude": 76.184995, "discipline": "1", "longitude": 87.1875, "label": "Perception Motor Skills"}, "543": {"latitude": 40.446947, "discipline": "3", "longitude": 167.34375, "label": "World Trade; Law"}, "540": {"latitude": 77.617709, "discipline": "11", "longitude": -74.53125, "label": "Textile Art"}, "541": {"latitude": -23.885838, "discipline": "4", "longitude": 165.234375, "label": "Italian Studies"}, "546": {"latitude": 83.026219, "discipline": "11", "longitude": -64.6875, "label": "Paints & Coatings"}, "547": {"latitude": 83.97926, "discipline": "1", "longitude": 100.546875, "label": "Nursing Theory"}, "544": {"latitude": -7.013668, "discipline": "9", "longitude": -20.390625, "label": "Insects"}, "545": {"latitude": -6.315299, "discipline": "9", "longitude": -28.828125, "label": "Australian Ecology"}, "8": {"latitude": 52.48278, "discipline": "6", "longitude": 51.328125, "label": "Urology"}, "548": {"latitude": -12.554564, "discipline": "9", "longitude": -32.34375, "label": "Crustaceans"}, "549": {"latitude": 79.560546, "discipline": "1", "longitude": 52.03125, "label": "Laser Surgery"}, "68": {"latitude": 75.497157, "discipline": "1", "longitude": 60.46875, "label": "Retinal Surgery"}, "120": {"latitude": 18.646245, "discipline": "11", "longitude": -44.296875, "label": "Soil Quality"}, "121": {"latitude": 76.351896, "discipline": "13", "longitude": -139.21875, "label": "Integrated Circuit Design"}, "122": {"latitude": -39.909736, "discipline": "4", "longitude": 179.296875, "label": "Philosophy Psychology"}, "123": {"latitude": 65.946472, "discipline": "3", "longitude": 178.59375, "label": "Construction & Project Management"}, "124": {"latitude": 67.609221, "discipline": "3", "longitude": 144.84375, "label": "Social Psychology"}, "125": {"latitude": 82.765373, "discipline": "12", "longitude": -117.421875, "label": "High Energy Physics"}, "126": {"latitude": 63.548552, "discipline": "3", "longitude": 171.5625, "label": "Strategic Management"}, "127": {"latitude": 38.822591, "discipline": "8", "longitude": 14.0625, "label": "Genomics & Nucleic Acids"}, "128": {"latitude": 76.351896, "discipline": "11", "longitude": -97.03125, "label": "Heat Transfer"}, "129": {"latitude": 69.411242, "discipline": "11", "longitude": -82.96875, "label": "Cement & Concrete"}, "414": {"latitude": 72.60712, "discipline": "1", "longitude": 75.9375, "label": "Trauma"}, "415": {"latitude": 82.214217, "discipline": "2", "longitude": -34.453125, "label": "Thermal Analysis"}, "416": {"latitude": 77.31252, "discipline": "11", "longitude": -98.4375, "label": "Solar & Wind Power"}, "417": {"latitude": 49.837982, "discipline": "11", "longitude": -82.265625, "label": "Ocean Engineering"}, "410": {"latitude": -14.604847, "discipline": "4", "longitude": 165.234375, "label": "Critical Studies"}, "411": {"latitude": 56.944974, "discipline": "3", "longitude": 177.890625, "label": "Econometrics"}, "412": {"latitude": 67.609221, "discipline": "5", "longitude": 103.359375, "label": "Neuroscience Methods"}, "413": {"latitude": -2.811371, "discipline": "10", "longitude": -65.390625, "label": "Mineralogy"}, "498": {"latitude": 11.178402, "discipline": "3", "longitude": 159.609375, "label": "Pragmatics & Discourse"}, "418": {"latitude": 61.606396, "discipline": "3", "longitude": 146.953125, "label": "Educational Psychology"}, "419": {"latitude": 7.013668, "discipline": "9", "longitude": -23.90625, "label": "Mycology"}, "499": {"latitude": 54.572062, "discipline": "6", "longitude": 17.578125, "label": "Reproduction Veterinary"}, "319": {"latitude": 57.704147, "discipline": "6", "longitude": 55.546875, "label": "Clinical Medicine (translated)"}, "318": {"latitude": 71.524909, "discipline": "1", "longitude": 118.125, "label": "Mental Health Assessment"}, "313": {"latitude": 72.60712, "discipline": "6", "longitude": 74.53125, "label": "Pain"}, "312": {"latitude": 67.339861, "discipline": "3", "longitude": 131.484375, "label": "Child Develomoent"}, "311": {"latitude": 81.723188, "discipline": "6", "longitude": 47.109375, "label": "Medical Screening & Epidemiology"}, "310": {"latitude": 83.676943, "discipline": "2", "longitude": -82.265625, "label": "Chemistry & Material Science"}, "317": {"latitude": 76.351896, "discipline": "13", "longitude": -143.4375, "label": "Pattern Recognition"}, "316": {"latitude": 58.813742, "discipline": "11", "longitude": -82.265625, "label": "Safety Management"}, "315": {"latitude": 17.978733, "discipline": "11", "longitude": -31.640625, "label": "Soil Analysis"}, "314": {"latitude": 58.447733, "discipline": "3", "longitude": 168.75, "label": "Public Administration"}, "496": {"latitude": 57.704147, "discipline": "3", "longitude": 156.09375, "label": "Education"}, "497": {"latitude": 73.428424, "discipline": "11", "longitude": -103.359375, "label": "Acoustics"}, "3": {"latitude": 74.211983, "discipline": "13", "longitude": -152.578125, "label": "Data Mining"}, "368": {"latitude": 58.447733, "discipline": "12", "longitude": -108.984375, "label": "Naval Architecture"}, "369": {"latitude": -0.703107, "discipline": "11", "longitude": -42.890625, "label": "Environmental Microbiology"}, "366": {"latitude": 74.959392, "discipline": "1", "longitude": 42.890625, "label": "Eye"}, "367": {"latitude": 74.959392, "discipline": "1", "longitude": 116.015625, "label": "Addictive Behavior"}, "364": {"latitude": -12.554564, "discipline": "11", "longitude": -61.875, "label": "Giodesy"}, "365": {"latitude": 84.474065, "discipline": "2", "longitude": -77.34375, "label": "Surfactants"}, "362": {"latitude": 52.48278, "discipline": "11", "longitude": -73.125, "label": "Water Utilities"}, "363": {"latitude": -14.604847, "discipline": "10", "longitude": -62.578125, "label": "Sedimentary Geology"}, "360": {"latitude": 52.05249, "discipline": "3", "longitude": 174.375, "label": "Financial Accounting"}, "361": {"latitude": 49.382373, "discipline": "8", "longitude": -8.4375, "label": "Microbiology Biotechnology"}, "380": {"latitude": -19.973349, "discipline": "4", "longitude": 163.828125, "label": "Medieval History"}, "381": {"latitude": -39.909736, "discipline": "4", "longitude": 179.296875, "label": "Philosophy of Education"}, "382": {"latitude": 61.606396, "discipline": "11", "longitude": -104.765625, "label": "Oceanographic Instrumentation"}, "383": {"latitude": 46.073231, "discipline": "3", "longitude": 168.75, "label": "Foreign Policy"}, "384": {"latitude": 21.943046, "discipline": "6", "longitude": 50.625, "label": "Gut"}, "385": {"latitude": 81.723188, "discipline": "13", "longitude": -126.5625, "label": "Microwaves; Radio Frequencies"}, "386": {"latitude": 67.339861, "discipline": "3", "longitude": 134.296875, "label": "School Psychology"}, "387": {"latitude": 54.572062, "discipline": "7", "longitude": 29.53125, "label": "Vaccines"}, "388": {"latitude": 47.040182, "discipline": "3", "longitude": 171.5625, "label": "Environmental Law"}, "389": {"latitude": 78.903929, "discipline": "8", "longitude": -15.46875, "label": "Mass Spectrometry"}, "60": {"latitude": 76.679785, "discipline": "11", "longitude": -88.59375, "label": "Pulp & Paper"}, "61": {"latitude": -12.554564, "discipline": "10", "longitude": -62.578125, "label": "Seismology"}, "258": {"latitude": 72.60712, "discipline": "6", "longitude": 56.25, "label": "Electrocardiography"}, "259": {"latitude": 49.837982, "discipline": "3", "longitude": 176.484375, "label": "International Development"}, "64": {"latitude": 80.297927, "discipline": "12", "longitude": -146.953125, "label": "Algebra"}, "65": {"latitude": 80.872827, "discipline": "13", "longitude": -127.96875, "label": "Antenna"}, "66": {"latitude": 78.767792, "discipline": "13", "longitude": -134.296875, "label": "Circuit Systems"}, "67": {"latitude": 83.676943, "discipline": "1", "longitude": 95.625, "label": "Nursing Specialists"}, "252": {"latitude": 56.559482, "discipline": "6", "longitude": 60.46875, "label": "Cancer (translated)"}, "69": {"latitude": 65.946472, "discipline": "5", "longitude": 94.21875, "label": "Psychopharmacology"}, "250": {"latitude": 31.952162, "discipline": "3", "longitude": 165.9375, "label": "Ethnology"}, "251": {"latitude": 67.339861, "discipline": "6", "longitude": 49.21875, "label": "Prenatal Diagnostics"}, "256": {"latitude": 76.351896, "discipline": "11", "longitude": -107.578125, "label": "Numerical Methods in Engineering"}, "257": {"latitude": 80.872827, "discipline": "2", "longitude": 2.109375, "label": "EthnoPharmcology"}, "254": {"latitude": -10.487812, "discipline": "11", "longitude": -54.140625, "label": "Atmospheric GeoPhysics"}, "255": {"latitude": 80.872827, "discipline": "2", "longitude": -14.0625, "label": "Flavors & Fragrance"}, "508": {"latitude": -0.703107, "discipline": "11", "longitude": -44.296875, "label": "Marine Pollution"}, "509": {"latitude": 75.320025, "discipline": "2", "longitude": -2.8125, "label": "Toxins"}, "506": {"latitude": 65.07213, "discipline": "6", "longitude": 45.0, "label": "Pulmonary"}, "507": {"latitude": 65.366837, "discipline": "11", "longitude": -100.546875, "label": "Waste Management"}, "504": {"latitude": 70.844673, "discipline": "6", "longitude": 59.0625, "label": "Artifical Organs"}, "505": {"latitude": 73.82482, "discipline": "1", "longitude": 72.421875, "label": "Physical Therapy; Orthopedic"}, "502": {"latitude": -12.554564, "discipline": "4", "longitude": 167.34375, "label": "Socio-Cultural Anthropology"}, "503": {"latitude": 33.72434, "discipline": "6", "longitude": 1.40625, "label": "Poultry Science"}, "500": {"latitude": 82.765373, "discipline": "2", "longitude": -44.296875, "label": "Crystallography"}, "501": {"latitude": 79.560546, "discipline": "12", "longitude": -135.0, "label": "Applied Math & Computation"}, "469": {"latitude": 82.214217, "discipline": "1", "longitude": 79.453125, "label": "Preventive Medicine"}, "468": {"latitude": -19.973349, "discipline": "10", "longitude": -45.0, "label": "Archeological Science"}, "465": {"latitude": 79.171335, "discipline": "11", "longitude": -99.84375, "label": "Fractures & Fatigue"}, "464": {"latitude": 65.946472, "discipline": "3", "longitude": 129.375, "label": "Pychiatric & Behavioral Genetics"}, "467": {"latitude": -21.943046, "discipline": "4", "longitude": 164.53125, "label": "Cross Disciplinary Studies"}, "466": {"latitude": 76.679785, "discipline": "6", "longitude": 75.9375, "label": "Emergency Medicine"}, "461": {"latitude": -6.315299, "discipline": "9", "longitude": -25.3125, "label": "Wildlife Research"}, "460": {"latitude": 73.2267, "discipline": "1", "longitude": 42.890625, "label": "Dermatological Surgery"}, "463": {"latitude": 83.026219, "discipline": "12", "longitude": -116.015625, "label": "Physics; Current Developments"}, "462": {"latitude": 83.97926, "discipline": "1", "longitude": 97.734375, "label": "Midwifery"}, "168": {"latitude": 77.157163, "discipline": "11", "longitude": -94.21875, "label": "Composites"}, "169": {"latitude": 41.508577, "discipline": "3", "longitude": 154.6875, "label": "Language Learning"}, "164": {"latitude": 68.39918, "discipline": "13", "longitude": -171.5625, "label": "Library Science; Infomation Retrieval"}, "165": {"latitude": 77.767582, "discipline": "1", "longitude": 63.28125, "label": "Biomaterials"}, "166": {"latitude": -15.961329, "discipline": "10", "longitude": -60.46875, "label": "Quaternary Research"}, "167": {"latitude": 42.55308, "discipline": "6", "longitude": 56.25, "label": "Endoscopy"}, "160": {"latitude": 73.2267, "discipline": "13", "longitude": -151.875, "label": "Artificial Intelligence"}, "161": {"latitude": 83.111071, "discipline": "2", "longitude": -45.0, "label": "Electro Analytical Chemistry"}, "162": {"latitude": 82.214217, "discipline": "1", "longitude": 68.90625, "label": "Dental Education"}, "163": {"latitude": 58.447733, "discipline": "8", "longitude": -4.21875, "label": "Enzyme Microbiological Techniques"}, "9": {"latitude": 59.534318, "discipline": "7", "longitude": 29.53125, "label": "Immunology"}, "357": {"latitude": -4.214943, "discipline": "9", "longitude": -26.015625, "label": "Wildlife Management"}, "356": {"latitude": 70.844673, "discipline": "13", "longitude": -152.578125, "label": "Software Design and Development"}, "355": {"latitude": 71.074056, "discipline": "1", "longitude": 123.046875, "label": "Psychiatric Services"}, "354": {"latitude": 71.965388, "discipline": "1", "longitude": 112.5, "label": "Forensic Medicine"}, "353": {"latitude": 80.297927, "discipline": "12", "longitude": -116.71875, "label": "Geophysical Science"}, "352": {"latitude": 42.55308, "discipline": "9", "longitude": 23.203125, "label": "World Health Organization"}, "351": {"latitude": 79.935918, "discipline": "12", "longitude": -134.296875, "label": "Computational& Applied Math"}, "350": {"latitude": 72.60712, "discipline": "5", "longitude": 92.109375, "label": "Physical Therapy; Brain Injury"}, "359": {"latitude": 72.181804, "discipline": "13", "longitude": -157.5, "label": "Database Design & Management"}, "358": {"latitude": 14.604847, "discipline": "11", "longitude": -72.421875, "label": "Ocean Coastal Management"}, "216": {"latitude": 63.233627, "discipline": "11", "longitude": -85.78125, "label": "Mining"}, "217": {"latitude": 0.703107, "discipline": "9", "longitude": -18.28125, "label": "Aquaculture"}, "214": {"latitude": -21.943046, "discipline": "4", "longitude": 165.234375, "label": "Modern Language"}, "215": {"latitude": 66.51326, "discipline": "5", "longitude": 82.96875, "label": "Neurophsyiology & Neuroscience"}, "212": {"latitude": 64.168107, "discipline": "3", "longitude": 167.34375, "label": "Higher Education"}, "213": {"latitude": -2.811371, "discipline": "9", "longitude": -26.015625, "label": "Ecology"}, "210": {"latitude": 74.211983, "discipline": "1", "longitude": 63.984375, "label": "Plastic Surgery"}, "211": {"latitude": 84.124973, "discipline": "1", "longitude": 96.328125, "label": "Nursing Administration"}, "218": {"latitude": 2.811371, "discipline": "9", "longitude": -11.25, "label": "Molecular Biological Evolution"}, "219": {"latitude": 82.765373, "discipline": "13", "longitude": -118.828125, "label": "Photonics"}, "289": {"latitude": 68.138852, "discipline": "1", "longitude": 127.96875, "label": "Behavioral Research Therapy"}, "288": {"latitude": 72.816074, "discipline": "13", "longitude": -144.140625, "label": "Spyware; Malware"}, "4": {"latitude": 64.472794, "discipline": "7", "longitude": 14.765625, "label": "Protein Science"}, "281": {"latitude": 49.837982, "discipline": "3", "longitude": 166.640625, "label": "Third World Political Economics"}, "280": {"latitude": 75.497157, "discipline": "13", "longitude": -140.625, "label": "Fault Tolerant Computing"}, "283": {"latitude": 58.447733, "discipline": "3", "longitude": 164.53125, "label": "Sociology"}, "282": {"latitude": 84.541361, "discipline": "1", "longitude": 87.1875, "label": "Public Hospitals"}, "285": {"latitude": 74.775843, "discipline": "6", "longitude": 54.140625, "label": "Bone & Osteoporosis"}, "284": {"latitude": 21.943046, "discipline": "9", "longitude": -28.125, "label": "Horticulture"}, "287": {"latitude": 55.37911, "discipline": "11", "longitude": -66.796875, "label": "Water Treatment"}, "286": {"latitude": 55.37911, "discipline": "6", "longitude": 61.171875, "label": "Radiation Therapy"}, "263": {"latitude": 81.723188, "discipline": "12", "longitude": -104.765625, "label": "Surface Coating Technology"}, "262": {"latitude": 72.60712, "discipline": "6", "longitude": 40.078125, "label": "Molecular Endocrinology"}, "261": {"latitude": 51.179343, "discipline": "3", "longitude": 165.9375, "label": "Political Studies"}, "260": {"latitude": 82.494824, "discipline": "11", "longitude": -83.671875, "label": "Electrochemistry"}, "267": {"latitude": 46.073231, "discipline": "3", "longitude": 165.234375, "label": "International Conflict"}, "266": {"latitude": 54.572062, "discipline": "11", "longitude": -82.265625, "label": "Oil & Natural Gas"}, "265": {"latitude": 65.07213, "discipline": "3", "longitude": 151.875, "label": "Vocational Counseling"}, "264": {"latitude": 23.241346, "discipline": "9", "longitude": 9.140625, "label": "Molecular Biochemical Parasitology"}, "269": {"latitude": 82.214217, "discipline": "2", "longitude": -66.09375, "label": "Applied Catalysis"}, "268": {"latitude": -21.943046, "discipline": "4", "longitude": 164.53125, "label": "Art History"}, "59": {"latitude": 62.593341, "discipline": "6", "longitude": 61.875, "label": "Vascular Surgery"}, "58": {"latitude": 63.548552, "discipline": "3", "longitude": 171.5625, "label": "Business Ethics"}, "55": {"latitude": 59.534318, "discipline": "6", "longitude": 26.015625, "label": "AntiMicrobial Agents"}, "54": {"latitude": 77.617709, "discipline": "2", "longitude": 1.40625, "label": "Pharmaceutical Design"}, "57": {"latitude": 66.51326, "discipline": "3", "longitude": -179.296875, "label": "Decision Support Systems"}, "56": {"latitude": 71.965388, "discipline": "13", "longitude": -157.5, "label": "Systems Software"}, "51": {"latitude": 65.366837, "discipline": "6", "longitude": 49.21875, "label": "Chest & Respiratory"}, "50": {"latitude": 70.140364, "discipline": "6", "longitude": 42.890625, "label": "Obstectrics"}, "53": {"latitude": -15.961329, "discipline": "9", "longitude": -26.015625, "label": "Zoology"}, "52": {"latitude": 72.181804, "discipline": "11", "longitude": -82.265625, "label": "Earthquake Engineering"}, "537": {"latitude": 59.888937, "discipline": "6", "longitude": 63.28125, "label": "Clinical Medicine (Romania)"}, "536": {"latitude": 64.168107, "discipline": "3", "longitude": 168.046875, "label": "Marketing"}, "535": {"latitude": 72.181804, "discipline": "3", "longitude": 162.421875, "label": "Education Psychological Measures"}, "63": {"latitude": 65.366837, "discipline": "5", "longitude": 90.0, "label": "Neurology"}, "533": {"latitude": 69.411242, "discipline": "5", "longitude": 88.59375, "label": "Neurotoxicology"}, "532": {"latitude": 66.51326, "discipline": "5", "longitude": 92.8125, "label": "Sleep"}, "531": {"latitude": 83.111071, "discipline": "6", "longitude": 59.0625, "label": "Public Health"}, "530": {"latitude": 76.184995, "discipline": "6", "longitude": 43.59375, "label": "Hormone Research"}, "539": {"latitude": 78.349411, "discipline": "1", "longitude": 54.140625, "label": "Optometry"}, "538": {"latitude": 82.586106, "discipline": "2", "longitude": -44.296875, "label": "Green Chemistry"}, "115": {"latitude": 80.647035, "discipline": "2", "longitude": -4.921875, "label": "Phytochemistry"}, "114": {"latitude": 66.51326, "discipline": "6", "longitude": 58.359375, "label": "Thoracic Surgery"}, "117": {"latitude": 56.944974, "discipline": "8", "longitude": 5.625, "label": "Food Protection"}, "116": {"latitude": 31.952162, "discipline": "9", "longitude": 16.875, "label": "Tropical Medicine"}, "111": {"latitude": 74.959392, "discipline": "11", "longitude": -116.015625, "label": "Mechanical Design Engineering"}, "110": {"latitude": 67.609221, "discipline": "1", "longitude": 67.5, "label": "Otolaryngology; Laryngoscope"}, "113": {"latitude": -2.811371, "discipline": "9", "longitude": -33.046875, "label": "Biological Conservation"}, "112": {"latitude": -19.973349, "discipline": "4", "longitude": 165.234375, "label": "Classics"}, "119": {"latitude": 69.411242, "discipline": "11", "longitude": -85.078125, "label": "Energy Fuel"}, "118": {"latitude": 75.320025, "discipline": "13", "longitude": -141.328125, "label": "Broadband Communication"}, "429": {"latitude": 23.885838, "discipline": "11", "longitude": -40.78125, "label": "Weed Management"}, "428": {"latitude": 73.82482, "discipline": "13", "longitude": -147.65625, "label": "Computer Networks"}, "534": {"latitude": 70.377854, "discipline": "6", "longitude": 47.109375, "label": "Pediatric Research"}, "421": {"latitude": 75.320025, "discipline": "11", "longitude": -71.71875, "label": "Dyes & Pigments"}, "420": {"latitude": -14.604847, "discipline": "4", "longitude": 164.53125, "label": "Semiotics"}, "423": {"latitude": -4.214943, "discipline": "9", "longitude": -25.3125, "label": "Molecular Ecology"}, "422": {"latitude": 73.428424, "discipline": "6", "longitude": 52.03125, "label": "Drug Safety"}, "425": {"latitude": 70.140364, "discipline": "1", "longitude": 125.15625, "label": "Clinical Psychiatry"}, "424": {"latitude": 56.559482, "discipline": "7", "longitude": 38.671875, "label": "Cytogentics & Genome Mapping"}, "427": {"latitude": 38.272689, "discipline": "11", "longitude": -61.875, "label": "Water Waste"}, "426": {"latitude": -9.102097, "discipline": "10", "longitude": -55.546875, "label": "Paleogeography"}, "308": {"latitude": 78.490552, "discipline": "13", "longitude": -134.296875, "label": "Electrical Networks"}, "309": {"latitude": 21.943046, "discipline": "6", "longitude": 50.625, "label": "Endoscopy"}, "300": {"latitude": 71.524909, "discipline": "6", "longitude": 49.21875, "label": "Atherosclerosis"}, "301": {"latitude": 84.267172, "discipline": "1", "longitude": 82.96875, "label": "Region & Medical Ethids"}, "302": {"latitude": 65.07213, "discipline": "5", "longitude": 115.3125, "label": "Speech Language & Hearing"}, "303": {"latitude": 61.606396, "discipline": "6", "longitude": 38.671875, "label": "Thoracic & Respiratory"}, "304": {"latitude": 47.040182, "discipline": "6", "longitude": 8.4375, "label": "Veterinary Microbiology"}, "305": {"latitude": 32.546813, "discipline": "11", "longitude": -45.0, "label": "Environmental Protection"}, "306": {"latitude": 72.181804, "discipline": "13", "longitude": -150.46875, "label": "Computer Systems Design"}, "307": {"latitude": 25.165173, "discipline": "11", "longitude": -46.40625, "label": "Environmental Polution"}, "229": {"latitude": 82.586106, "discipline": "12", "longitude": -116.015625, "label": "Nuclear Instrumentation"}, "228": {"latitude": 80.178714, "discipline": "12", "longitude": -130.78125, "label": "Simulation"}, "227": {"latitude": 12.554564, "discipline": "11", "longitude": -45.0, "label": "Soil Science"}, "226": {"latitude": 65.366837, "discipline": "1", "longitude": 84.375, "label": "Audiology"}, "225": {"latitude": 74.775843, "discipline": "13", "longitude": -131.484375, "label": "Robotics"}, "224": {"latitude": 70.377854, "discipline": "1", "longitude": 69.609375, "label": "Spine"}, "223": {"latitude": 81.518272, "discipline": "11", "longitude": -120.9375, "label": "Photo-Optics"}, "222": {"latitude": -7.013668, "discipline": "4", "longitude": 161.71875, "label": "Linguistics"}, "221": {"latitude": 80.178714, "discipline": "12", "longitude": -148.359375, "label": "Functional Analysis"}, "220": {"latitude": 52.48278, "discipline": "3", "longitude": 168.75, "label": "Urban Studies"}, "391": {"latitude": -0.703107, "discipline": "4", "longitude": 165.234375, "label": "Asian Studies"}, "390": {"latitude": 78.490552, "discipline": "1", "longitude": 112.5, "label": "Psychiatric Nursing"}, "151": {"latitude": 84.267172, "discipline": "1", "longitude": 82.265625, "label": "BioEthics"}, "150": {"latitude": 69.657086, "discipline": "1", "longitude": 104.0625, "label": "Psychosis; Schizophrenia"}, "153": {"latitude": 77.617709, "discipline": "13", "longitude": -134.296875, "label": "Power Distribution"}, "152": {"latitude": 72.181804, "discipline": "13", "longitude": -144.140625, "label": "Parellel Computing"}, "155": {"latitude": 76.351896, "discipline": "11", "longitude": -83.671875, "label": "Wood"}, "154": {"latitude": 74.402163, "discipline": "1", "longitude": 121.640625, "label": "Gerontology"}, "157": {"latitude": -14.604847, "discipline": "10", "longitude": -62.578125, "label": "Geology & Tectonics"}, "156": {"latitude": 78.490552, "discipline": "12", "longitude": -152.578125, "label": "Discrete Applied Mathematics"}, "159": {"latitude": 74.402163, "discipline": "13", "longitude": -146.953125, "label": "Mobil Networks"}, "158": {"latitude": -14.604847, "discipline": "10", "longitude": -63.984375, "label": "GeoChemistry"}, "399": {"latitude": 56.559482, "discipline": "6", "longitude": 54.140625, "label": "Surgical Oncology"}, "398": {"latitude": 77.767582, "discipline": "13", "longitude": -138.515625, "label": "Power Systems"}, "48": {"latitude": 58.813742, "discipline": "7", "longitude": 23.203125, "label": "Molecular Cell Biology"}, "49": {"latitude": 69.411242, "discipline": "8", "longitude": 4.21875, "label": "Food Chemistry"}, "46": {"latitude": 82.214217, "discipline": "13", "longitude": -122.34375, "label": "Applied Optics"}, "47": {"latitude": 73.2267, "discipline": "11", "longitude": -94.21875, "label": "Nuclear Engineering"}, "44": {"latitude": 63.548552, "discipline": "1", "longitude": 74.53125, "label": "Neurosurgery"}, "45": {"latitude": 67.609221, "discipline": "6", "longitude": 38.671875, "label": "Fertility"}, "42": {"latitude": 73.82482, "discipline": "6", "longitude": 30.9375, "label": "Nutrition"}, "43": {"latitude": 59.534318, "discipline": "3", "longitude": -177.890625, "label": "Finance"}, "40": {"latitude": 65.946472, "discipline": "5", "longitude": 99.84375, "label": "Clinical Neurophysiology"}, "41": {"latitude": 75.497157, "discipline": "1", "longitude": 54.140625, "label": "Opthomology"}, "5": {"latitude": 76.679785, "discipline": "13", "longitude": -140.625, "label": "Signal Processing"}, "489": {"latitude": 75.497157, "discipline": "13", "longitude": -143.4375, "label": "Consumer Electronics"}, "488": {"latitude": -12.554564, "discipline": "4", "longitude": 166.640625, "label": "Economic & Human Biology"}, "487": {"latitude": -10.487812, "discipline": "9", "longitude": -28.125, "label": "Fish Biology"}, "486": {"latitude": 65.946472, "discipline": "3", "longitude": 178.59375, "label": "Operations Management"}, "485": {"latitude": 70.140364, "discipline": "5", "longitude": 81.5625, "label": "Headache"}, "484": {"latitude": 78.767792, "discipline": "13", "longitude": -134.296875, "label": "Antennae; Mobile Radio"}, "483": {"latitude": 81.20142, "discipline": "12", "longitude": -116.015625, "label": "Superconductor Science"}, "482": {"latitude": 81.413933, "discipline": "11", "longitude": -101.953125, "label": "Friction Lubrication & Wear"}, "481": {"latitude": 76.679785, "discipline": "13", "longitude": -140.625, "label": "Circuits"}, "480": {"latitude": 77.31252, "discipline": "11", "longitude": -78.75, "label": "Wood & Wood Components"}, "472": {"latitude": 70.377854, "discipline": "3", "longitude": 130.78125, "label": "Psychosomatic Medicine"}, "473": {"latitude": 80.647035, "discipline": "1", "longitude": 66.09375, "label": "Pharmaco Economics"}, "470": {"latitude": 80.872827, "discipline": "2", "longitude": -70.3125, "label": "Carbon"}, "471": {"latitude": 60.930432, "discipline": "6", "longitude": 46.40625, "label": "Gynecology Oncology"}, "476": {"latitude": 75.320025, "discipline": "12", "longitude": -161.71875, "label": "Cancer Statistics"}, "477": {"latitude": 67.339861, "discipline": "5", "longitude": 118.125, "label": "Consciousness"}, "474": {"latitude": 78.061989, "discipline": "13", "longitude": -149.765625, "label": "Computer Modeling and Animation"}, "475": {"latitude": 84.267172, "discipline": "1", "longitude": 78.75, "label": "Medical Practice"}, "478": {"latitude": 67.339861, "discipline": "1", "longitude": 68.203125, "label": "Otolyngology; Head Neck"}, "479": {"latitude": 70.844673, "discipline": "6", "longitude": 59.0625, "label": "Heart Failure; Catheters"}}; +var SCIMAP_TYPE = { + DISCIPLINE: "DISCIPLINE", + SUBDISCIPLINE: "SUBDISCIPLINE" +}; function createScimapType(map, mapName) { var sciMapTypeOptions = { diff --git a/productMods/js/visualization/mapofscience/DataTableWidget.js b/productMods/js/visualization/mapofscience/DataTableWidget.js index bb685b29..d08f07b8 100644 --- a/productMods/js/visualization/mapofscience/DataTableWidget.js +++ b/productMods/js/visualization/mapofscience/DataTableWidget.js @@ -4,7 +4,7 @@ var DataTableWidget = Class.extend({ widgetType: "MAIN_SCIENCE_AREAS", - currentSelectedFilter: "DISCIPLINE", + currentSelectedFilter: SCIMAP_TYPE.DISCIPLINE, dom: { searchBarParentContainerClass : "searchbar", @@ -67,7 +67,8 @@ var DataTableWidget = Class.extend({ } - }); + }); + me.setupView(); }, hasKey: function(key) { return (this.keyToMarkerManagers.hasOwnProperty(key)); @@ -78,8 +79,9 @@ var DataTableWidget = Class.extend({ }, cleanUp: function() { }, - initView: function() { + }, + setupView: function() { var me = this; @@ -95,7 +97,7 @@ var DataTableWidget = Class.extend({ var scienceAreasTH = $(''); scienceAreasTH.attr("id", "science-areas-th"); - if (this.currentSelectedFilter === 'SUBDISCIPLINE' ) { + if (this.currentSelectedFilter === SCIMAP_TYPE.SUBDISCIPLINE ) { scienceAreasTH.html('Sub-Disciplines'); } else { scienceAreasTH.html('Disciplines'); @@ -123,18 +125,18 @@ var DataTableWidget = Class.extend({ var i = 0; $.each(me.disciplineInfo, function(index, item) { - rowsToInsert[i++]  = 'DISCIPLINE'; -     rowsToInsert[i++]  = '' + item.label + ''; -     rowsToInsert[i++]  = '' + item.publicationCount.toFixed(1) + ''; -     rowsToInsert[i++]  = '' + (100 * (item.publicationCount / me.pubsMapped)).toFixed(1) + ''; + rowsToInsert[i++] = '' + SCIMAP_TYPE.DISCIPLINE + ''; + rowsToInsert[i++] = '' + item.label + ''; + rowsToInsert[i++] = '' + item.publicationCount.toFixed(1) + ''; + rowsToInsert[i++] = '' + (100 * (item.publicationCount / me.pubsMapped)).toFixed(1) + ''; }); $.each(me.subdisciplineInfo, function(index, item) { - rowsToInsert[i++]  = 'SUBDISCIPLINE'; -     rowsToInsert[i++]  = '' + item.label + ''; -     rowsToInsert[i++]  = '' + item.publicationCount.toFixed(1) + ''; -     rowsToInsert[i++]  = '' + (100 * (item.publicationCount / me.pubsMapped)).toFixed(1) + ''; + rowsToInsert[i++] = '' + SCIMAP_TYPE.SUBDISCIPLINE + ''; + rowsToInsert[i++] = '' + item.label + ''; + rowsToInsert[i++] = '' + item.publicationCount.toFixed(1) + ''; + rowsToInsert[i++] = '' + (100 * (item.publicationCount / me.pubsMapped)).toFixed(1) + ''; }); tbody.append(rowsToInsert.join('')); @@ -193,37 +195,62 @@ var DataTableWidget = Class.extend({ me.widget.fnFilter(""); }); - $("." + me.dom.filterOptionClass).live('click', function() { +/* $("." + me.dom.filterOptionClass).live('click', function() { if (!$(this).hasClass(me.dom.activeFilterClass)) { if ($(this).attr('id') === me.dom.subdisciplinesFilterID) { $("#" + me.dom.disciplineFilterID).removeClass(me.dom.activeFilterClass); + + //// $("#science-areas-th").html("Sub-Disciplines"); - me.widget.fnSettings()._iDisplayLength = 10; - me.currentSelectedFilter = "SUBDISCIPLINE"; - + me.currentSelectedFilter = SCIMAP_TYPE.SUBDISCIPLINE; $("a#csv").attr("href", entityMapOfScienceSubDisciplineCSVURL); + //// } else if ($(this).attr('id') === me.dom.disciplineFilterID) { $("#" + me.dom.subdisciplinesFilterID).removeClass(me.dom.activeFilterClass); + + //// $("#science-areas-th").html("Disciplines"); - - me.currentSelectedFilter = "DISCIPLINE"; + me.currentSelectedFilter = SCIMAP_TYPE.DISCIPLINE; me.widget.fnSettings()._iDisplayLength = 13; - $("a#csv").attr("href", entityMapOfScienceDisciplineCSVURL); + //// } $(this).addClass('active-filter'); + //// ACTIVE_DISCIPLINE_SUBDISCIPLINE_FILTER = me.currentSelectedFilter; me.widget.fnDraw(); + //// } - }); + });*/ + }, + + changeFilter: function(filterType) { + if (filterType === SCIMAP_TYPE.SUBDISCIPLINE) { + + $("#science-areas-th").html("Sub-Disciplines"); + me.widget.fnSettings()._iDisplayLength = 10; + me.currentSelectedFilter = SCIMAP_TYPE.SUBDISCIPLINE; + $("a#csv").attr("href", entityMapOfScienceSubDisciplineCSVURL); + + } else { + + $("#science-areas-th").html("Disciplines"); + me.currentSelectedFilter = SCIMAP_TYPE.DISCIPLINE; + me.widget.fnSettings()._iDisplayLength = 13; + $("a#csv").attr("href", entityMapOfScienceDisciplineCSVURL); + + } + + ACTIVE_DISCIPLINE_SUBDISCIPLINE_FILTER = me.currentSelectedFilter; + me.widget.fnDraw(); } }); \ No newline at end of file diff --git a/productMods/js/visualization/mapofscience/GMapAPI.js b/productMods/js/visualization/mapofscience/GMapAPI.js index f073ca39..98b23b5a 100644 --- a/productMods/js/visualization/mapofscience/GMapAPI.js +++ b/productMods/js/visualization/mapofscience/GMapAPI.js @@ -48,8 +48,6 @@ function addClickListener(marker, actionFunction) { return GEVENT.addListener(marker, 'click', actionFunction); } -function removeListeners(handlers) { - $.each(handlers, function(){ - GEVENT.removeListener(this); - }); +function removeListener(handler) { + GEVENT.removeListener(handler); } diff --git a/productMods/js/visualization/mapofscience/InitializeMap.js b/productMods/js/visualization/mapofscience/InitializeMap.js index 4d6d36a9..e2ac4b7e 100644 --- a/productMods/js/visualization/mapofscience/InitializeMap.js +++ b/productMods/js/visualization/mapofscience/InitializeMap.js @@ -1,21 +1,17 @@ /* $This file is distributed under the terms of the license in /doc/license.txt$ */ var map; -var markerManager; -var universityModeMarkerManagers; -var textControl; -var legendControl; var downloader; +var sliderControl; var currentVisMode; var currentController; var visModeControllers = {}; -var dataTableWidgets = {}; var responseContainerID = "map-of-science-response"; var loadingScreenTimeout; /* * This method will setup the options for loading screen & then activate the * loading screen. - * */ + */ function setupLoadingScreen() { $.blockUI.defaults.overlayCSS = { @@ -44,11 +40,10 @@ function setupLoadingScreen() { + ' is now being refreshed. The visualization will load as soon as we are done computing, ' + 'or you can come back in a few minutes.') .css({'cursor': 'pointer'}); - }, 10 * 1000); } -function loadMap() { +function initMap() { var gMap = google.maps; var centerLatLng = new google.maps.LatLng(50, 0); @@ -66,36 +61,21 @@ function loadMap() { var mapName = 'Scimap'; createScimapType(map, mapName); map.setMapTypeId(mapName); -} -function initMapControls() { - //textControl = new TextControl({map: map, divClass: 'time_div'}); - //textControl.setText("1991"); + sliderControl = new SliderControlPanel({ + map:map, + controlPositions: google.maps.ControlPosition.RIGHT_BOTTOM + }); + + downloader = new DownloadManager(); + } function initVisModeController() { - var controller = new EntityVisModeController(map); + var controller = new EntityVisModeController(map, sliderControl); visModeControllers[controller.visMode] = controller; switchVisMode(controller.visMode); -} - -function initDataTableWidget() { - var widget = new DataTableWidget(); - dataTableWidgets[widget.widgetType] = widget; -} - -function initMarkers() { - downloader = new DownloadManager(); - loadMarkers(ENTITY_VIS_MODE, scienceMapDataURL, false); -} - -function initMap() { - setupLoadingScreen(); - loadMap(); - initMapControls(); - initVisModeController(); - initDataTableWidget(); - initMarkers(); + currentController.loadData(scienceMapDataURL, false); } function helper() { @@ -104,5 +84,7 @@ function helper() { /* Using .load instead of .ready due to issue with IE and Google Maps API */ $(window).load(function() { + setupLoadingScreen(); initMap(); + initVisModeController(); }); \ No newline at end of file diff --git a/productMods/js/visualization/mapofscience/MarkerManager.js b/productMods/js/visualization/mapofscience/MarkerManager.js index cf8ec836..ecaca7e3 100644 --- a/productMods/js/visualization/mapofscience/MarkerManager.js +++ b/productMods/js/visualization/mapofscience/MarkerManager.js @@ -12,6 +12,13 @@ var MarkerManager = Class.extend({ addMarker: function(key, marker) { this.keyToMarker[key] = marker; }, + length: function() { + var size = 0; + for (var key in this.keyToMarker) { + if (this.keyToMarker.hasOwnProperty(key)) size++; + } + return size; + }, getMarker: function(key) { return this.keyToMarker[key]; }, @@ -29,6 +36,7 @@ var MarkerManager = Class.extend({ }); }, addMarkersToMap: function() { +// console.log(this.keyToMarker); $.each(this.keyToMarker, function(i, marker) { marker.addToMap(); }); @@ -79,6 +87,37 @@ ScimapMarkerManager = MarkerManager.extend({ marker.setSize(me.sizeCodingFunc(marker.getValue())); marker.setColor(me.colorStrategy.getColor(key)); } + }, + display: function(numberOfMarkers) { + $.each(this.keyToMarker, function(i, marker) { + if (i <= numberOfMarkers) { + marker.show(); + } else { + marker.hide(); + } + }); + }, + mouseIn: function(key) { + var marker = this.getMarker(key); + if (marker) { + marker.focus(); + } + }, + mouseInAll: function() { + $.each(this.keyToMarker, function(i, marker) { + marker.focus(); + }); + }, + mouseIn: function(key) { + var marker = this.getMarker(key); + if (marker) { + marker.unfocus(); + } + }, + mouseOutAll: function() { + $.each(this.keyToMarker, function(i, marker) { + marker.unfocus(); + }); } }); diff --git a/productMods/js/visualization/mapofscience/Polygon.js b/productMods/js/visualization/mapofscience/Polygon.js index a925f14f..d0c84e52 100644 --- a/productMods/js/visualization/mapofscience/Polygon.js +++ b/productMods/js/visualization/mapofscience/Polygon.js @@ -1,3 +1,5 @@ +var INFO_WINDOW = createInfoWindow("", 300); + /* $This file is distributed under the terms of the license in /doc/license.txt$ */ var Polygon = Class.extend({ init : function(options) { @@ -21,8 +23,8 @@ var Polygon = Class.extend({ this.registerEvents(); }, removeFromMap : function() { - this.polygon.setMap(null); this.unregisterEvents(); + this.polygon.setMap(null); }, show : function() { this.polygon.setMap(this.options.map); @@ -38,16 +40,28 @@ var Polygon = Class.extend({ setTitle : function(title) { this.polygon.title = title; }, + setOptions: function(options) { + this.polygon.setOptions(options); + }, + registerEvent : function(handler) { + var me = this; + if (me.handlers == null) { + me.handlers = new Array(); + } + me.handlers.push(handler); + }, + unregisterEvent : function(handler) { + if (this.handlers[handler]) { + removeListener(handler); + delete(this.handlers[handler]); + } + }, registerEvents : function() { - var handlers = new Array(); - var polygon = this.polygon; - handlers.push(addClickListener(polygon, function() { - updateIFrame(this.url); - })); - this.handlers = handlers; }, unregisterEvents : function() { - removeListeners(this.handlers); + $.each(this.handlers, function(){ + removeListener(this); + }); this.handlers = null; } }); \ No newline at end of file diff --git a/productMods/js/visualization/mapofscience/ScimapWidget.js b/productMods/js/visualization/mapofscience/ScimapWidget.js new file mode 100644 index 00000000..a7567b06 --- /dev/null +++ b/productMods/js/visualization/mapofscience/ScimapWidget.js @@ -0,0 +1,139 @@ +/* $This file is distributed under the terms of the license in /doc/license.txt$ */ + +var DEFAULT_SLIDER_VALUE = 20; + +var ScimapWidget = Class.extend({ + init: function(map, sliderControl) { + this.activeManager = null; + this.isUnloaded = true; + this.map = map; + this.sliderControl = sliderControl; + this.initView(); + }, + initView: function(){ + var me = this; + me.initMarkerManagers(); + me.sliderControl.setChangeEventHandler(function(event, ui) { + me.updateDisplayedMarkers(ui.value); + }); + me.show(SCIMAP_TYPE.DISCIPLINE); + }, + initMarkerManagers: function() { + if (this.keyToMarkerManagers == null) { + var managers = {}; + + // Create discipline Marker Manager + managers[SCIMAP_TYPE.DISCIPLINE] = new DisciplineMarkerManager( + this.map, + new DisciplineColorStrategy(), + null + ); + + // Create subdiscipline Marker Manager + managers[SCIMAP_TYPE.SUBDISCIPLINE] = new SubdisciplineMarkerManager( + this.map, + new SubdisciplineColorStrategy(), + null + ); + this.keyToMarkerManagers = managers; + } + }, + needLoaded: function(){ + return this.isUnloaded; + }, + loadJsonData: function(data) { + var me = this; + me.uri = data.uri; + me.label = data.label; + me.pubsWithNoJournals = data.pubsWithNoJournals; + me.pubsWithInvalidJournals = data.pubsWithInvalidJournals; + me.pubsMapped = data.pubsMapped; + + $.each(this.keyToMarkerManagers, function(key, manager) { + // Need to create the AreaSizeCoding function + manager.setSizeCoder(new CircleSizeCoder({ + scaler: new Scaler({ maxValue: me.pubsMapped }) + })); + //markerManager.setSiseCodingFunction(new AreaSizeCoding(0, data.pubsMapped)); + $.each(data.subdisciplineActivity, function(subdiscipline, density) { + + // Create marker and add it to manager + var marker = manager.createMarker(subdiscipline, density); + + }); // end each subdisciplineActivity + }); // end each markerManagers + me.updateMap(); + this.isUnloaded = false; + }, + mouseIn: function(key, childKey) { + var manager = this.getMarkerManager(key); + // Focus if only it is an active manager + if (manager == this.activeManager) { + // Focus all if no childKey is given + if (childKey) { + manager.mouseIn(childKey); + } else { + manager.mouseInAll(); + } + } + }, + mouseOut: function(key, childKey) { + var manager = this.getMarkerManager(key); + // Focus if only it is an active manager + if (manager == this.activeManager) { + // Unfocus all if no childKey is given + if (childKey) { + manager.mouseOut(childKey); + } else { + manager.mouseOutAll(); + } + } + }, + getMarkerManager: function(key) { + return this.keyToMarkerManagers[key]; + }, + hasKey: function(key) { + return (this.keyToMarkerManagers.hasOwnProperty(key)); + }, + show: function(key) { + var manager = this.getMarkerManager(key); + if (manager) { + this._switchActiveManager(manager); + } + }, + hide: function(key) { + var manager = this.getMarkerManager(key); + if (this.activeManager == manager) { + this.cleanup(); + } + }, + _switchActiveManager: function(manager) { + if (this.activeManager != manager) { + this.cleanUp(); + manager.addMarkersToMap(); + this.activeManager = manager; + this.updateMap(); + } + }, + cleanUp: function() { + if (this.activeManager) { + this.activeManager.removeMarkersFromMap(); + } + }, + updateDisplayedMarkers: function(numberOfMarkers) { + this.activeManager.display(numberOfMarkers); + }, + updateMap: function() { + var manager = this.activeManager; + if (manager) { + var length = manager.length(); + var slider = this.sliderControl; + slider.setMin(Math.min(1, length)); + slider.setMax(length); + slider.setValue(Math.min(DEFAULT_SLIDER_VALUE, length)); + } + }, + changeFilter: function(filterType) { + this.show(filterType); + } +}); \ No newline at end of file diff --git a/productMods/js/visualization/mapofscience/VisCommonControl.js b/productMods/js/visualization/mapofscience/VisCommonControl.js index 20c03dc2..648ecad0 100644 --- a/productMods/js/visualization/mapofscience/VisCommonControl.js +++ b/productMods/js/visualization/mapofscience/VisCommonControl.js @@ -33,39 +33,3 @@ function switchVisMode(visMode) { } return } - -function loadMarkers(visMode, url, sync) { - - // Download data from server and add to markerManager if not gotten already - var controller = getVisModeController(visMode); - if (controller.needLoaded()) { - if (sync) { - downloader.downloadAndWait(url, function(data) { - loadJSONToMarkerManager(data, visMode); - loadJSONToDataTableWidget(data); - }); - } else { - downloader.download(url, function(data) { - loadJSONToMarkerManager(data, visMode); - loadJSONToDataTableWidget(data); - }); - } - } // end if -} - -function loadJSONToMarkerManager(data, visMode) { - if (data) { - var controller = getVisModeController(visMode); - controller.loadJsonData(data[0]); - } -} - -function loadJSONToDataTableWidget(data) { - if (data) { - var widget = dataTableWidgets["MAIN_SCIENCE_AREAS"]; - widget.loadJsonData(data[0]); - widget.initView(); - - $("#" + responseContainerID).unblock(); - } -} diff --git a/productMods/js/visualization/mapofscience/VisModeControllers.js b/productMods/js/visualization/mapofscience/VisModeControllers.js index 3a68408e..4d838cc0 100644 --- a/productMods/js/visualization/mapofscience/VisModeControllers.js +++ b/productMods/js/visualization/mapofscience/VisModeControllers.js @@ -2,88 +2,91 @@ var ENTITY_VIS_MODE = "ENTITY"; var EntityVisModeController = Class.extend({ - init: function(map) { - this.keyToMarkerManagers = {}; - this.activeManager = null; + init: function(map, sliderControl) { this.visMode = ENTITY_VIS_MODE; this.isUnloaded = true; - this.map = map; - this.initMarkerManagers(map); + this.initWidgets(map, sliderControl); }, - initMarkerManagers: function(map) { - var managers = this.keyToMarkerManagers; + initFilter: function() { - // Create discipline Marker Manager - managers['discipline'] = new DisciplineMarkerManager( - map, - new DisciplineColorStrategy(), - null - ); + var dom = { + disciplineFilterID: "discipline-filter", + subdisciplinesFilterID: "subdisciplines-filter", + filterOptionClass: "filter-option", + activeFilterClass: "active-filter" + }, - // Create subdiscipline Marker Manager - managers['subdiscipline'] = new SubdisciplineMarkerManager( - map, - new SubdisciplineColorStrategy(), - null - ); + $("." + dom.filterOptionClass).live('click', function() { + if (!$(this).hasClass(dom.activeFilterClass)) { + if ($(this).attr('id') === dom.subdisciplinesFilterID) { + $("#" + dom.disciplineFilterID).removeClass(dom.activeFilterClass); + $.each(this.widgets, function(i, widget) { + widget.changeFilter(SCIMAP_TYPE.SUBDISCIPLINE); + }); + + } else if ($(this).attr('id') === dom.disciplineFilterID) { + $("#" + dom.subdisciplinesFilterID).removeClass(dom.activeFilterClass); + $.each(this.widgets, function(i, widget) { + widget.changeFilter(SCIMAP_TYPE.DISCIPLINE); + }); + } + + $(this).addClass('active-filter'); + } + }); }, - initView: function(){ - this.show('subdiscipline'); + initWidgets: function(map, sliderControl) { + var widgets = {}; + widgets['scimap'] = new ScimapWidget(map, sliderControl); + widgets['sci_area_table'] = new DataTableWidget(); + + this.widgets = widgets; }, - needLoaded: function(){ + needLoaded: function() { return this.isUnloaded; }, - loadJsonData: function(data) { + initView: function() { + $.each(this.widgets, function(i, widget) { + widget.initView(); + }); + }, + loadData: function(url, sync) { + + // Download data from server and add to markerManager if not gotten already var me = this; - me.uri = data.uri; - me.label = data.label; - me.pubsWithNoJournals = data.pubsWithNoJournals; - me.pubsWithInvalidJournals = data.pubsWithInvalidJournals; - me.pubsMapped = data.pubsMapped; - - $.each(this.keyToMarkerManagers, function(key, manager) { - // Need to create the AreaSizeCoding function - manager.setSizeCoder(new CircleSizeCoder({ - scaler: new Scaler({ maxValue: me.pubsMapped }) - })); - //markerManager.setSiseCodingFunction(new AreaSizeCoding(0, data.pubsMapped)); - $.each(data.subdisciplineActivity, function(subdiscipline, density) { - - // Create marker and add it to manager - var marker = manager.createMarker(subdiscipline, density); - - if (isActiveVisMode(me.visMode) && manager == me.activeManager) { - marker.show(); - } - }); // end each subdisciplineActivity - }); // end each markerManagers - - this.isUnloaded = false; + if (me.isUnloaded) { + if (sync) { + downloader.downloadAndWait(url, function(data) { + me.loadJsonData(me, data[0]); + }); + } else { + downloader.download(url, function(data) { + me.loadJsonData(me, data[0]); + }); + } + } // end if }, - getMarkerManager: function(key) { - return this.keyToMarkerManagers[key]; - }, - hasKey: function(key) { - return (this.keyToMarkerManagers.hasOwnProperty(key)); + loadJsonData: function(me, data) { + $.each(me.widgets, function(i, widget) { + widget.loadJsonData(data); + }); + me.isUnloaded = false; + $("#" + responseContainerID).unblock(); }, + // key can be discippline or subdiscipline show: function(key) { - var manager = this.getMarkerManager(key); - var activeManager = this.activeManager; - if (activeManager != manager) { - this.cleanUp(); - manager.addMarkersToMap(); - } - this.activeManager = manager; + $.each(this.widgets, function(i, widget) { + widget.show(key); + }); }, hide: function(key) { - var manager = this.getMarkerManager(key); - if (this.activeManager == manager) { - this.cleanup(); - } + $.each(this.widgets, function(i, widget) { + widget.hide(key); + }); }, cleanUp: function() { - if (this.activeManager) { - this.activeManager.removeMarkersFromMap(); - } + $.each(this.widgets, function(i, widget) { + widget.cleanUp(key); + }); } }); \ No newline at end of file diff --git a/productMods/templates/freemarker/visualization/mapOfScience/mapOfScienceSetup.ftl b/productMods/templates/freemarker/visualization/mapOfScience/mapOfScienceSetup.ftl index be79c710..3aecb8b8 100644 --- a/productMods/templates/freemarker/visualization/mapOfScience/mapOfScienceSetup.ftl +++ b/productMods/templates/freemarker/visualization/mapOfScience/mapOfScienceSetup.ftl @@ -59,12 +59,14 @@ ${scripts.add('', '', '', + '', '', '', '', '', '', '', + '', '', '', '',