1. Modified javascript for person level page to adapt tp freemarker changes.
2. Abstracted out the table generating code for sparklines out. This gives us flexibility to put the table wherever we want in the template. 3. Made changes to coauth person l;evel page to display all the content. TThe data is all there with links. 4. Adapted person pub count & coauth sparklines to adapt to new table generating template. 5. Changed coauth vis code gen to include a missing data value. 6. Fixed a bug in person level req handler.
This commit is contained in:
parent
428c8a24ce
commit
7568601dc4
7 changed files with 576 additions and 557 deletions
|
@ -294,6 +294,7 @@ function createTable(tableID, tableContainer, tableData) {
|
||||||
|
|
||||||
table.prependTo('#' + tableContainer);
|
table.prependTo('#' + tableContainer);
|
||||||
$('#' + tableContainer + " #loadingData").remove();
|
$('#' + tableContainer + " #loadingData").remove();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//renderStatsOnNodeClicked, CoRelations, noOfCoRelations
|
//renderStatsOnNodeClicked, CoRelations, noOfCoRelations
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
var data = new google.visualization.DataTable();
|
var data = new google.visualization.DataTable();
|
||||||
data.addColumn('string', 'Year');
|
data.addColumn('string', 'Year');
|
||||||
data.addColumn('number', 'Unique co-authors');
|
data.addColumn('number', 'Unique co-authors');
|
||||||
data.addRows(${sparklineVO.numOfYearsToBeRendered});
|
data.addRows(${sparklineVO.yearToEntityCountDataTable?size});
|
||||||
|
|
||||||
<#list sparklineVO.yearToEntityCountDataTable as yearToUniqueCoauthorsDataElement>
|
<#list sparklineVO.yearToEntityCountDataTable as yearToUniqueCoauthorsDataElement>
|
||||||
data.setValue(${yearToUniqueCoauthorsDataElement.yearToEntityCounter}, 0, '${yearToUniqueCoauthorsDataElement.year}');
|
data.setValue(${yearToUniqueCoauthorsDataElement.yearToEntityCounter}, 0, '${yearToUniqueCoauthorsDataElement.year}');
|
||||||
|
@ -43,7 +43,6 @@
|
||||||
maxValue: '${sparklineVO.latestRenderedPublicationYear?c}'
|
maxValue: '${sparklineVO.latestRenderedPublicationYear?c}'
|
||||||
}]));
|
}]));
|
||||||
|
|
||||||
|
|
||||||
<#else>
|
<#else>
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
|
@ -87,6 +86,7 @@
|
||||||
var sparksText = ' co-author(s) from <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}'
|
var sparksText = ' co-author(s) from <span class="sparkline_range">${sparklineVO.earliestYearConsidered?c}'
|
||||||
+ ' to ${sparklineVO.latestRenderedPublicationYear?c}</span> '
|
+ ' to ${sparklineVO.latestRenderedPublicationYear?c}</span> '
|
||||||
+ ' <a href="${sparklineVO.downloadDataLink}" class="inline_href">(.CSV File)</a> ';
|
+ ' <a href="${sparklineVO.downloadDataLink}" class="inline_href">(.CSV File)</a> ';
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
$('#${sparklineContainerID} td.sparkline_text').html(sparksText);
|
$('#${sparklineContainerID} td.sparkline_text').html(sparksText);
|
||||||
|
@ -152,7 +152,9 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</div><!-- Sparkline Viz -->
|
</div>
|
||||||
|
|
||||||
|
<!-- Sparkline Viz -->
|
||||||
|
|
||||||
<#if sparklineVO.shortVisMode>
|
<#if sparklineVO.shortVisMode>
|
||||||
<#--<span class="vis_link">-->
|
<#--<span class="vis_link">-->
|
||||||
|
@ -161,37 +163,23 @@
|
||||||
<#else>
|
<#else>
|
||||||
<!-- For Full Sparkline - Print the Table of Couauthor Counts per Year -->
|
<!-- For Full Sparkline - Print the Table of Couauthor Counts per Year -->
|
||||||
<p>
|
<p>
|
||||||
<table id='sparkline_data_table'>
|
<#if displayTable?? && displayTable>
|
||||||
<caption>
|
|
||||||
Unique Co-Authors per year <a href="${sparklineVO.downloadDataLink}">(.CSV File)</a>
|
|
||||||
</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
Year
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Count
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<#list sparklineVO.yearToActivityCount?keys as year>
|
<p>
|
||||||
<tr>
|
<#assign tableID = "sparkline_data_table" />
|
||||||
<td>
|
<#assign tableCaption = "Unique Co-Authors per year " />
|
||||||
${year}
|
<#assign tableActivityColumnName = "Count" />
|
||||||
</td>
|
<#assign tableContent = sparklineVO.yearToActivityCount />
|
||||||
<td>
|
<#assign fileDownloadLink = sparklineVO.downloadDataLink />
|
||||||
${sparklineVO.yearToActivityCount[year]}
|
|
||||||
</td>
|
<#include "yearToActivityCountTable.ftl">
|
||||||
</tr>
|
|
||||||
</#list>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
Download data as <a href="${sparklineVO.downloadDataLink}">.csv</a> file.
|
Download data as <a href="${sparklineVO.downloadDataLink}">.csv</a> file.
|
||||||
<br />
|
<br />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
</p>
|
||||||
</#if>
|
</#if>
|
||||||
</div>
|
</div>
|
|
@ -5,12 +5,12 @@
|
||||||
<#assign dataVisualizationURLRoot ="/visualizationData">
|
<#assign dataVisualizationURLRoot ="/visualizationData">
|
||||||
|
|
||||||
<#assign egoURI ="${egoURIParam?url}">
|
<#assign egoURI ="${egoURIParam?url}">
|
||||||
<#assign egoCoAuthorshipDataFeederURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&visMode=coauthor_network_stream&labelField=label'>
|
<#assign egoCoAuthorshipDataFeederURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&vis_mode=coauthor_network_stream&labelField=label'>
|
||||||
|
|
||||||
<#assign coprincipalinvestigatorURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${egoURI}&visMode=copi'>
|
<#assign coprincipalinvestigatorURL = '${urls.base}${standardVisualizationURLRoot}?vis=person_level&uri=${egoURI}&vis_mode=copi'>
|
||||||
|
|
||||||
<#assign egoCoAuthorsListDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&visMode=coauthors'>
|
<#assign egoCoAuthorsListDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&vis_mode=coauthors'>
|
||||||
<#assign egoCoAuthorshipNetworkDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&visMode=coauthor_network_download'>
|
<#assign egoCoAuthorshipNetworkDataFileURL = '${urls.base}${dataVisualizationURLRoot}?vis=coauthorship&uri=${egoURI}&vis_mode=coauthor_network_download'>
|
||||||
|
|
||||||
<#assign swfLink = '${urls.images}/visualization/coauthorship/EgoCentric.swf'>
|
<#assign swfLink = '${urls.images}/visualization/coauthorship/EgoCentric.swf'>
|
||||||
<#assign adobeFlashDetector = '${urls.base}/js/visualization/coauthorship/AC_OETags.js'>
|
<#assign adobeFlashDetector = '${urls.base}/js/visualization/coauthorship/AC_OETags.js'>
|
||||||
|
@ -68,11 +68,10 @@ $(document).ready(function(){
|
||||||
$("#coauth_table_container").empty().html('<img id="loadingData" width="auto" src="${loadingImageLink}" />');
|
$("#coauth_table_container").empty().html('<img id="loadingData" width="auto" src="${loadingImageLink}" />');
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
processProfileInformation("ego_label",
|
processProfileInformation("ego_label",
|
||||||
"ego_moniker",
|
"ego_moniker",
|
||||||
"ego_profile_image",
|
"ego_profile_image",
|
||||||
jQuery.parseJSON(getWellFormedURLs("${egoURI}", "profile_info")));
|
jQuery.parseJSON(getWellFormedURLs("${egoURIParam}", "profile_info")));
|
||||||
|
|
||||||
<#if (numOfCoAuthorShips?? && numOfCoAuthorShips <= 0) || (numOfAuthors?? && numOfAuthors <= 0) >
|
<#if (numOfCoAuthorShips?? && numOfCoAuthorShips <= 0) || (numOfAuthors?? && numOfAuthors <= 0) >
|
||||||
if ($('#ego_label').text().length > 0) {
|
if ($('#ego_label').text().length > 0) {
|
||||||
|
@ -96,7 +95,7 @@ $(document).ready(function(){
|
||||||
|
|
||||||
<div class = "toggle_visualization">
|
<div class = "toggle_visualization">
|
||||||
<h2>Co-Investigator Network</h2>
|
<h2>Co-Investigator Network</h2>
|
||||||
<a style = "margin-top:0px;" class="view-all-style" href='<c:out value="${coprincipalinvestigatorURL}"/>'>View</a>
|
<a style = "margin-top:0px;" class="view-all-style" href='${coprincipalinvestigatorURL}'>View</a>
|
||||||
<span class="pictos-arrow-10">4</span>
|
<span class="pictos-arrow-10">4</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -106,7 +105,7 @@ $(document).ready(function(){
|
||||||
|
|
||||||
<h2 class="sub_headings">Co-Author Network </h2>
|
<h2 class="sub_headings">Co-Author Network </h2>
|
||||||
|
|
||||||
<#if (numOfCoAuthorShips?? && numOfCoAuthorShips <= 0) || (numOfAuthors?? && numOfAuthors <= 0) >
|
<#if (numOfCoAuthorShips?? && numOfCoAuthorShips > 0) || (numOfAuthors?? && numOfAuthors > 0) >
|
||||||
<a class = "fileDownloadPlaceHolder" href="${egoCoAuthorshipNetworkDataFileURL}">(GraphML File)</a>
|
<a class = "fileDownloadPlaceHolder" href="${egoCoAuthorshipNetworkDataFileURL}">(GraphML File)</a>
|
||||||
<#else>
|
<#else>
|
||||||
|
|
||||||
|
@ -131,7 +130,7 @@ $(document).ready(function(){
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<#if (numOfCoAuthorShips?? && numOfCoAuthorShips <= 0) || (numOfAuthors?? && numOfAuthors <= 0) >
|
<#if (numOfCoAuthorShips?? && numOfCoAuthorShips > 0) || (numOfAuthors?? && numOfAuthors > 0) >
|
||||||
|
|
||||||
<div id="bodyPannel">
|
<div id="bodyPannel">
|
||||||
<div id="visPanel" style="float: right; width: 600px;">
|
<div id="visPanel" style="float: right; width: 600px;">
|
||||||
|
@ -167,6 +166,9 @@ $(document).ready(function(){
|
||||||
|
|
||||||
<#-- Sparkline -->
|
<#-- Sparkline -->
|
||||||
<div style="width: 60%; height: 100px; float:right;">
|
<div style="width: 60%; height: 100px; float:right;">
|
||||||
|
|
||||||
|
<#assign displayTable = false />
|
||||||
|
|
||||||
<#assign sparklineVO = egoPubSparklineVO />
|
<#assign sparklineVO = egoPubSparklineVO />
|
||||||
<#include "personPublicationSparklineContent.ftl">
|
<#include "personPublicationSparklineContent.ftl">
|
||||||
|
|
||||||
|
@ -181,9 +183,19 @@ $(document).ready(function(){
|
||||||
<h3 class="sub_headings" id="table_heading">Tables</h3>
|
<h3 class="sub_headings" id="table_heading">Tables</h3>
|
||||||
|
|
||||||
<div class="vis-tables">
|
<div class="vis-tables">
|
||||||
|
|
||||||
<p id="publications_table_container" class="datatable">
|
<p id="publications_table_container" class="datatable">
|
||||||
TABLE
|
|
||||||
|
<#assign tableID = "publication_data_table" />
|
||||||
|
<#assign tableCaption = "Publications per year " />
|
||||||
|
<#assign tableActivityColumnName = "Publications" />
|
||||||
|
<#assign tableContent = egoPubSparklineVO.yearToActivityCount />
|
||||||
|
<#assign fileDownloadLink = egoPubSparklineVO.downloadDataLink />
|
||||||
|
|
||||||
|
<#include "yearToActivityCountTable.ftl">
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<#if (numOfCoAuthorShips > 0) >
|
<#if (numOfCoAuthorShips > 0) >
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
var data = new google.visualization.DataTable();
|
var data = new google.visualization.DataTable();
|
||||||
data.addColumn('string', 'Year');
|
data.addColumn('string', 'Year');
|
||||||
data.addColumn('number', 'Publications');
|
data.addColumn('number', 'Publications');
|
||||||
data.addRows(${sparklineVO.numOfYearsToBeRendered});
|
data.addRows(${sparklineVO.yearToEntityCountDataTable?size});
|
||||||
|
|
||||||
<#list sparklineVO.yearToEntityCountDataTable as yearToPublicationCountDataElement>
|
<#list sparklineVO.yearToEntityCountDataTable as yearToPublicationCountDataElement>
|
||||||
data.setValue(${yearToPublicationCountDataElement.yearToEntityCounter}, 0, '${yearToPublicationCountDataElement.year}');
|
data.setValue(${yearToPublicationCountDataElement.yearToEntityCounter}, 0, '${yearToPublicationCountDataElement.year}');
|
||||||
|
@ -160,38 +160,25 @@
|
||||||
<#--</span>-->
|
<#--</span>-->
|
||||||
<#else>
|
<#else>
|
||||||
<!-- For Full Sparkline - Print the Table of Publication Counts per Year -->
|
<!-- For Full Sparkline - Print the Table of Publication Counts per Year -->
|
||||||
|
|
||||||
|
<#if displayTable?? && displayTable>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<table id='sparkline_data_table'>
|
<#assign tableID = "sparkline_data_table" />
|
||||||
<caption>
|
<#assign tableCaption = "Publications per year " />
|
||||||
Publications per year <a href="${sparklineVO.downloadDataLink}">(.CSV File)</a>
|
<#assign tableActivityColumnName = "Publications" />
|
||||||
</caption>
|
<#assign tableContent = sparklineVO.yearToActivityCount />
|
||||||
<thead>
|
<#assign fileDownloadLink = sparklineVO.downloadDataLink />
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
Year
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Publications
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<#list sparklineVO.yearToActivityCount?keys as year>
|
<#include "yearToActivityCountTable.ftl">
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
${year}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
${sparklineVO.yearToActivityCount[year]}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</#list>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
Download data as <a href="${sparklineVO.downloadDataLink}">.csv</a> file.
|
Download data as <a href="${sparklineVO.downloadDataLink}">.csv</a> file.
|
||||||
<br />
|
<br />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
</div>
|
</div>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<table id='${tableID}'>
|
||||||
|
<caption>
|
||||||
|
${tableCaption} <a href="${fileDownloadLink}">(.CSV File)</a>
|
||||||
|
</caption>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
Year
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
${tableActivityColumnName}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<#list tableContent?keys as year>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
${year}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
${tableContent[year]}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</#list>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
|
@ -148,6 +148,8 @@ public class CoAuthorshipVisCodeGenerator {
|
||||||
|
|
||||||
numOfYearsToBeRendered = currentYear - minPubYearConsidered + 1;
|
numOfYearsToBeRendered = currentYear - minPubYearConsidered + 1;
|
||||||
|
|
||||||
|
sparklineData.setNumOfYearsToBeRendered(numOfYearsToBeRendered);
|
||||||
|
|
||||||
visualizationCode.append("<style type='text/css'>"
|
visualizationCode.append("<style type='text/css'>"
|
||||||
+ "." + VISUALIZATION_STYLE_CLASS + " table{"
|
+ "." + VISUALIZATION_STYLE_CLASS + " table{"
|
||||||
+ " margin: 0;"
|
+ " margin: 0;"
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class PersonLevelRequestHandler implements VisualizationRequestHandler {
|
||||||
VisualizationFrameworkConstants.VIS_MODE_KEY);
|
VisualizationFrameworkConstants.VIS_MODE_KEY);
|
||||||
|
|
||||||
|
|
||||||
if (VisualizationFrameworkConstants.CO_PI_VIS.equalsIgnoreCase(visMode)) {
|
if (VisualizationFrameworkConstants.COPI_VIS_MODE.equalsIgnoreCase(visMode)) {
|
||||||
|
|
||||||
QueryRunner<CoPIData> coPIQueryManager = new CoPIGrantCountQueryRunner(egoURI, dataSource, log);
|
QueryRunner<CoPIData> coPIQueryManager = new CoPIGrantCountQueryRunner(egoURI, dataSource, log);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue