annotate analyse.html @ 1474:cb98283ece7e

Feature #1266: Checks for fragments fully played implemented
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Wed, 02 Dec 2015 12:05:08 +0000
parents bc074d4ee760
children babd5366db49 888292c88c33
rev   line source
nickjillings@1450 1 <!DOCTYPE html>
nickjillings@1450 2 <html lang="en">
nickjillings@1450 3 <head>
nickjillings@1450 4 <meta charset="utf-8">
nickjillings@1450 5
nickjillings@1450 6 <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
nickjillings@1450 7 Remove this if you use the .htaccess -->
nickjillings@1450 8 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
nickjillings@1450 9
nickjillings@1450 10 <title>Analysis</title>
nickjillings@1450 11 <meta name="description" content="Show results from subjective evaluation">
nickjillings@1450 12 <meta name="author" content="Brecht De Man">
nickjillings@1450 13
nickjillings@1450 14 <script type="text/javascript" src="https://www.google.com/jsapi"></script>
nickjillings@1450 15 <script type="text/javascript">
nickjillings@1450 16 // To aid 'one-page set-up' all scripts and CSS must be included directly in this file!
nickjillings@1450 17
nickjillings@1450 18 //google.load("visualization", "1", {packages:["corechart"]});
nickjillings@1450 19
nickjillings@1450 20 /*************
nickjillings@1450 21 * SETUP *
nickjillings@1450 22 *************/
nickjillings@1450 23 // folder where to find the XML files
nickjillings@1450 24 xmlFileFolder = "analysis_test";
nickjillings@1450 25 // array of XML files
nickjillings@1450 26 var xmlFiles = ['McG-A-2013-09.xml', 'McG-A-2014-03.xml', 'McG-A-2014-12.xml', 'McG-B-2013-09.xml',
nickjillings@1450 27 'McG-B-2014-03.xml', 'McG-B-2014-12.xml', 'McG-C-2013-09.xml', 'McG-C-2014-03.xml', 'McG-C-2014-12.xml',
nickjillings@1450 28 'McG-D-2013-09.xml', 'McG-D-2014-03.xml', 'McG-D-2014-12.xml', 'McG-E-2013-09.xml', 'McG-E-2014-03.xml',
nickjillings@1450 29 'McG-E-2014-12.xml', 'McG-F-2013-09.xml', 'McG-F-2014-03.xml', 'McG-F-2014-12.xml', 'McG-G-2014-03.xml',
nickjillings@1450 30 'McG-G-2014-12.xml', 'McG-H-2013-09.xml', 'McG-H-2014-03.xml', 'McG-H-2014-12.xml', 'McG-I-2013-09.xml',
nickjillings@1450 31 'McG-I-2014-03.xml', 'McG-J-2013-09.xml', 'McG-J-2014-03.xml', 'McG-K-2013-09.xml', 'McG-K-2014-03.xml',
nickjillings@1450 32 'McG-L-2013-09.xml', 'McG-L-2014-03.xml', 'McG-M-2013-09.xml', 'McG-M-2014-03.xml', 'McG-N-2013-09.xml',
nickjillings@1450 33 'McG-N-2014-03.xml', 'McG-O-2013-09.xml', 'McG-O-2014-03.xml', 'McG-P-2013-09.xml', 'McG-P-2014-03.xml',
nickjillings@1450 34 'McG-pro1-2013-09.xml', 'McG-pro1-2014-03.xml', 'McG-pro1-2014-12.xml', 'McG-pro2-2013-09.xml',
nickjillings@1450 35 'McG-pro2-2014-03.xml', 'McG-pro2-2014-12.xml', 'McG-Q-2014-12.xml', 'McG-R-2014-12.xml',
nickjillings@1450 36 'McG-S-2014-12.xml', 'McG-subA-2013-09.xml', 'McG-subA-2014-03.xml', 'McG-subB-2014-03.xml',
nickjillings@1450 37 'McG-subB-2014-12.xml', 'McG-subC-2013-09.xml', 'McG-subC-2014-03.xml', 'McG-subC-2014-12.xml',
nickjillings@1450 38 'McG-subD-2013-09.xml', 'McG-subD-2014-12.xml', 'McG-subE-2014-12.xml', 'McG-subG-2014-12.xml',
nickjillings@1450 39 'McG-subH-2013-09.xml', 'McG-T-2014-12.xml', 'McG-U-2014-12.xml', 'McG-V-2014-12.xml',
nickjillings@1450 40 'McG-W-2014-12.xml', 'McG-X-2014-12.xml', 'MG1-2013-09.xml', 'MG2-2013-09.xml', 'MG3-2013-09.xml',
nickjillings@1450 41 'MG4-2013-09.xml', 'MG5-2013-09.xml', 'MG6-2013-09.xml', 'MG7-2013-09.xml', 'MG8-2013-09.xml',
nickjillings@1450 42 'MG9-2013-09.xml', 'QM-1-1.xml', 'QM-1-2.xml', 'QM-10-1.xml', 'QM-11-1.xml', 'QM-11-2.xml', 'QM-12-1.xml', 'QM-12-2.xml',
nickjillings@1450 43 'QM-13-1.xml', 'QM-14-1.xml', 'QM-15-1.xml', 'QM-16-1.xml', 'QM-17-1.xml', 'QM-18-1.xml', 'QM-18-2.xml',
nickjillings@1450 44 'QM-18-3.xml', 'QM-19-1.xml', 'QM-2-1.xml', 'QM-2-2.xml', 'QM-2-3.xml', 'QM-20-1.xml', 'QM-20-2.xml',
nickjillings@1450 45 'QM-20-3.xml', 'QM-21-1.xml', 'QM-21-2.xml', 'QM-3-1.xml', 'QM-3-2.xml', 'QM-3-3.xml', 'QM-4-1.xml', 'QM-5-1.xml',
nickjillings@1450 46 'QM-5-2.xml', 'QM-6-1.xml', 'QM-6-2.xml', 'QM-7-1.xml', 'QM-7-2.xml', 'QM-8-1.xml', 'QM-9-1.xml',
nickjillings@1450 47 'PXL-L1.xml','PXL-L2.xml','PXL-L3.xml','PXL-L4.xml','PXL-L5.xml','PXL-S1.xml','PXL-S2.xml','PXL-S3.xml',
nickjillings@1450 48 'PXL-S4.xml','PXL-S5.xml','PXL-S6.xml','PXL-S7.xml','PXL-pro.xml','DU-A1.xml','DU-A2.xml','DU-B1.xml',
nickjillings@1450 49 'DU-B2.xml','DU-C1.xml','DU-C2.xml','DU-D1.xml','DU-D2.xml','DU-E1.xml','DU-F1.xml','DU-F2.xml','DU-G1.xml',
nickjillings@1450 50 'DU-G2.xml','DU-H1.xml','DU-H2.xml','DU-I2.xml','DU-J2.xml','DU-K1.xml','DU-K2.xml','DU-L1.xml','DU-L2.xml',
nickjillings@1450 51 'DU-M1.xml','DU-M2.xml','DU-N1.xml','DU-O1.xml','DU-O2.xml','DU-P1.xml','DU-P2.xml','DU-Q1.xml','DU-Q2.xml',
nickjillings@1450 52 'DU-R1.xml','DU-R2.xml','DU-S1.xml','DU-S2.xml','DU-T1.xml','DU-T2.xml','DU-U1.xml','DU-U2.xml','DU-U3.xml'];
nickjillings@1450 53 //['QM-1-1.xml','QM-2-1.xml','QM-2-2.xml','QM-2-3.xml','QM-3-1.xml','QM-3-2.xml','QM-4-1.xml','QM-5-1.xml','QM-5-2.xml','QM-6-1.xml','QM-6-2.xml','QM-7-1.xml','QM-7-2.xml','QM-8-1.xml','QM-9-1.xml','QM-10-1.xml','QM-11-1.xml','QM-12-1.xml','QM-12-2.xml','QM-13-1.xml','QM-14-1.xml','QM-15-1.xml','QM-16-1.xml','QM-17-1.xml','QM-18-1.xml','QM-18-2.xml','QM-18-3.xml','QM-19-1.xml','QM-20-1.xml','QM-20-2.xml','QM-20-3.xml','QM-21-1.xml','QM-21-2.xml'];
nickjillings@1450 54 //['McG-A-2014-03.xml','McG-B-2014-03.xml','McG-C-2014-03.xml','McG-D-2014-03.xml','McG-E-2014-03.xml','McG-F-2014-03.xml','McG-G-2014-03.xml','McG-H-2014-03.xml'];
nickjillings@1450 55
nickjillings@1450 56 //TODO: make retrieval of file names automatic / drag files on here
nickjillings@1450 57
nickjillings@1450 58 /****************
nickjillings@1450 59 * VARIABLES *
nickjillings@1450 60 ****************/
nickjillings@1450 61
nickjillings@1450 62 // Counters
nickjillings@1450 63 // How many files, audioholders, audioelementes and statements annotated (don't count current one)
nickjillings@1450 64 var numberOfFiles = -1;
nickjillings@1450 65 var numberOfaudioholders = -1;
nickjillings@1450 66 var numberOfaudioelementes = -1;
nickjillings@1450 67 var numberOfStatements = -1;
nickjillings@1450 68 var numberOfSkippedComments = 0;
nickjillings@1450 69
nickjillings@1450 70 // Object arrays
nickjillings@1450 71 var fileNameArray = [];
nickjillings@1450 72 var subjectArray = [];
nickjillings@1450 73 var audioholderArray = [];
nickjillings@1450 74 var audioelementArray = [];
nickjillings@1450 75
nickjillings@1450 76 // End of (file, audioholder, audioelement) flags
nickjillings@1450 77 var newFile = true;
nickjillings@1450 78 var newAudioHolder = true;
nickjillings@1450 79 var newAudioElement = true;
nickjillings@1450 80
nickjillings@1450 81 var fileCounter = 0; // file index
nickjillings@1450 82 var audioholderCounter=0; // audioholder index (current XML file)
nickjillings@1450 83 var audioelementCounter=0; // audioelement index (current audioholder)
nickjillings@1450 84 var statementNumber=0; // total number of statements
nickjillings@1450 85
nickjillings@1450 86 var root; // root of XML file
nickjillings@1450 87 var commentInFull = ''; // full comment
nickjillings@1450 88
nickjillings@1450 89 var playAudio = true; // whether corresponding audio should be played back
nickjillings@1450 90
nickjillings@1450 91 // // Measuring time
nickjillings@1450 92 // var lastTimeMeasured = -1; //
nickjillings@1450 93 // var durationLastAnnotation = -1; // duration of last annotation
nickjillings@1450 94 // var timeArray = [];
nickjillings@1450 95 // var MIN_TIME = 1.0; // minimum time counted as significant
nickjillings@1450 96 // var measurementPaused = false; // whether time measurement is paused
nickjillings@1450 97 // var timeInBuffer = 0; //
nickjillings@1450 98
nickjillings@1450 99 var topLevel;
nickjillings@1450 100 window.onload = function() {
nickjillings@1450 101 // Initialise page
nickjillings@1450 102 topLevel = document.getElementById('topLevelBody');
nickjillings@1450 103 var setup = document.createElement('div');
nickjillings@1450 104 setup.id = 'setupTagDiv';
nickjillings@1450 105 loadAllFiles();
nickjillings@1450 106 printSurveyData()
nickjillings@1450 107 //makePlots();
nickjillings@1450 108 // measure time at this point:
nickjillings@1450 109 lastTimeMeasured = new Date().getTime(); // in milliseconds
nickjillings@1450 110 };
nickjillings@1450 111
nickjillings@1450 112 // Assert function
nickjillings@1450 113 function assert(condition, message) {
nickjillings@1450 114 if (!condition) {
nickjillings@1450 115 message = message || "Assertion failed";
nickjillings@1450 116 if (typeof Error !== "undefined") {
nickjillings@1450 117 throw new Error(message);
nickjillings@1450 118 }
nickjillings@1450 119 throw message; // Fallback
nickjillings@1450 120 }
nickjillings@1450 121 }
nickjillings@1450 122
nickjillings@1450 123 function median(values) { // TODO: replace code by '50th percentile' - should be the same?
nickjillings@1450 124 values.sort( function(a,b) {return a - b;} );
nickjillings@1450 125 var half = Math.floor(values.length/2);
nickjillings@1450 126 if(values.length % 2)
nickjillings@1450 127 return values[half];
nickjillings@1450 128 else
nickjillings@1450 129 return (values[half-1] + values[half]) / 2.0;
nickjillings@1450 130 }
nickjillings@1450 131
nickjillings@1450 132 function percentile(values, n) {
nickjillings@1450 133 values.sort( function(a,b) {return a - b;} );
nickjillings@1450 134 // get ordinal rank
nickjillings@1450 135 var rank = Math.min(Math.floor(values.length*n/100), values.length-1);
nickjillings@1450 136 return values[rank];
nickjillings@1450 137 }
nickjillings@1450 138
nickjillings@1450 139 /***********************
nickjillings@1450 140 * TIME MEASUREMENT *
nickjillings@1450 141 ************************/
nickjillings@1450 142
nickjillings@1450 143 // measure time since last time this function was called
nickjillings@1450 144 function timeSinceLastCall() {
nickjillings@1450 145 // current time
nickjillings@1450 146 var currentTime = new Date().getTime();
nickjillings@1450 147 // calculate time difference
nickjillings@1450 148 var timeDifference = currentTime - lastTimeMeasured + timeInBuffer;
nickjillings@1450 149 // clear buffer (for pausing)
nickjillings@1450 150 timeInBuffer = 0;
nickjillings@1450 151 // remember last measured time
nickjillings@1450 152 lastTimeMeasured = currentTime;
nickjillings@1450 153 return timeDifference;
nickjillings@1450 154 }
nickjillings@1450 155
nickjillings@1450 156 // pause time measurement
nickjillings@1450 157 function pauseTimeMeasurement() {
nickjillings@1450 158 // UN-PAUSE
nickjillings@1450 159 if (measurementPaused) { // already paused
nickjillings@1450 160 // button shows 'pause' again
nickjillings@1450 161 document.getElementById('pauseButton').innerHTML = 'Pause';
nickjillings@1450 162 // toggle state
nickjillings@1450 163 measurementPaused = false;
nickjillings@1450 164 // resume time measurement
nickjillings@1450 165 lastTimeMeasured = new Date().getTime(); // reset time, discard time while paused
nickjillings@1450 166 } else { // PAUSE
nickjillings@1450 167 // button shows 'resume'
nickjillings@1450 168 document.getElementById('pauseButton').innerHTML = 'Resume';
nickjillings@1450 169 // toggle state
nickjillings@1450 170 measurementPaused = true;
nickjillings@1450 171 // pause time measurement
nickjillings@1450 172 timeInBuffer = timeSinceLastCall();
nickjillings@1450 173 }
nickjillings@1450 174 }
nickjillings@1450 175
nickjillings@1450 176 // show elapsed time on interface
nickjillings@1450 177 function showTimeElapsedInSeconds() {
nickjillings@1450 178 // if paused: un-pause
nickjillings@1450 179 if (measurementPaused) {
nickjillings@1450 180 pauseTimeMeasurement();
nickjillings@1450 181 }
nickjillings@1450 182
nickjillings@1450 183 // time of last annotation
nickjillings@1450 184 var lastAnnotationTime = timeSinceLastCall()/1000;
nickjillings@1450 185 document.getElementById('timeDisplay').innerHTML = lastAnnotationTime.toFixed(2);
nickjillings@1450 186 // average time over last ... annotations
nickjillings@1450 187 var avgAnnotationTime;
nickjillings@1450 188 var numberOfElementsToAverage =
nickjillings@1450 189 document.getElementById('numberOfTimeAverages').value;
nickjillings@1450 190 if (isPositiveInteger(numberOfElementsToAverage)) {
nickjillings@1450 191 avgAnnotationTime =
nickjillings@1450 192 calculateAverageTime(lastAnnotationTime,
nickjillings@1450 193 Number(numberOfElementsToAverage));
nickjillings@1450 194 } else {
nickjillings@1450 195 // change text field content to 'ALL'
nickjillings@1450 196 document.getElementById('numberOfTimeAverages').value = 'ALL';
nickjillings@1450 197 avgAnnotationTime = calculateAverageTime(lastAnnotationTime, -1);
nickjillings@1450 198 }
nickjillings@1450 199 document.getElementById('timeAverageDisplay').innerHTML = avgAnnotationTime.toFixed(2);
nickjillings@1450 200 }
nickjillings@1450 201
nickjillings@1450 202 // auxiliary function: is string a positive integer?
nickjillings@1450 203 // http://stackoverflow.com/questions/10834796/...
nickjillings@1450 204 // validate-that-a-string-is-a-positive-integer
nickjillings@1450 205 function isPositiveInteger(str) {
nickjillings@1450 206 var n = ~~Number(str);
nickjillings@1450 207 return String(n) === str && n >= 0;
nickjillings@1450 208 }
nickjillings@1450 209
nickjillings@1450 210 // calculate average time
nickjillings@1450 211 function calculateAverageTime(newTimeMeasurementInSeconds,numberOfPoints) {
nickjillings@1450 212 // append last measurement time to time array, if significant
nickjillings@1450 213 if (newTimeMeasurementInSeconds > MIN_TIME) {
nickjillings@1450 214 timeArray.push(newTimeMeasurementInSeconds);
nickjillings@1450 215 }
nickjillings@1450 216 // average over last N elements of this array
nickjillings@1450 217 if (numberOfPoints < 0 || numberOfPoints>=timeArray.length) { // calculate average over all
nickjillings@1450 218 var sum = 0;
nickjillings@1450 219 for (var i = 0; i < timeArray.length; i++) {
nickjillings@1450 220 sum += timeArray[i];
nickjillings@1450 221 }
nickjillings@1450 222 averageOfTimes = sum/timeArray.length;
nickjillings@1450 223 } else { // calculate average over specified number of times measured last
nickjillings@1450 224 var sum = 0;
nickjillings@1450 225 for (var i = timeArray.length-numberOfPoints; i < timeArray.length; i++) {
nickjillings@1450 226 sum += timeArray[i];
nickjillings@1450 227 }
nickjillings@1450 228 averageOfTimes = sum/numberOfPoints;
nickjillings@1450 229 }
nickjillings@1450 230 return averageOfTimes;
nickjillings@1450 231 }
nickjillings@1450 232
nickjillings@1450 233
nickjillings@1450 234 /********************************
nickjillings@1450 235 * PLAYBACK OF AUDIO *
nickjillings@1450 236 ********************************/
nickjillings@1450 237
nickjillings@1450 238 //PLAYaudioelement
nickjillings@1450 239 // Keep track of whether audio should be played
nickjillings@1450 240 function playFlagChanged(){
nickjillings@1450 241 playAudio = playFlag.checked; // global variable
nickjillings@1450 242
nickjillings@1450 243 if (!playAudio){ // if audio needs to stop
nickjillings@1450 244 audio.pause(); // stop audio - if anything is playing
nickjillings@1450 245 currently_playing = ''; // back to empty string so playaudioelement knows nothing's playing
nickjillings@1450 246 }
nickjillings@1450 247 }
nickjillings@1450 248
nickjillings@1450 249 // audioholder that's currently playing
nickjillings@1450 250 var currently_playing_audioholder = ''; // at first: empty string
nickjillings@1450 251 var currently_playing_audioelement = '';
nickjillings@1450 252 var audio;
nickjillings@1450 253
nickjillings@1450 254 // Play audioelement of audioholder if available, from start or from same position
nickjillings@1450 255 function playaudioelement(audioholderName, audioelementerName){
nickjillings@1450 256 if (playAudio) { // if enabled
nickjillings@1450 257 // get corresponding file from folder
nickjillings@1450 258 var file_location = 'audio/'+audioholderName + '/' + audioelementerName + '.mp3'; // fixed path and file name format
nickjillings@1450 259
nickjillings@1450 260 // if not available, show error/warning message
nickjillings@1450 261 //TODO ...
nickjillings@1450 262
nickjillings@1450 263 // if nothing playing yet, start playing
nickjillings@1450 264 if (currently_playing_audioholder == ''){ // signal that nothing is playing
nickjillings@1450 265 //playSound(audioBuffer);
nickjillings@1450 266 audio = new Audio(file_location);
nickjillings@1450 267 audio.loop = true; // loop when end is reached
nickjillings@1450 268 audio.play();
nickjillings@1450 269 currently_playing_audioholder = audioholderName;
nickjillings@1450 270 currently_playing_audioelement = audioelementerName;
nickjillings@1450 271 } else if (currently_playing_audioholder != audioholderName) {
nickjillings@1450 272 // if different audioholder playing, stop that and start playing
nickjillings@1450 273 audio.pause(); // stop audio
nickjillings@1450 274 audio = new Audio(file_location); // load new file
nickjillings@1450 275 audio.loop = true; // loop when end is reached
nickjillings@1450 276 audio.play(); // play audio from the start
nickjillings@1450 277 currently_playing_audioholder = audioholderName;
nickjillings@1450 278 currently_playing_audioelement = audioelementerName;
nickjillings@1450 279 } else if (currently_playing_audioelement != audioelementerName) {
nickjillings@1450 280 // if same audioholder playing, start playing from where it left off
nickjillings@1450 281 skipTime = audio.currentTime; // time to skip to
nickjillings@1450 282 audio.pause(); // stop audio
nickjillings@1450 283 audio = new Audio(file_location);
nickjillings@1450 284 audio.addEventListener('loadedmetadata', function() {
nickjillings@1450 285 this.currentTime = skipTime;
nickjillings@1450 286 console.log('Loaded '+audioholderName+'-'+audioelementerName+', playing from '+skipTime);
nickjillings@1450 287 }, false); // skip to same time when audio is loaded!
nickjillings@1450 288 audio.loop = true; // loop when end is reached
nickjillings@1450 289 audio.play(); // play from that time
nickjillings@1450 290 audio.currentTime = skipTime;
nickjillings@1450 291 currently_playing_audioholder = audioholderName;
nickjillings@1450 292 currently_playing_audioelement = audioelementerName;
nickjillings@1450 293 }
nickjillings@1450 294 // if same audioelement playing: keep on playing (i.e. do nothing)
nickjillings@1450 295 }
nickjillings@1450 296 }
nickjillings@1450 297
nickjillings@1450 298 /********************
nickjillings@1450 299 * READING FILES *
nickjillings@1450 300 ********************/
nickjillings@1450 301
nickjillings@1450 302 // Read necessary data from XML file
nickjillings@1450 303 function readXML(xmlFileName){
nickjillings@1450 304 if (window.XMLHttpRequest)
nickjillings@1450 305 {// code for IE7+, Firefox, Chrome, Opera, Safari
nickjillings@1450 306 xmlhttp=new XMLHttpRequest();
nickjillings@1450 307 }
nickjillings@1450 308 else
nickjillings@1450 309 {// code for IE6, IE5
nickjillings@1450 310 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
nickjillings@1450 311 }
nickjillings@1450 312 xmlhttp.open("GET",xmlFileName,false);
nickjillings@1450 313 xmlhttp.send();
nickjillings@1450 314 return xmlhttp.responseXML;
nickjillings@1450 315 }
nickjillings@1450 316
nickjillings@1450 317 // go over all files and compute relevant statistics
nickjillings@1450 318 function loadAllFiles() {
nickjillings@1450 319 // retrieve information from XMLs
nickjillings@1450 320
nickjillings@1450 321 for (fileIndex = 0; fileIndex < xmlFiles.length; fileIndex++) {
nickjillings@1450 322 xmlFileName = xmlFileFolder+"/"+xmlFiles[fileIndex];
nickjillings@1450 323 xml = readXML(xmlFileName);
nickjillings@1450 324 if (xml != null) { // if file exists
nickjillings@1450 325 // append file name to array of file names
nickjillings@1450 326 fileNameArray.push(xmlFiles[fileIndex]);
nickjillings@1450 327
nickjillings@1450 328 // get root of XML file
nickjillings@1450 329 root = xml.getElementsByTagName('browserevaluationresult')[0];
nickjillings@1450 330
nickjillings@1450 331 // get subject ID, add to array if not already there
nickjillings@1450 332 pretest = root.getElementsByTagName('pretest')[0];
nickjillings@1450 333 subjectID = pretest.getElementsByTagName('comment')[0];
nickjillings@1450 334 if (subjectID){
nickjillings@1450 335 if (subjectID.getAttribute('id')!='sessionId') { // warning in console when not available
nickjillings@1450 336 console.log(xmlFiles[fileIndex]+': no SessionID available');
nickjillings@1450 337 }
nickjillings@1450 338 if (subjectArray.indexOf(subjectID.textContent) == -1) { // if not already in array
nickjillings@1450 339 subjectArray.push(subjectID.textContent); // append to array
nickjillings@1450 340 }
nickjillings@1450 341 }
nickjillings@1450 342
nickjillings@1450 343 // go over all audioholders, add to array if not already there
nickjillings@1450 344 audioholderNodes = root.getElementsByTagName('audioholder');
nickjillings@1450 345 // go over audioholderNodes and append audioholder name when not present yet
nickjillings@1450 346 for (audioholderIndex = 0; audioholderIndex < audioholderNodes.length; audioholderIndex++) {
nickjillings@1450 347 audioholderName = audioholderNodes[audioholderIndex].getAttribute('id');
nickjillings@1450 348 if (audioholderArray.indexOf(audioholderName) == -1) { // if not already in array
nickjillings@1450 349 audioholderArray.push(audioholderName); // append to array
nickjillings@1450 350 }
nickjillings@1450 351 // within each audioholder, go over all audioelement IDs, add to array if not already there
nickjillings@1450 352 audioelementNodes = audioholderNodes[audioholderIndex].getElementsByTagName('audioelement');
nickjillings@1450 353 for (audioelementIndex = 0; audioelementIndex < audioelementNodes.length; audioelementIndex++) {
nickjillings@1450 354 audioelementName = audioelementNodes[audioelementIndex].getAttribute('id');
nickjillings@1450 355 if (audioelementArray.indexOf(audioelementName) == -1) { // if not already in array
nickjillings@1450 356 audioelementArray.push(audioelementName); // append to array
nickjillings@1450 357 }
nickjillings@1450 358 }
nickjillings@1450 359 }
nickjillings@1450 360 // count occurrences of each audioholder
nickjillings@1450 361 // ...
nickjillings@1450 362 }
nickjillings@1450 363 else {
nickjillings@1450 364 console.log('XML file '+xmlFileName+' not found.');
nickjillings@1450 365 }
nickjillings@1450 366 }
nickjillings@1450 367
nickjillings@1450 368 // sort alphabetically
nickjillings@1450 369 fileNameArray.sort();
nickjillings@1450 370 subjectArray.sort();
nickjillings@1450 371 audioholderArray.sort();
nickjillings@1450 372 audioelementArray.sort();
nickjillings@1450 373
nickjillings@1450 374 // display all information in HTML
nickjillings@1450 375 // show XML file folder
nickjillings@1450 376 document.getElementById('xmlFileFolder_span').innerHTML = "\""+xmlFileFolder+"/\"";
nickjillings@1450 377 // show number of files
nickjillings@1450 378 document.getElementById('numberOfFiles_span').innerHTML = fileNameArray.length;
nickjillings@1450 379 // show list of subject names
nickjillings@1450 380 document.getElementById('subjectArray_span').innerHTML = subjectArray.toString();
nickjillings@1450 381 // show list of audioholders
nickjillings@1450 382 document.getElementById('audioholderArray_span').innerHTML = audioholderArray.toString();
nickjillings@1450 383 // show list of audioelementes
nickjillings@1450 384 document.getElementById('audioelementArray_span').innerHTML = audioelementArray.toString();
nickjillings@1450 385 }
nickjillings@1450 386
nickjillings@1450 387 function printSurveyData() {
nickjillings@1450 388 // print some fields from the survey for different people
nickjillings@1450 389
nickjillings@1450 390 // go over all XML files
nickjillings@1450 391 for (fileIndex = 0; fileIndex < xmlFiles.length; fileIndex++) {
nickjillings@1450 392 xmlFileName = xmlFileFolder+"/"+xmlFiles[fileIndex];
nickjillings@1450 393 xml = readXML(xmlFileName);
nickjillings@1450 394 // make a div
nickjillings@1450 395 var div = document.createElement('div');
nickjillings@1450 396 document.body.appendChild(div);
nickjillings@1450 397 div.id = 'div_survey_'+xmlFileName;
nickjillings@1450 398 div.style.width = '1100px';
nickjillings@1450 399 //div.style.height = '350px';
nickjillings@1450 400
nickjillings@1450 401 // title for that div (subject id)
nickjillings@1450 402 document.getElementById('div_survey_'+xmlFileName).innerHTML = '<h2>'+xmlFileName+'</h2>';
nickjillings@1450 403
nickjillings@1450 404 // which songs did they do
nickjillings@1450 405 if (xml != null) { // if file exists
nickjillings@1450 406 // get root of XML file
nickjillings@1450 407 root = xml.getElementsByTagName('browserevaluationresult')[0];
nickjillings@1450 408 // go over all audioholders
nickjillings@1450 409 // document.getElementById('div_survey_'+xmlFileName).innerHTML += '<strong>Audioholders: </strong>';
nickjillings@1450 410 // audioholderNodes = root.getElementsByTagName('audioholder');
nickjillings@1450 411 // for (audioholderIndex = 0; audioholderIndex < audioholderNodes.length-1; audioholderIndex++) {
nickjillings@1450 412 // document.getElementById('div_survey_'+xmlFileName).innerHTML += audioholderNodes[audioholderIndex].getAttribute('id')+', ';
nickjillings@1450 413 // }
nickjillings@1450 414 // document.getElementById('div_survey_'+xmlFileName).innerHTML += audioholderNodes[audioholderNodes.length-1].getAttribute('id');
nickjillings@1450 415
nickjillings@1450 416 // survey responses (each if available)
nickjillings@1450 417 // get posttest node for total test
nickjillings@1450 418 childNodes = root.childNodes;
nickjillings@1450 419 posttestnode = null;
nickjillings@1450 420 for (idx = 0; idx < childNodes.length; idx++){
nickjillings@1450 421 if (childNodes[childNodes.length-idx-1].tagName == 'posttest') {
nickjillings@1450 422 posttestnode = childNodes[childNodes.length-idx-1];
nickjillings@1450 423 break;
nickjillings@1450 424 }
nickjillings@1450 425 }
nickjillings@1450 426
nickjillings@1450 427 // mix experience
nickjillings@1450 428 if (posttestnode) {
nickjillings@1450 429 posttestcomments = posttestnode.getElementsByTagName('comment');
nickjillings@1450 430 for (idx=0; idx < posttestcomments.length; idx++){
nickjillings@1450 431 commentsToPrint = ['generalExperience', 'interfaceExperience'];
nickjillings@1450 432 idAttribute = posttestcomments[idx].getAttribute('id');
nickjillings@1450 433 if (commentsToPrint.indexOf(idAttribute) >= 0) { // if exists?
nickjillings@1450 434 document.getElementById('div_survey_'+xmlFileName).innerHTML += '<br><strong>'+idAttribute+': </strong>'+posttestcomments[idx].textContent;
nickjillings@1450 435 }
nickjillings@1450 436 }
nickjillings@1450 437 }
nickjillings@1450 438 }
nickjillings@1450 439 }
nickjillings@1450 440 }
nickjillings@1450 441
nickjillings@1450 442 function makePlots() { //TODO: split into different functions
nickjillings@1450 443 // TEMPORARY
nickjillings@1450 444 makeTimeline(xmlFileFolder+"/"+xmlFiles[7]);
nickjillings@1450 445
nickjillings@1450 446 // create value array
nickjillings@1450 447 var ratings = []; // 3D matrix of ratings (audioholder, audioelement, subject)
nickjillings@1450 448 for (audioholderIndex = 0; audioholderIndex < audioholderArray.length; audioholderIndex++) {
nickjillings@1450 449 ratings.push([]);
nickjillings@1450 450 for (audioelementIndex = 0; audioelementIndex < audioelementArray.length; audioelementIndex++) {
nickjillings@1450 451 ratings[audioholderIndex].push([]);
nickjillings@1450 452 }
nickjillings@1450 453 }
nickjillings@1450 454
nickjillings@1450 455 // go over all XML files
nickjillings@1450 456 for (fileIndex = 0; fileIndex < xmlFiles.length; fileIndex++) {
nickjillings@1450 457 xmlFileName = xmlFileFolder+"/"+xmlFiles[fileIndex];
nickjillings@1450 458 xml = readXML(xmlFileName);
nickjillings@1450 459 if (xml != null) { // if file exists
nickjillings@1450 460 // get root of XML file
nickjillings@1450 461 root = xml.getElementsByTagName('browserevaluationresult')[0];
nickjillings@1450 462 // go over all audioholders
nickjillings@1450 463 audioholderNodes = root.getElementsByTagName('audioholder');
nickjillings@1450 464 for (audioholderIndex = 0; audioholderIndex < audioholderNodes.length; audioholderIndex++) {
nickjillings@1450 465 audioholderName = audioholderNodes[audioholderIndex].getAttribute('id');
nickjillings@1450 466 audioelementNodes = audioholderNodes[audioholderIndex].getElementsByTagName('audioelement');
nickjillings@1450 467 // go over all audioelements
nickjillings@1450 468 for (audioelementIndex = 0; audioelementIndex < audioelementNodes.length; audioelementIndex++) {
nickjillings@1450 469 audioelementName = audioelementNodes[audioelementIndex].getAttribute('id');
nickjillings@1450 470 // get value
nickjillings@1450 471 var value = audioelementNodes[audioelementIndex].getElementsByTagName("value")[0].textContent;
nickjillings@1450 472 if (value) { // if not empty, null, undefined...
nickjillings@1450 473 ratingValue = parseFloat(value);
nickjillings@1450 474 // add to matrix at proper position
nickjillings@1450 475 aHidx = audioholderArray.indexOf(audioholderName);
nickjillings@1450 476 aEidx = audioelementArray.indexOf(audioelementName);
nickjillings@1450 477 ratings[aHidx][aEidx].push(ratingValue);
nickjillings@1450 478 }
nickjillings@1450 479 }
nickjillings@1450 480 }
nickjillings@1450 481
nickjillings@1450 482 // go over all audioholders
nickjillings@1450 483
nickjillings@1450 484 // go over all audioelements within audioholder, see if present in idMatrix, add if not
nickjillings@1450 485 // add corresponding rating to 'ratings', at position corresponding with position in idMatrix
nickjillings@1450 486 }
nickjillings@1450 487 }
nickjillings@1450 488
nickjillings@1450 489 for (audioholderIndex = 0; audioholderIndex < audioholderArray.length; audioholderIndex++) {
nickjillings@1450 490 audioholderName = audioholderArray[audioholderIndex]; // for this song
nickjillings@1450 491 tickArray = []
nickjillings@1450 492
nickjillings@1450 493 raw_data = [['SubjectID', 'Rating']];
nickjillings@1450 494 audioElIdx = 0;
nickjillings@1450 495 for (audioelementIndex = 0; audioelementIndex<ratings[audioholderIndex].length; audioelementIndex++){
nickjillings@1450 496 if (ratings[audioholderIndex][audioelementIndex].length>0) {
nickjillings@1450 497 audioElIdx++; // increase if not empty
nickjillings@1450 498 // make tick label
nickjillings@1450 499 tickArray.push({v:audioElIdx, f: audioelementArray[audioelementIndex]});
nickjillings@1450 500 }
nickjillings@1450 501 for (subject = 0; subject<ratings[audioholderIndex][audioelementIndex].length; subject++){
nickjillings@1450 502 // add subject-value pair for each subject
nickjillings@1450 503 raw_data.push([audioElIdx, ratings[audioholderIndex][audioelementIndex][subject]]);
nickjillings@1450 504 }
nickjillings@1450 505 }
nickjillings@1450 506
nickjillings@1450 507 // create plot (one per song)
nickjillings@1450 508 var data = google.visualization.arrayToDataTable(raw_data);
nickjillings@1450 509
nickjillings@1450 510 var options = {
nickjillings@1450 511 title: audioholderName,
nickjillings@1450 512 hAxis: {title: 'audioelement ID', minValue: 0, maxValue: audioElIdx+1,
nickjillings@1450 513 ticks: tickArray},
nickjillings@1450 514 vAxis: {title: 'Rating', minValue: 0, maxValue: 1},
nickjillings@1450 515 seriesType: 'scatter',
nickjillings@1450 516 legend: 'none'
nickjillings@1450 517 };
nickjillings@1450 518 var div = document.createElement('div');
nickjillings@1450 519 document.body.appendChild(div);
nickjillings@1450 520 div.id = 'div_'+audioholderName;
nickjillings@1450 521 div.style.width = '1100px';
nickjillings@1450 522 div.style.height = '350px';
nickjillings@1450 523 var chart = new google.visualization.ComboChart(document.getElementById('div_'+audioholderName));
nickjillings@1450 524 chart.draw(data, options);
nickjillings@1450 525
nickjillings@1450 526 // box plots
nickjillings@1450 527 var div = document.createElement('div');
nickjillings@1450 528 document.body.appendChild(div);
nickjillings@1450 529 div.id = 'div_box_'+audioholderName;
nickjillings@1450 530 div.style.width = '1100px';
nickjillings@1450 531 div.style.height = '350px';
nickjillings@1450 532 // Get median, percentiles, maximum and minimum; outliers.
nickjillings@1450 533 pctl25 = [];
nickjillings@1450 534 pctl75 = [];
nickjillings@1450 535 med = [];
nickjillings@1450 536 min = [];
nickjillings@1450 537 max = [];
nickjillings@1450 538 outlierArray = [];
nickjillings@1450 539 max_n_outliers = 0; // maximum number of outliers for one audioelement
nickjillings@1450 540 for (audioelementIndex = 0; audioelementIndex<ratings[audioholderIndex].length; audioelementIndex++){
nickjillings@1450 541 med.push(median(ratings[audioholderIndex][audioelementIndex])); // median
nickjillings@1450 542 pctl25.push(percentile(ratings[audioholderIndex][audioelementIndex], 25)); // 25th percentile
nickjillings@1450 543 pctl75.push(percentile(ratings[audioholderIndex][audioelementIndex], 75)); // 75th percentile
nickjillings@1450 544 IQR = pctl75[pctl75.length-1]-pctl25[pctl25.length-1];
nickjillings@1450 545 // outliers: range of values which is above pctl75+1.5*IQR or below pctl25-1.5*IQR
nickjillings@1450 546 outliers = [];
nickjillings@1450 547 rest = [];
nickjillings@1450 548 for (idx = 0; idx<ratings[audioholderIndex][audioelementIndex].length; idx++){
nickjillings@1450 549 if (ratings[audioholderIndex][audioelementIndex][idx] > pctl75[pctl75.length-1]+1.5*IQR ||
nickjillings@1450 550 ratings[audioholderIndex][audioelementIndex][idx] < pctl25[pctl25.length-1]-1.5*IQR){
nickjillings@1450 551 outliers.push(ratings[audioholderIndex][audioelementIndex][idx]);
nickjillings@1450 552 }
nickjillings@1450 553 else {
nickjillings@1450 554 rest.push(ratings[audioholderIndex][audioelementIndex][idx]);
nickjillings@1450 555 }
nickjillings@1450 556 }
nickjillings@1450 557 outlierArray.push(outliers);
nickjillings@1450 558 max_n_outliers = Math.max(max_n_outliers, outliers.length); // update max mber
nickjillings@1450 559 // max: maximum value which is not outlier
nickjillings@1450 560 max.push(Math.max.apply(null, rest));
nickjillings@1450 561 // min: minimum value which is not outlier
nickjillings@1450 562 min.push(Math.min.apply(null, rest));
nickjillings@1450 563 }
nickjillings@1450 564
nickjillings@1450 565 // Build data array
nickjillings@1450 566 boxplot_data = [['ID', 'Span', '', '', '', 'Median']];
nickjillings@1450 567 for (idx = 0; idx < max_n_outliers; idx++) {
nickjillings@1450 568 boxplot_data[0].push('Outlier');
nickjillings@1450 569 }
nickjillings@1450 570 for (audioelementIndex = 0; audioelementIndex<ratings[audioholderIndex].length; audioelementIndex++){
nickjillings@1450 571 if (ratings[audioholderIndex][audioelementIndex].length>0) { // if rating array not empty for this audioelement
nickjillings@1450 572 data_array = [
nickjillings@1450 573 audioelementArray[audioelementIndex], // name
nickjillings@1450 574 min[audioelementIndex], // minimum
nickjillings@1450 575 pctl75[audioelementIndex],
nickjillings@1450 576 pctl25[audioelementIndex],
nickjillings@1450 577 max[audioelementIndex], // maximum
nickjillings@1450 578 med[audioelementIndex]
nickjillings@1450 579 ];
nickjillings@1450 580 for (idx = 0; idx < max_n_outliers; idx++) {
nickjillings@1450 581 if (idx<outlierArray[audioelementIndex].length){
nickjillings@1450 582 data_array.push(outlierArray[audioelementIndex][idx]);
nickjillings@1450 583 }
nickjillings@1450 584 else {
nickjillings@1450 585 data_array.push(null);
nickjillings@1450 586 }
nickjillings@1450 587 }
nickjillings@1450 588 boxplot_data.push(data_array);
nickjillings@1450 589 }
nickjillings@1450 590 }
nickjillings@1450 591
nickjillings@1450 592 // Create and populate the data table.
nickjillings@1450 593 var data = google.visualization.arrayToDataTable(boxplot_data);
nickjillings@1450 594 // Create and draw the visualization.
nickjillings@1450 595 var ac = new google.visualization.ComboChart(document.getElementById('div_box_'+audioholderName));
nickjillings@1450 596 ac.draw(data, {
nickjillings@1450 597 title : audioholderName,
nickjillings@1450 598 //width: 600,
nickjillings@1450 599 //height: 400,
nickjillings@1450 600 vAxis: {title: "Rating"},
nickjillings@1450 601 hAxis: {title: "audioelement ID"},
nickjillings@1450 602 seriesType: "line",
nickjillings@1450 603 pointSize: 5,
nickjillings@1450 604 lineWidth: 0,
nickjillings@1450 605 colors: ['black'],
nickjillings@1450 606 series: { 0: {type: "candlesticks", color: 'blue'}, // box plot shape
nickjillings@1450 607 1: {type: "line", pointSize: 10, lineWidth: 0, color: 'red' } }, // median
nickjillings@1450 608 legend: 'none'
nickjillings@1450 609 });
nickjillings@1450 610 }
nickjillings@1450 611 }
nickjillings@1450 612
nickjillings@1450 613 function makeTimeline(xmlFileName){ // WIP
nickjillings@1450 614 // Based on the XML file name, take time data and plot playback and marker movements
nickjillings@1450 615
nickjillings@1450 616 // read XML file and check if exists
nickjillings@1450 617 xml = readXML(xmlFileName);
nickjillings@1450 618 if (!xml) { // if file does not exist
nickjillings@1450 619 console.log('XML file '+xml+'does not exist. ('+xmlFileName+')')
nickjillings@1450 620 return; // do nothing; exit function
nickjillings@1450 621 }
nickjillings@1450 622 // get root of XML file
nickjillings@1450 623 root = xml.getElementsByTagName('browserevaluationresult')[0];
nickjillings@1450 624
nickjillings@1450 625 audioholder_time = 0;
nickjillings@1450 626 previous_audioholder_time = 0; // time spent before current audioholder
nickjillings@1450 627 time_offset = 0; // test starts at zero
nickjillings@1450 628
nickjillings@1450 629 // go over all audioholders
nickjillings@1450 630 audioholderNodes = root.getElementsByTagName('audioholder');
nickjillings@1450 631 for (audioholderIndex = 0; audioholderIndex < audioholderNodes.length; audioholderIndex++) {
nickjillings@1450 632 audioholderName = audioholderNodes[audioholderIndex].getAttribute('id');
nickjillings@1450 633 if (!audioholderName) {
nickjillings@1450 634 console.log('audioholder name is empty; go to next one. ('+xmlFileName+')');
nickjillings@1450 635 break;
nickjillings@1450 636 }
nickjillings@1450 637
nickjillings@1450 638 // subtract total audioholder length from subsequent audioholder event times
nickjillings@1450 639 audioholder_children = audioholderNodes[audioholderIndex].childNodes;
nickjillings@1450 640 foundIt = false;
nickjillings@1450 641 console.log(audioholder_children[2].getElementsByTagName("metricResult")) // not working!
nickjillings@1450 642 for (idx = 0; idx<audioholder_children.length; idx++) { // go over children
nickjillings@1450 643
nickjillings@1450 644 if (audioholder_children[idx].getElementsByTagName('metricResult').length) {
nickjillings@1450 645 console.log(audioholder_children[idx].getElementsByTagName('metricResult')[0]);
nickjillings@1450 646 if (audioholder_children[idx].getElementsByTagName('metricResult')[0].getAttribute('id') == "testTime"){
nickjillings@1450 647 audioholder_time = parseFloat(audioholder_children[idx].getElementsByTagName('metricResult')[0].textContent);
nickjillings@1450 648 console.log(audioholder_time);
nickjillings@1450 649 foundIt = true;
nickjillings@1450 650 }
nickjillings@1450 651 }
nickjillings@1450 652 }
nickjillings@1450 653 if (!foundIt) {
nickjillings@1450 654 console.log("Skipping audioholder without total time specified from "+xmlFileName+"."); // always hitting this
nickjillings@1450 655 break;
nickjillings@1450 656 }
nickjillings@1450 657
nickjillings@1450 658 audioelementNodes = audioholderNodes[audioholderIndex].getElementsByTagName('audioelement');
nickjillings@1450 659
nickjillings@1450 660 // make div
nickjillings@1450 661
nickjillings@1450 662 // draw chart
nickjillings@1450 663
nickjillings@1450 664 // legend with audioelement names
nickjillings@1450 665 }
nickjillings@1450 666 }
nickjillings@1450 667
nickjillings@1450 668 </script>
nickjillings@1450 669
nickjillings@1450 670
nickjillings@1450 671
nickjillings@1450 672 <style>
nickjillings@1450 673 div {
nickjillings@1450 674 padding: 2px;
nickjillings@1450 675 margin-top: 2px;
nickjillings@1450 676 margin-bottom: 2px;
nickjillings@1450 677 }
nickjillings@1450 678 div.head{
nickjillings@1450 679 margin-left: 10px;
nickjillings@1450 680 border: black;
nickjillings@1450 681 border-width: 2px;
nickjillings@1450 682 border-style: solid;
nickjillings@1450 683 }
nickjillings@1450 684 div.attrib{
nickjillings@1450 685 margin-left:25px;
nickjillings@1450 686 border: black;
nickjillings@1450 687 border-width: 2px;
nickjillings@1450 688 border-style: dashed;
nickjillings@1450 689 margin-bottom: 10px;
nickjillings@1450 690 }
nickjillings@1450 691 div#headerMatter{
nickjillings@1450 692 background-color: #FFFFCC;
nickjillings@1450 693 }
nickjillings@1450 694 div#currentStatement{
nickjillings@1450 695 font-size:3.0em;
nickjillings@1450 696 font-weight: bold;
nickjillings@1450 697
nickjillings@1450 698 }
nickjillings@1450 699 div#debugDisplay {
nickjillings@1450 700 color: #CCCCCC;
nickjillings@1450 701 font-size:0.3em;
nickjillings@1450 702 }
nickjillings@1450 703 span#scoreDisplay {
nickjillings@1450 704 font-weight: bold;
nickjillings@1450 705 }
nickjillings@1450 706 div#wrapper {
nickjillings@1450 707 width: 780px;
nickjillings@1450 708 border: 1px solid black;
nickjillings@1450 709 overflow: hidden; /* add this to contain floated children */
nickjillings@1450 710 }
nickjillings@1450 711 div#instrumentSection {
nickjillings@1450 712 width: 250px;
nickjillings@1450 713 border: 1px solid red;
nickjillings@1450 714 display: inline-block;
nickjillings@1450 715 }
nickjillings@1450 716 div#featureSection {
nickjillings@1450 717 width: 250px;
nickjillings@1450 718 border: 1px solid green;
nickjillings@1450 719 display: inline-block;
nickjillings@1450 720 }
nickjillings@1450 721 div#valenceSection {
nickjillings@1450 722 width: 250px;
nickjillings@1450 723 border: 1px solid blue;
nickjillings@1450 724 display: inline-block;
nickjillings@1450 725 }
nickjillings@1450 726 button#previousComment{
nickjillings@1450 727 width: 120px;
nickjillings@1450 728 height: 150px;
nickjillings@1450 729 font-size:1.5em;
nickjillings@1450 730 }
nickjillings@1450 731 button#nextComment{
nickjillings@1450 732 width: 666px;
nickjillings@1450 733 height: 150px;
nickjillings@1450 734 font-size:1.5em;
nickjillings@1450 735 }
nickjillings@1450 736 ul
nickjillings@1450 737 {
nickjillings@1450 738 list-style-type: none; /* no bullet points */
nickjillings@1450 739 margin-left: -20px; /* less indent */
nickjillings@1450 740 margin-top: 0px;
nickjillings@1450 741 margin-bottom: 5px;
nickjillings@1450 742 }
nickjillings@1450 743 </style>
nickjillings@1450 744
nickjillings@1450 745 </head>
nickjillings@1450 746
nickjillings@1450 747 <body>
nickjillings@1450 748 <h1>Subjective evaluation results</h1>
nickjillings@1450 749
nickjillings@1450 750 <div id="debugDisplay">
nickjillings@1450 751 XML file folder: <span id="xmlFileFolder_span"></span>
nickjillings@1450 752 </div>
nickjillings@1450 753
nickjillings@1450 754 <div id="headerMatter">
nickjillings@1450 755 <div>
nickjillings@1450 756 <strong>Result XML files:</strong> <span id="numberOfFiles_span"></span>
nickjillings@1450 757 </div>
nickjillings@1450 758 <div>
nickjillings@1450 759 <strong>Audioholders in dataset:</strong> <span id="audioholderArray_span"></span>
nickjillings@1450 760 </div>
nickjillings@1450 761 <div>
nickjillings@1450 762 <strong>Subjects in dataset:</strong> <span id="subjectArray_span"></span>
nickjillings@1450 763 </div>
nickjillings@1450 764 <div>
nickjillings@1450 765 <strong>Audioelements in dataset:</strong> <span id="audioelementArray_span"></span>
nickjillings@1450 766 </div>
nickjillings@1450 767 <br>
nickjillings@1450 768 </div>
nickjillings@1450 769 <br>
nickjillings@1450 770
nickjillings@1450 771 <!-- Show time elapsed
nickjillings@1450 772 The last annotation took <strong><span id="timeDisplay">(N/A)</span></strong> seconds.
nickjillings@1450 773 <br>-->
nickjillings@1450 774
nickjillings@1450 775 </body>
nickjillings@1450 776 </html>