This repository has been archived by the owner on May 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
Tutorial
Adil edited this page Nov 12, 2013
·
32 revisions
Let's create a Keshif interface for a common and interesting dataset: Nobel Prizes!
First comes the data. We have it here in Google Docs, set to public read mode so that everyone can access this data. Note that this spreadsheet is identified by the ID 0Ai6LdDWgaqgNdDNVcXlscjl4RzRZNl9ZSkNJLU1DWVE , available as a part of the link.
While the sheet has 3 sheets, we are interested in two of them, Prizes and Laureates.
kshf.init({
chartTitle: "Nobel Prize Winners",
domID : "#chart_div4",
dirRoot: "../",
categoryTextWidth: 306,
source : {
gdocId : '0Ai6LdDWgaqgNdDNVcXlscjl4RzRZNl9ZSkNJLU1DWVE',
sheets : [ {name:"Prizes"}, {name:"Laureates"} ]
},
columnsSkip : ["Overall Motivation","laureate_id"],
list: {
sortColWidth: 45,
sortOpts : [ {name: 'Year'} ],
contentFunc : function(d) {
var laureateID = d.data[kshf.dt_ColNames.Prizes.laureate_id];
var laureate = kshf.dt_id.Laureates[laureateID];
return "<div class=\"iteminfo iteminfo_0\">" +
laureate.data[kshf.dt_ColNames.Laureates.firstname] + " " +
laureate.data[kshf.dt_ColNames.Laureates.surname] +
"</div>";
}
}
});
Mehmet Adil Yalcin - HCIL - University of Maryland, College Park