Add sub-entity tables for Map of Science comparison
Remove street view from Map of Science Improve table UI
This commit is contained in:
parent
61fc9c6d5b
commit
fb89277658
12 changed files with 359 additions and 64 deletions
|
@ -33,6 +33,19 @@
|
||||||
height: 480px;
|
height: 480px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#subEntityTableArea {
|
||||||
|
clear: both;
|
||||||
|
width: 100%;
|
||||||
|
padding-top:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subEntityTable {
|
||||||
|
width: 32%;
|
||||||
|
padding-top:5px;
|
||||||
|
padding-right: 8px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
#percent-mapped-info {
|
#percent-mapped-info {
|
||||||
float:right;
|
float:right;
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -117,9 +130,33 @@ a.clear-selected-entities {
|
||||||
margin-left: 9px;
|
margin-left: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.drillDownIcon {
|
||||||
|
width:25px;
|
||||||
|
margin-left: 9px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.science-areas-filter {
|
.science-areas-filter {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.organization-header {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.suborganization-title {
|
||||||
|
vertical-align: middle;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mapped-result {
|
||||||
|
font-size: 0.9em;
|
||||||
|
font-weight: bold;
|
||||||
|
float: right;
|
||||||
|
padding-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
/* search in table */
|
/* search in table */
|
||||||
|
|
||||||
|
@ -179,7 +216,12 @@ hr.subtle-hr {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.datatable-table tbody tr {
|
.entity-datatable-table {
|
||||||
|
font-size: 0.9em;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.datatable-table tbody tr {
|
||||||
border-top: 3px solid;
|
border-top: 3px solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,6 +270,19 @@ a.map-of-science-links {
|
||||||
font-size: 0.81em;
|
font-size: 0.81em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.subpaginatedtabs {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 0.81em;
|
||||||
|
float:right;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subpaginatedtabs span {
|
||||||
|
padding-right: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #2485AE;
|
||||||
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------> */
|
/* --------------------------------------------------------------> */
|
||||||
/* SPECIAL STYLES FOR THE error */
|
/* SPECIAL STYLES FOR THE error */
|
||||||
/* --------------------------------------------------------------> */
|
/* --------------------------------------------------------------> */
|
||||||
|
|
|
@ -13,9 +13,10 @@ var ComparisonDataTableWidget = Class.extend({
|
||||||
activeFilterClass: "comparison-active-filter",
|
activeFilterClass: "comparison-active-filter",
|
||||||
filterInfoIconClass: "comparisonFilterInfoIcon"
|
filterInfoIconClass: "comparisonFilterInfoIcon"
|
||||||
},
|
},
|
||||||
init: function(sciMapWidget) {
|
init: function(sciMapWidget, entityTablesWidget) {
|
||||||
var me = this;
|
var me = this;
|
||||||
me.sciMapWidget = sciMapWidget;
|
me.sciMapWidget = sciMapWidget;
|
||||||
|
me.entityTablesWidget = entityTablesWidget;
|
||||||
me.widgetType = "COMPARISON_SCIENCE_AREAS";
|
me.widgetType = "COMPARISON_SCIENCE_AREAS";
|
||||||
me.currentSelectedFilter = COMPARISON_TYPE.ORGANIZATION;
|
me.currentSelectedFilter = COMPARISON_TYPE.ORGANIZATION;
|
||||||
me.widget = '';
|
me.widget = '';
|
||||||
|
@ -90,7 +91,7 @@ var ComparisonDataTableWidget = Class.extend({
|
||||||
scienceAreasTH.html('Person');
|
scienceAreasTH.html('Person');
|
||||||
}
|
}
|
||||||
|
|
||||||
var activityCountTH = $('<th>');
|
var activityCountTH = $('<th width="53">');
|
||||||
activityCountTH.html('# of pubs.');
|
activityCountTH.html('# of pubs.');
|
||||||
activityCountTH.attr("id", "activity-count-column");
|
activityCountTH.attr("id", "activity-count-column");
|
||||||
|
|
||||||
|
@ -112,7 +113,7 @@ var ComparisonDataTableWidget = Class.extend({
|
||||||
rowsToInsert[i++] = '<tr id="' + index + '" style="color: grey;"><td>' + item.type + '</td>';
|
rowsToInsert[i++] = '<tr id="' + index + '" style="color: grey;"><td>' + item.type + '</td>';
|
||||||
rowsToInsert[i++] = '<td><input class="chk" type="checkbox" value="' + index + '"/></td>';
|
rowsToInsert[i++] = '<td><input class="chk" type="checkbox" value="' + index + '"/></td>';
|
||||||
rowsToInsert[i++] = '<td>' + item.label + '</td>';
|
rowsToInsert[i++] = '<td>' + item.label + '</td>';
|
||||||
rowsToInsert[i++] = '<td>' + item.pubs.toFixed(2) + '</td></tr>';
|
rowsToInsert[i++] = '<td>' + item.pubs + '</td></tr>';
|
||||||
});
|
});
|
||||||
|
|
||||||
tbody.append(rowsToInsert.join(''));
|
tbody.append(rowsToInsert.join(''));
|
||||||
|
@ -202,19 +203,10 @@ var ComparisonDataTableWidget = Class.extend({
|
||||||
createToolTip($("#comparisonSearchInfoIcon"), $("#comparisonSearchInfoTooltipText").html(), "topLeft");
|
createToolTip($("#comparisonSearchInfoIcon"), $("#comparisonSearchInfoTooltipText").html(), "topLeft");
|
||||||
|
|
||||||
/* Create csv download button */
|
/* Create csv download button */
|
||||||
console.log(comparisonScienceMapCsvDataUrlPrefix + me.uri);
|
|
||||||
var csvButton = '<hr class="subtle-hr"/><div id="main-science-areas-table-footer"><a href="' +
|
var csvButton = '<hr class="subtle-hr"/><div id="main-science-areas-table-footer"><a href="' +
|
||||||
comparisonScienceMapCsvDataUrlPrefix + me.uri +
|
comparisonScienceMapCsvDataUrlPrefix + me.uri +
|
||||||
'" class="map-of-science-links">Save All as CSV</a></div>';
|
'" class="map-of-science-links">Save All as CSV</a></div>';
|
||||||
me.tableDiv.append(csvButton);
|
me.tableDiv.append(csvButton);
|
||||||
|
|
||||||
/* Create mapping statistic result */
|
|
||||||
var totalPublications = me.pubsWithNoJournals + me.pubsWithInvalidJournals + me.pubsMapped;
|
|
||||||
$("#mapped-publications").text(addCommasToNumber(me.pubsMapped));
|
|
||||||
$("#percent-mapped-info").show();
|
|
||||||
$("#percent-mapped").text((100 * me.pubsMapped / totalPublications).toFixed(2));
|
|
||||||
$("#total-publications").text(addCommasToNumber(totalPublications));
|
|
||||||
|
|
||||||
},
|
},
|
||||||
changeFilter: function(filterType) {
|
changeFilter: function(filterType) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
@ -232,7 +224,6 @@ var ComparisonDataTableWidget = Class.extend({
|
||||||
ACTIVE_DISCIPLINE_SUBDISCIPLINE_FILTER = me.currentSelectedFilter;
|
ACTIVE_DISCIPLINE_SUBDISCIPLINE_FILTER = me.currentSelectedFilter;
|
||||||
|
|
||||||
if (me.widget) {
|
if (me.widget) {
|
||||||
me.widget.fnSettings()._iDisplayLength = 10;
|
|
||||||
me.widget.fnDraw();
|
me.widget.fnDraw();
|
||||||
// load one item if no item is selected. Need to be improved
|
// load one item if no item is selected. Need to be improved
|
||||||
if ($("input:checkbox[class=chk]:checked").length == 0) {
|
if ($("input:checkbox[class=chk]:checked").length == 0) {
|
||||||
|
@ -253,15 +244,18 @@ var ComparisonDataTableWidget = Class.extend({
|
||||||
// Download data from server and add to markerManager if not gotten already
|
// Download data from server and add to markerManager if not gotten already
|
||||||
var me = this;
|
var me = this;
|
||||||
var url = scienceMapDataPrefix + uri;
|
var url = scienceMapDataPrefix + uri;
|
||||||
downloader.download(url, function(data) {
|
downloader.downloadAndWait(url, function(data) {
|
||||||
me.sciMapWidget.loadEntity(data[0]);
|
me.sciMapWidget.loadEntity(data[0]);
|
||||||
|
|
||||||
// This is ugly, need fix!!!
|
// This is ugly, need fix!!!
|
||||||
$("#comparisonTbody > tr[id=" + index + "]").css("color", me.sciMapWidget.getColor(me.currentSelectedFilter, me.subEntities[index].label));
|
var color = me.sciMapWidget.getColor(me.currentSelectedFilter, me.subEntities[index].label);
|
||||||
|
$("#comparisonTbody > tr[id=" + index + "]").css("color", color);
|
||||||
|
me.entityTablesWidget.loadEntity(data[0], color);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
unloadEntity: function(key, childKey, index) {
|
unloadEntity: function(key, childKey, index) {
|
||||||
this.sciMapWidget.unloadEntity(key, childKey);
|
this.sciMapWidget.unloadEntity(key, childKey);
|
||||||
|
this.entityTablesWidget.unloadEntity(childKey);
|
||||||
|
|
||||||
// This is ugly, need fix!!!
|
// This is ugly, need fix!!!
|
||||||
$("#comparisonTbody > tr[id=" + index + "]").css("color", "grey");
|
$("#comparisonTbody > tr[id=" + index + "]").css("color", "grey");
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
COMPARISON = {
|
COMPARISON = {
|
||||||
"one":{ "name": "one", "color": "#1e90ff"},
|
"one":{ "name": "one", "color": "#99CC00"},
|
||||||
"two":{ "name": "two", "color": "#ff69b4"},
|
"two":{ "name": "two", "color": "#FF9900"},
|
||||||
"three":{ "name": "three", "color": "#32cd32"}
|
"three":{ "name": "three", "color": "#3399FF"}
|
||||||
}
|
}
|
||||||
|
|
||||||
COMPARISON_TYPE = {
|
COMPARISON_TYPE = {
|
||||||
|
@ -127,7 +127,6 @@ var ComparisonScimapWidget = Class.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadJsonData: function(data) {
|
loadJsonData: function(data) {
|
||||||
this.isUnloaded = false;
|
|
||||||
},
|
},
|
||||||
loadEntity: function(data) {
|
loadEntity: function(data) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
@ -192,6 +191,22 @@ var ComparisonScimapWidget = Class.extend({
|
||||||
compositeManager.mouseOut(childKey);
|
compositeManager.mouseOut(childKey);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mouseInNode: function(key, childKey, subdisciplineId) {
|
||||||
|
var compositeManager = this.getCompositeManager(key);
|
||||||
|
// Focus if only it is a valid manager
|
||||||
|
if (compositeManager == this.activeCompositeManager) {
|
||||||
|
// Focus all
|
||||||
|
compositeManager.registry.register(childKey).mouseIn(subdisciplineId);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mouseOutNode: function(key, childKey, subdisciplineId) {
|
||||||
|
var compositeManager = this.getCompositeManager(key);
|
||||||
|
|
||||||
|
// Unfocus if only it is a valid manager
|
||||||
|
if (compositeManager == this.activeCompositeManager) {
|
||||||
|
compositeManager.registry.register(childKey).mouseOut(subdisciplineId);
|
||||||
|
}
|
||||||
|
},
|
||||||
removeManager: function(key, childKey) {
|
removeManager: function(key, childKey) {
|
||||||
var compositeManager = this.getCompositeManager(key);
|
var compositeManager = this.getCompositeManager(key);
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,10 @@ var ScinodePolygon = CirclePolygon.extend({
|
||||||
this.setZIndex(-size);
|
this.setZIndex(-size);
|
||||||
},
|
},
|
||||||
focus: function() {
|
focus: function() {
|
||||||
this.setOptions({strokeWeight: 3.0});
|
this.setOptions({strokeWeight: 1.2, strokeColor: '#000'});
|
||||||
},
|
},
|
||||||
unfocus: function() {
|
unfocus: function() {
|
||||||
this.setOptions({strokeWeight: 1.0});
|
this.setOptions({strokeWeight: 1.0, strokeColor: '#808080'});
|
||||||
},
|
},
|
||||||
setContent: function(content) {
|
setContent: function(content) {
|
||||||
this.polygon.content = content;
|
this.polygon.content = content;
|
||||||
|
@ -49,7 +49,7 @@ function createScinodeMarker(map, label, value, radius, color, latlng) {
|
||||||
var circleOptions = {
|
var circleOptions = {
|
||||||
label: label,
|
label: label,
|
||||||
value: value,
|
value: value,
|
||||||
strokeColor: '#000',
|
strokeColor: '#808080',
|
||||||
strokeOpacity: 1.0,
|
strokeOpacity: 1.0,
|
||||||
strokeWeight: 1.0,
|
strokeWeight: 1.0,
|
||||||
fillColor: color,
|
fillColor: color,
|
||||||
|
|
|
@ -3,15 +3,17 @@
|
||||||
var DataTableWidget = Class.extend({
|
var DataTableWidget = Class.extend({
|
||||||
|
|
||||||
dom: {
|
dom: {
|
||||||
searchBarParentContainerClass : "searchbar",
|
searchBarParentContainerClass: "searchbar",
|
||||||
paginationContainerClass : "paginatedtabs",
|
paginationContainerClass: "paginatedtabs",
|
||||||
containerID: "main-science-areas-table-container",
|
containerID: "main-science-areas-table-container",
|
||||||
footerID: "main-science-areas-table-footer",
|
footerID: "main-science-areas-table-footer",
|
||||||
firstFilterID: "first-filter",
|
firstFilterID: "first-filter",
|
||||||
secondFilterID: "second-filter",
|
secondFilterID: "second-filter",
|
||||||
filterOptionClass: "filter-option",
|
filterOptionClass: "filter-option",
|
||||||
activeFilterClass: "active-filter",
|
activeFilterClass: "active-filter",
|
||||||
filterInfoIconClass: "filterInfoIcon"
|
filterInfoIconClass: "filterInfoIcon",
|
||||||
|
|
||||||
|
percentMappedInfoID: "percent-mapped-info"
|
||||||
},
|
},
|
||||||
init: function(sciMapWidget) {
|
init: function(sciMapWidget) {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
@ -21,6 +23,7 @@ var DataTableWidget = Class.extend({
|
||||||
me.subdisciplineInfo = {};
|
me.subdisciplineInfo = {};
|
||||||
me.disciplineInfo = {};
|
me.disciplineInfo = {};
|
||||||
me.widget = '';
|
me.widget = '';
|
||||||
|
me.percentMappedDiv = $("#" + me.dom.percentMappedInfoID);
|
||||||
me.tableDiv = $('<div />');
|
me.tableDiv = $('<div />');
|
||||||
$("#" + me.dom.containerID).append(this.tableDiv);
|
$("#" + me.dom.containerID).append(this.tableDiv);
|
||||||
|
|
||||||
|
@ -71,9 +74,11 @@ var DataTableWidget = Class.extend({
|
||||||
},
|
},
|
||||||
show: function(key) {
|
show: function(key) {
|
||||||
this.tableDiv.show();
|
this.tableDiv.show();
|
||||||
|
this.percentMappedDiv.show();
|
||||||
},
|
},
|
||||||
hide: function(key) {
|
hide: function(key) {
|
||||||
this.tableDiv.hide();
|
this.tableDiv.hide();
|
||||||
|
this.percentMappedDiv.hide();
|
||||||
},
|
},
|
||||||
cleanView: function() {
|
cleanView: function() {
|
||||||
this.hide();
|
this.hide();
|
||||||
|
@ -233,7 +238,6 @@ var DataTableWidget = Class.extend({
|
||||||
|
|
||||||
var totalPublications = me.pubsWithNoJournals + me.pubsWithInvalidJournals + me.pubsMapped;
|
var totalPublications = me.pubsWithNoJournals + me.pubsWithInvalidJournals + me.pubsMapped;
|
||||||
$("#mapped-publications").text(addCommasToNumber(me.pubsMapped));
|
$("#mapped-publications").text(addCommasToNumber(me.pubsMapped));
|
||||||
$("#percent-mapped-info").show();
|
|
||||||
$("#percent-mapped").text((100 * me.pubsMapped / totalPublications).toFixed(2));
|
$("#percent-mapped").text((100 * me.pubsMapped / totalPublications).toFixed(2));
|
||||||
$("#total-publications").text(addCommasToNumber(totalPublications));
|
$("#total-publications").text(addCommasToNumber(totalPublications));
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
|
var EntityTablesWidget = Class.extend({
|
||||||
|
init: function(sciMapWidget) {
|
||||||
|
this.sciMapWidget = sciMapWidget;
|
||||||
|
this.keyToDataTable = {};
|
||||||
|
this.container = $('<div>');
|
||||||
|
$("#subEntityTableArea").append(this.container);
|
||||||
|
$("#subEntityTableArea").show();
|
||||||
|
},
|
||||||
|
initView: function(key) {
|
||||||
|
this.container.show();
|
||||||
|
},
|
||||||
|
cleanView: function(key) {
|
||||||
|
this.container.hide();
|
||||||
|
},
|
||||||
|
loadJsonData: function(data) {
|
||||||
|
},
|
||||||
|
loadEntity: function(data, color) {
|
||||||
|
var key = data.label;
|
||||||
|
var dataTable = this.getDataTable(key);
|
||||||
|
if (dataTable == null) {
|
||||||
|
dataTable = this._createDataTable(key, data, color);
|
||||||
|
}
|
||||||
|
dataTable.initView();
|
||||||
|
},
|
||||||
|
unloadEntity: function(key) {
|
||||||
|
this._removeDataTable(key);
|
||||||
|
},
|
||||||
|
getDataTable: function(key) {
|
||||||
|
return this.keyToDataTable[key];
|
||||||
|
},
|
||||||
|
_removeDataTable: function(key) {
|
||||||
|
var dataTable = this.getDataTable(key);
|
||||||
|
if (dataTable) {
|
||||||
|
dataTable.cleanView();
|
||||||
|
delete this.keyToDataTable[key];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
_createDataTable: function(key, data, color) {
|
||||||
|
dataTable = new SimpleDataTableWidget({
|
||||||
|
sciMapWidget: this.sciMapWidget,
|
||||||
|
container: this.container
|
||||||
|
});
|
||||||
|
data.color = color;
|
||||||
|
dataTable.loadJsonData(data);
|
||||||
|
this.keyToDataTable[key] = dataTable;
|
||||||
|
return dataTable;
|
||||||
|
}
|
||||||
|
});
|
|
@ -51,6 +51,7 @@ function initMap() {
|
||||||
var mapOptions = {
|
var mapOptions = {
|
||||||
center: centerLatLng,
|
center: centerLatLng,
|
||||||
zoom: 1,
|
zoom: 1,
|
||||||
|
streetViewControl: false,
|
||||||
mapTypeControlOptions: {
|
mapTypeControlOptions: {
|
||||||
mapTypeIds: []
|
mapTypeIds: []
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,165 @@
|
||||||
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
|
var SimpleDataTableWidget = Class.extend({
|
||||||
|
|
||||||
|
dom: {
|
||||||
|
paginationContainerClass : "subpaginatedtabs"
|
||||||
|
},
|
||||||
|
init: function(options) {
|
||||||
|
var me = this;
|
||||||
|
me.options = options;
|
||||||
|
me.sciMapWidget = options.sciMapWidget;
|
||||||
|
me.currentSelectedFilter = COMPARISON_TYPE.SUBDISCIPLINE;
|
||||||
|
me.widget = '';
|
||||||
|
me.tableDiv = $('<div />');
|
||||||
|
me.addToContainer();
|
||||||
|
},
|
||||||
|
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;
|
||||||
|
me.type = data.type;
|
||||||
|
me.color = data.color;
|
||||||
|
me.subdisciplineActivity = data.subdisciplineActivity;
|
||||||
|
me.setupView();
|
||||||
|
},
|
||||||
|
addToContainer: function() {
|
||||||
|
this.options.container.append(this.tableDiv);
|
||||||
|
},
|
||||||
|
removeFromContainer: function() {
|
||||||
|
this.tableDiv.remove();
|
||||||
|
},
|
||||||
|
hasKey: function(key) {
|
||||||
|
return (this.keyToMarkerManagers.hasOwnProperty(key));
|
||||||
|
},
|
||||||
|
show: function(key) {
|
||||||
|
this.tableDiv.show();
|
||||||
|
},
|
||||||
|
hide: function(key) {
|
||||||
|
this.tableDiv.hide();
|
||||||
|
},
|
||||||
|
cleanView: function() {
|
||||||
|
this.removeFromContainer();
|
||||||
|
},
|
||||||
|
initView: function() {
|
||||||
|
this.addToContainer(this.tableDiv);
|
||||||
|
this.show();
|
||||||
|
},
|
||||||
|
setupView: function() {
|
||||||
|
|
||||||
|
var me = this;
|
||||||
|
|
||||||
|
me.tableDiv.addClass("subEntityTable");
|
||||||
|
|
||||||
|
/* Create filter */
|
||||||
|
entityVivoProfileURLPrefix
|
||||||
|
var organizationHeader = $('<div><a class="suborganization-title" href="' +
|
||||||
|
entityVivoProfileURLPrefix + me.uri +'">' +
|
||||||
|
truncateText(me.label, 23) + '</a><a href="' + entityMapOfScienceURLPrefix +
|
||||||
|
me.label.replace(/\s+/g, '') + '"><img class="drillDownIcon" src="' +
|
||||||
|
drillDownIconUrl + '" alt="drill down" title="drill down" /></a></div>');
|
||||||
|
me.tableDiv.append(organizationHeader);
|
||||||
|
|
||||||
|
/* Create table */
|
||||||
|
var table = $('<table>');
|
||||||
|
table.attr('id', 'entityDatatable');
|
||||||
|
table.addClass('entity-datatable-table');
|
||||||
|
|
||||||
|
/* Create table header */
|
||||||
|
var thead = $('<thead>');
|
||||||
|
var tr = $('<tr>');
|
||||||
|
|
||||||
|
/*var levelOfScienceAreaTH = $('<th>');
|
||||||
|
levelOfScienceAreaTH.html('Level of Science Area');*/
|
||||||
|
|
||||||
|
var scienceAreasTH = $('<th>');
|
||||||
|
scienceAreasTH.attr("id", "entity-science-areas-th");
|
||||||
|
scienceAreasTH.html('Sub-Disciplines');
|
||||||
|
|
||||||
|
var activityCountTH = $('<th width="53">');
|
||||||
|
activityCountTH.html('# of pubs.');
|
||||||
|
|
||||||
|
//tr.append(levelOfScienceAreaTH);
|
||||||
|
tr.append(scienceAreasTH);
|
||||||
|
tr.append(activityCountTH);
|
||||||
|
|
||||||
|
thead.append(tr);
|
||||||
|
table.append(thead);
|
||||||
|
|
||||||
|
/* Create tbody and contents */
|
||||||
|
var tbody = $('<tbody>');
|
||||||
|
|
||||||
|
var rowsToInsert = [];
|
||||||
|
var i = 0;
|
||||||
|
|
||||||
|
$.each(me.subdisciplineActivity, function(index, density) {
|
||||||
|
rowsToInsert[i++] = '<tr id="' + index + '">';
|
||||||
|
rowsToInsert[i++] = '<td style="color:' + me.color + ';">' + truncateText(SUBDISCIPLINES[index].label, 20) + '</td>';
|
||||||
|
rowsToInsert[i++] = '<td style="color:' + me.color + ';">' + density.toFixed(1) + '</td></tr>';
|
||||||
|
});
|
||||||
|
|
||||||
|
tbody.append(rowsToInsert.join(''));
|
||||||
|
table.append(tbody);
|
||||||
|
me.tableDiv.append(table);
|
||||||
|
|
||||||
|
/* Register events */
|
||||||
|
table.children("tbody").children("tr").mouseenter(function() {
|
||||||
|
me.sciMapWidget.mouseInNode(me.type, me.label, $(this).attr("id"));
|
||||||
|
});
|
||||||
|
|
||||||
|
table.children("tbody").children("tr").mouseleave(function() {
|
||||||
|
me.sciMapWidget.mouseOutNode(me.type, me.label, $(this).attr("id"));
|
||||||
|
});
|
||||||
|
|
||||||
|
/* Init DataTable object */
|
||||||
|
me.widget = table.dataTable({
|
||||||
|
"sDom": '<"' + me.dom.paginationContainerClass + '"p><"table-separator"><"datatablewrapper"t>',
|
||||||
|
"aaSorting": [
|
||||||
|
[1, "desc"], [0,'asc']
|
||||||
|
],
|
||||||
|
"asStripClasses": [],
|
||||||
|
"aoColumns": [{ "bSearchable": false },
|
||||||
|
{ "bSearchable": false }],
|
||||||
|
"iDisplayLength": 10,
|
||||||
|
"bInfo": true,
|
||||||
|
"bFilter": false,
|
||||||
|
"oLanguage": {
|
||||||
|
"sInfo": "_START_ - _END_ of _TOTAL_",
|
||||||
|
"sInfoEmpty": "No matching science areas found",
|
||||||
|
"sInfoFiltered": ""
|
||||||
|
},
|
||||||
|
"sPaginationType": "gmail_style",
|
||||||
|
"fnDrawCallback": function () {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/* Create csv download button */
|
||||||
|
var csvButton = '<hr class="subtle-hr" /><div id="main-science-areas-table-footer" style="background-color:' + me.color + ';"><a href="' +
|
||||||
|
entityMapOfScienceSubDisciplineCSVURLPrefix + me.uri +
|
||||||
|
'" class="map-of-science-links">Save All as CSV</a></div>';
|
||||||
|
me.tableDiv.append(csvButton);
|
||||||
|
|
||||||
|
/* Create mapping statistic result */
|
||||||
|
var totalPublications = me.pubsWithNoJournals + me.pubsWithInvalidJournals + me.pubsMapped;
|
||||||
|
var mappedText = '<a class="mapped-result" href="' + entityUnmappedJournalsCSVURLPrefix + me.uri + '">' +
|
||||||
|
(100 * me.pubsMapped / totalPublications).toFixed(2) + '% mapped</a>';
|
||||||
|
me.tableDiv.append($(mappedText));
|
||||||
|
me.widget.fnDraw();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function truncateText(text, len) {
|
||||||
|
|
||||||
|
var trunc = text;
|
||||||
|
|
||||||
|
if (text.length > len) {
|
||||||
|
trunc = text.substring(0, len);
|
||||||
|
trunc = trunc.replace(/\w+$/, '') + '<font title="' + text + '">...</font>'
|
||||||
|
}
|
||||||
|
|
||||||
|
return trunc;
|
||||||
|
}
|
|
@ -125,7 +125,8 @@ var ComparisonVisModeController = VisModeController.extend({
|
||||||
initWidgets: function(map) {
|
initWidgets: function(map) {
|
||||||
var widgets = {};
|
var widgets = {};
|
||||||
widgets['scimap'] = new ComparisonScimapWidget(map);
|
widgets['scimap'] = new ComparisonScimapWidget(map);
|
||||||
widgets['sci_area_table'] = new ComparisonDataTableWidget(widgets['scimap']);
|
widgets['entity_area_table'] = new EntityTablesWidget(widgets['scimap']);
|
||||||
|
widgets['sci_area_table'] = new ComparisonDataTableWidget(widgets['scimap'], widgets['entity_area_table']);
|
||||||
|
|
||||||
this.widgets = widgets;
|
this.widgets = widgets;
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ var subOrganizationPublicationTemporalGraphCommonURL = "${subOrganizationPublica
|
||||||
|
|
||||||
var jsonString = '${jsonContent!}';
|
var jsonString = '${jsonContent!}';
|
||||||
var vivoDefaultNamespace = '${vivoDefaultNamespace!}';
|
var vivoDefaultNamespace = '${vivoDefaultNamespace!}';
|
||||||
var organizationLabel = "${organizationLabel}";
|
var organizationLabel = '${organizationLabel}';
|
||||||
var organizationVIVOProfileURL = "${organizationVivoProfileURL}";
|
var organizationVIVOProfileURL = "${organizationVivoProfileURL}";
|
||||||
|
|
||||||
var loadingImageLink = contextPath + "/images/visualization/ajax-loader-indicator.gif";
|
var loadingImageLink = contextPath + "/images/visualization/ajax-loader-indicator.gif";
|
||||||
|
|
|
@ -35,15 +35,19 @@
|
||||||
|
|
||||||
<script language="JavaScript" type="text/javascript">
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
|
||||||
|
var entityVivoProfileURLPrefix = "${urls.base}/individual?uri=";
|
||||||
|
var entityMapOfScienceURLPrefix = "${urls.base}${shortVisualizationURLRoot}/${mapOfScienceVisParam}/";
|
||||||
var contextPath = "${urls.base}";
|
var contextPath = "${urls.base}";
|
||||||
var scienceMapDataPrefix = "${urls.base}${dataVisualizationURLRoot}?vis=${mapOfScienceVisParam}&output=json&uri=";
|
var scienceMapDataPrefix = "${urls.base}${dataVisualizationURLRoot}?vis=${mapOfScienceVisParam}&output=json&uri=";
|
||||||
var scienceMapDataURL = scienceMapDataPrefix + "${entityURI}";
|
var scienceMapDataURL = scienceMapDataPrefix + "${entityURI}";
|
||||||
|
var entityUnmappedJournalsCSVURLPrefix = "${urls.base}${dataVisualizationURLRoot}?vis=${mapOfScienceVisParam}&output=csv&vis_mode=unlocated_journals&uri=";
|
||||||
|
|
||||||
|
var imageFolderPrefix = "${urls.images}/visualization/";
|
||||||
|
var mapOfScienceImageFolderPrefix = imageFolderPrefix + "mapofscience/";
|
||||||
|
var disciplineLabelImageUrlPrefix = mapOfScienceImageFolderPrefix + "labels/";
|
||||||
|
|
||||||
var infoIconUrl = "${urls.images}/iconInfo.png";
|
var infoIconUrl = "${urls.images}/iconInfo.png";
|
||||||
var imageFolderPrefix = "${urls.images}/visualization/";
|
var drillDownIconUrl = "${urls.images}/visualization/mapofscience/vivo-scimap.png";
|
||||||
var mapOfScienceImageFolderPrefix = imageFolderPrefix
|
|
||||||
+ "mapofscience/";
|
|
||||||
var disciplineLabelImageUrlPrefix = mapOfScienceImageFolderPrefix + "labels/";
|
|
||||||
|
|
||||||
var entityLabel = '${entityLabel}';
|
var entityLabel = '${entityLabel}';
|
||||||
|
|
||||||
|
@ -58,6 +62,7 @@ var loadingImageLink = contextPath + "/images/visualization/ajax-loader-indicato
|
||||||
var refreshPageImageLink = contextPath + "/images/visualization/refresh-green.png";
|
var refreshPageImageLink = contextPath + "/images/visualization/refresh-green.png";
|
||||||
|
|
||||||
var comparisonScienceMapCsvDataUrlPrefix = "${urls.base}${dataVisualizationURLRoot}?labelField=label&vis=entity_comparison&uri=";
|
var comparisonScienceMapCsvDataUrlPrefix = "${urls.base}${dataVisualizationURLRoot}?labelField=label&vis=entity_comparison&uri=";
|
||||||
|
var entityMapOfScienceSubDisciplineCSVURLPrefix = "${urls.base}${dataVisualizationURLRoot}?vis=${mapOfScienceVisParam}&output=csv&vis_mode=subdiscipline&&uri="
|
||||||
var entityMapOfScienceDisciplineCSVURL = "${entityMapOfScienceDisciplineCSVURL}";
|
var entityMapOfScienceDisciplineCSVURL = "${entityMapOfScienceDisciplineCSVURL}";
|
||||||
var entityMapOfScienceSubDisciplineCSVURL = "${entityMapOfScienceSubDisciplineCSVURL}";
|
var entityMapOfScienceSubDisciplineCSVURL = "${entityMapOfScienceSubDisciplineCSVURL}";
|
||||||
|
|
||||||
|
@ -87,6 +92,8 @@ ${scripts.add('<script type="text/javascript" src="http://maps.google.com/maps/a
|
||||||
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/ScimapWidget.js"></script>',
|
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/ScimapWidget.js"></script>',
|
||||||
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/DataTableWidget.js"></script>',
|
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/DataTableWidget.js"></script>',
|
||||||
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/ComparisonScimapWidget.js"></script>',
|
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/ComparisonScimapWidget.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/SimpleDataTableWidget.js"></script>',
|
||||||
|
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/EntityTablesWidget.js"></script>',
|
||||||
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/ComparisonDataTableWidget.js"></script>',
|
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/ComparisonDataTableWidget.js"></script>',
|
||||||
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/VisModeControllers.js"></script>',
|
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/VisModeControllers.js"></script>',
|
||||||
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/VisCommonControl.js"></script>',
|
'<script type="text/javascript" src="${urls.base}/js/visualization/mapofscience/VisCommonControl.js"></script>',
|
||||||
|
|
|
@ -17,7 +17,7 @@ corresponding changes in the included Templates. -->
|
||||||
|
|
||||||
<h2 id="header-entity-label" class="hide-dom-on-init"><span><a id="entityMoniker" href="${entityVivoProfileURL}">${entityLabel}</a></span></h2>
|
<h2 id="header-entity-label" class="hide-dom-on-init"><span><a id="entityMoniker" href="${entityVivoProfileURL}">${entityLabel}</a></span></h2>
|
||||||
|
|
||||||
<div id="map-of-science-info" class="hide-dom-on-init"> Explore <span id="mapped-publications" style="font-weight: bold"></span> publications activity across 554 scientific sub-disciplines
|
<div id="map-of-science-info" class="hide-dom-on-init"> Explore <span id="mapped-publications" style="font-weight: bold"></span> publications activity across 554 scientific subdisciplines
|
||||||
<img class="filterInfoIcon" id="imageIconOne" src="${urls.images}/iconInfo.png"
|
<img class="filterInfoIcon" id="imageIconOne" src="${urls.images}/iconInfo.png"
|
||||||
alt="information icon"
|
alt="information icon"
|
||||||
title="" />
|
title="" />
|
||||||
|
@ -34,10 +34,10 @@ corresponding changes in the included Templates. -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="warning-notification" class="ui-state-highlight ui-corner-all" >
|
<div id="warning-notification" class="ui-state-highlight ui-corner-all" >
|
||||||
<a class="ui-notify-close ui-notify-cross" href="#">x</a>
|
<a class="ui-notify-close ui-notify-cross" href="#">x</a>
|
||||||
<span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span>
|
<span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span>
|
||||||
<h1>#{title}</h1>
|
<h1>#{title}</h1>
|
||||||
<p>#{text}</p>
|
<p>#{text}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -53,18 +53,21 @@ corresponding changes in the included Templates. -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="right-column"><div id="map_area"></div>
|
<div id="right-column">
|
||||||
<div id="percent-mapped-info">
|
<div id="map_area"></div>
|
||||||
mapped <span id="percent-mapped"></span>% of <span id="total-publications"></span> publications
|
<div id="percent-mapped-info">
|
||||||
<img class="filterInfoIcon" id="imageIconThree" src="${urls.images}/iconInfo.png"
|
mapped <span id="percent-mapped"></span>% of <span id="total-publications"></span> publications
|
||||||
alt="information icon"
|
<img class="filterInfoIcon" id="imageIconThree" src="${urls.images}/iconInfo.png" alt="information icon" title="" />
|
||||||
title="" />
|
|
||||||
|
|
||||||
<div id="download-unlocated-journal-info">
|
<div id="download-unlocated-journal-info">
|
||||||
<a href="${entityMapOfScienceUnlocatedJournalsCSVURL}">Save Unmapped Publications</a>
|
<a href="${entityMapOfScienceUnlocatedJournalsCSVURL}">Save Unmapped Publications</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div id="subEntityTableArea"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<#-- START TOOLTIP TEXT -->
|
<#-- START TOOLTIP TEXT -->
|
||||||
|
@ -76,33 +79,33 @@ overlaid on the map of science. This particular page shows the publication activ
|
||||||
You can use VIVO's Map of Science visualization to see where ${entityLabel} is active in the world of science -- <em><b>based solely
|
You can use VIVO's Map of Science visualization to see where ${entityLabel} is active in the world of science -- <em><b>based solely
|
||||||
on publications that have been loaded into this VIVO instance.</b></em><br /><br />
|
on publications that have been loaded into this VIVO instance.</b></em><br /><br />
|
||||||
|
|
||||||
Overlaid circles are larger if ${entityLabel} has many publications in that sub-discipline, and are smaller if ${entityLabel} has
|
Overlaid circles are larger if ${entityLabel} has many publications in that subdiscipline, and are smaller if ${entityLabel} has
|
||||||
fewer publications in that sub-discipline.<br /><br />
|
fewer publications in that subdiscipline.<br /><br />
|
||||||
|
|
||||||
Circles are overlaid on the Map of Science itself, which is made of 554 interconnected sub-disciplines, shown as grey dots here.
|
Circles are overlaid on the Map of Science itself, which is made of 554 interconnected subdisciplines, shown as grey dots here.
|
||||||
A sub-discipline is defined as a cluster of journals. The Map of Science groups over 16,000 journals into 554 sub-disciplines using
|
A subdiscipline is defined as a cluster of journals. The Map of Science groups over 16,000 journals into 554 subdisciplines using
|
||||||
similarities in their lists of references and key terms. Sub-disciplines that are especially similar to one another are interconnected,
|
similarities in their lists of references and key terms. Subdisciplines that are especially similar to one another are interconnected,
|
||||||
and will be closer to one another on the map.
|
and will be closer to one another on the map.
|
||||||
<br /><br />
|
<br /><br />
|
||||||
For more information on this and other maps of science, see <a href='http://mapofscience.com'>http://mapofscience.com</a> or
|
For more information on this and other maps of science, see <a href='http://mapofscience.com'>http://mapofscience.com</a> or
|
||||||
<a href='http://scimaps.org'>http://scimaps.org</a></div>
|
<a href='http://scimaps.org'>http://scimaps.org</a></div>
|
||||||
|
|
||||||
<div id="toolTipTwo" style="display:none;">
|
<div id="toolTipTwo" style="display:none;">
|
||||||
${entityLabel}'s publication activity can be categorized into 13 disciplines or 554 sub-disciplines on the map of science.
|
${entityLabel}'s publication activity can be categorized into 13 disciplines or 554 subdisciplines on the map of science.
|
||||||
<br /><br />
|
<br /><br />
|
||||||
The map of science is divided into 13 disciplines, each of which has its own area on the map, as well as its own color.
|
The map of science is divided into 13 disciplines, each of which has its own area on the map, as well as its own color.
|
||||||
Each of these disciplines contains multiple sub-disciplines. You can hover over a discipline in the table below to show
|
Each of these disciplines contains multiple subdisciplines. You can hover over a discipline in the table below to show
|
||||||
which overlaid circles it corresponds to on the map.
|
which overlaid circles it corresponds to on the map.
|
||||||
<br /><br />
|
<br /><br />
|
||||||
Each grey dot on the map represents one of the 554 sub-disciplines. A sub-discipline is defined as a cluster of journals.
|
Each grey dot on the map represents one of the 554 subdisciplines. A subdiscipline is defined as a cluster of journals.
|
||||||
We grouped over 16,000 journals into 554 disciplines using similarities in their lists of references and key terms.
|
We grouped over 16,000 journals into 554 disciplines using similarities in their lists of references and key terms.
|
||||||
Sub-disciplines that are especially similar to one another are connected by lines, and are closer to one another on the map.
|
Subdisciplines that are especially similar to one another are connected by lines, and are closer to one another on the map.
|
||||||
You can hover over a sub-discipline in the table below to show which overlaid circle it corresponds to on the map.
|
You can hover over a subdiscipline in the table below to show which overlaid circle it corresponds to on the map.
|
||||||
|
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
In the table below, <b># of pubs.</b> column indicates number of publications that fall under a particular field (sub-discipline or
|
In the table below, <b># of pubs.</b> column indicates number of publications that fall under a particular field (subdiscipline or
|
||||||
discipline). Sometimes this number will be fractional. This happens when a journal in which the publication was published is associated
|
discipline). Sometimes this number will be fractional. This happens when a journal in which the publication was published is associated
|
||||||
with more than one (sub)discipline. In these cases, the publication score is fractionally mapped based on the weight scores
|
with more than one (sub)discipline. In these cases, the publication score is fractionally mapped based on the weight scores
|
||||||
of the journal.<br /><br />
|
of the journal.<br /><br />
|
||||||
|
@ -111,7 +114,7 @@ of the journal.<br /><br />
|
||||||
-->
|
-->
|
||||||
|
|
||||||
The table below summarizes this institution's body of publications as plotted on the map of science.
|
The table below summarizes this institution's body of publications as plotted on the map of science.
|
||||||
Each row corresponds to a field (discipline or sub-discipline) on the map.
|
Each row corresponds to a field (discipline or subdiscipline) on the map.
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
The <b># of pubs.</b> column shows how many of the publications were mapped to each field.
|
The <b># of pubs.</b> column shows how many of the publications were mapped to each field.
|
||||||
|
@ -134,8 +137,8 @@ may need to be cleaned up before they are recognized. You may contact a VIVO sys
|
||||||
concern.</div>
|
concern.</div>
|
||||||
|
|
||||||
<div id="searchInfoTooltipText" style="display:none;">
|
<div id="searchInfoTooltipText" style="display:none;">
|
||||||
<!-- Search for specific sub-discipline (or discipline) label in the first column of the table. -->
|
<!-- Search for specific subdiscipline (or discipline) label in the first column of the table. -->
|
||||||
List only sub-disciplines (or disciplines) whose name contains this text.
|
List only subdisciplines (or disciplines) whose name contains this text.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -143,8 +146,8 @@ concern.</div>
|
||||||
|
|
||||||
<div id="comparisonToolTipTwo" style="display:none;">
|
<div id="comparisonToolTipTwo" style="display:none;">
|
||||||
The organizations or people listed below are only those which are directly beneath ${entityLabel} in the
|
The organizations or people listed below are only those which are directly beneath ${entityLabel} in the
|
||||||
organization hierarchy. You may 'drill down' to see the organizations or people below a given sub-organization
|
organization hierarchy. You may 'drill down' to see the organizations or people below a given suborganization
|
||||||
by selecting the chart icon next to a selected sub-organization's name below the graph on the right.
|
by selecting the chart icon next to a selected suborganization's name below the graph on the right.
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
The <b># of pubs.</b> column shows how many of the publications were mapped to each field.
|
The <b># of pubs.</b> column shows how many of the publications were mapped to each field.
|
||||||
|
@ -157,7 +160,7 @@ The <b>% activity</b> column shows what proportion of the publications were mapp
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="comparisonSearchInfoTooltipText" style="display:none;">
|
<div id="comparisonSearchInfoTooltipText" style="display:none;">
|
||||||
<!-- Search for specific sub-discipline (or discipline) label in the first column of the table. -->
|
<!-- Search for specific subdiscipline (or discipline) label in the first column of the table. -->
|
||||||
List only organizations (or people) whose name contains this text.
|
List only organizations (or people) whose name contains this text.
|
||||||
</div>
|
</div>
|
||||||
<#-- END TOOLTIP TEXT -->
|
<#-- END TOOLTIP TEXT -->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue