- Timestamp:
- 2021-04-15T00:44:15+12:00 (3 years ago)
- Location:
- main/trunk/model-sites-dev/eurovision-lod/collect/eurovision
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/js/dataviz.js
r35039 r35071 69 69 $('#ssv-voting-dataflow-jury-endyear').autocomplete({source: all_esc_years}); 70 70 71 $('#ssv-voting-dataflow-tele-startyear').autocomplete({source: ["2018", "2019"]}); 72 $('#ssv-voting-dataflow-tele-endyear').autocomplete({source: ["2018", "2019"]}); 71 $('#ssv-voting-dataflow-tele-startyear').autocomplete( {source: ["2016", "2017", "2018", "2019"]} ); 72 $('#ssv-voting-dataflow-tele-endyear').autocomplete( {source: ["2016", "2017", "2018", "2019"]} ); 73 74 $('#ssv-jury-tele-diff-tocountry').autocomplete({source: esc_countries}); 75 $('#ssv-jury-tele-diff-inyear').autocomplete({source: ["2016", "2017", "2018", "2019"]}); 73 76 }) 77 78 79 80 function ssq_load(query_text_id) 81 { 82 $('#sample-sparql-query').val($('#'+query_text_id).text().trim()); 83 $('.exec-ssq').hide(); 84 $('#exec-'+query_text_id).show(); 85 } 86 87 function ssq_execute() 88 { 89 $('#sample-sparql-query-form').submit(); 90 } 91 92 93 94 95 function ssv_load(query_text_id) 96 { 97 var sample_data_sgvizler_query = $('#'+query_text_id).text().trim(); 98 $('#sample-data-sgvizler-query').val(sample_data_sgvizler_query); 99 100 if ($('#'+query_text_id+"-chart").length>0) { 101 // Override existing val with custom value 102 $('#sample-data-sgvizler-chart').val($('#'+query_text_id+"-chart").text().trim()); 103 } 104 105 if ($('#'+query_text_id+"-chart-options").length>0) { 106 // Override existing val with custom value 107 $('#sample-data-sgvizler-chart-options').val($('#'+query_text_id+"-chart-options").text().trim()); 108 } 109 110 if ($('#'+query_text_id+"-div-style").length>0) { 111 // Override existing val with custom value 112 $('#sample-div-style').val($('#'+query_text_id+"-div-style").text().trim()); 113 } 114 else { 115 $('#sample-div-style').val($('#ssv-orig-div-style').text().trim()); 116 } 117 118 $('.exec-ssq').hide(); 119 $('#exec-'+query_text_id).show(); 120 } 121 122 123 124 function ssv_execute(query_text_id) 125 { 126 if (query_text_id) { 127 var sample_data_sgvizler_query = $('#'+query_text_id).text().trim(); 128 129 if ($('#'+query_text_id+"-startyear").length>0) { 130 var start_year = $('#'+query_text_id+"-startyear").val(); 131 sample_data_sgvizler_query = sample_data_sgvizler_query.replace(/\*\*startyear\*\*/g,start_year); 132 } 133 134 if ($('#'+query_text_id+"-endyear").length>0) { 135 var end_year = $('#'+query_text_id+"-endyear").val(); 136 sample_data_sgvizler_query = sample_data_sgvizler_query.replace(/\*\*endyear\*\*/g,end_year); 137 } 138 139 if ($('#'+query_text_id+"-inyear").length>0) { 140 var in_year = $('#'+query_text_id+"-inyear").val(); 141 sample_data_sgvizler_query = sample_data_sgvizler_query.replace(/\*\*inyear\*\*/g,in_year); 142 } 143 144 if ($('#'+query_text_id+"-tocountry").length>0) { 145 var to_country = $('#'+query_text_id+"-tocountry").val(); 146 to_country = to_country.replace(/^the\s+/i,""); 147 sample_data_sgvizler_query = sample_data_sgvizler_query.replace(/\*\*tocountry\*\*/g,to_country); 148 } 149 150 $('#sample-data-sgvizler-query').val(sample_data_sgvizler_query); 151 } 152 153 154 var sgvizler_div_raw_text = $('#sample-sgvizler-div').val(); 155 156 var data_sgvizler_endpoint = $('#sample-data-sgvizler-endpoint').val().trim(); 157 var data_sgvizler_chart = $('#sample-data-sgvizler-chart').val().trim(); 158 var data_sgvizler_chart_options = $('#sample-data-sgvizler-chart-options').val().trim(); 159 160 var div_style = $('#sample-div-style').val(); 161 162 var $sgvizler_div2 = $('<div>').attr("id","sgvizler-div"); 163 $sgvizler_div2.attr("data-sgvizler-endpoint",data_sgvizler_endpoint); 164 $sgvizler_div2.attr("data-sgvizler-chart",data_sgvizler_chart); 165 $sgvizler_div2.attr("data-sgvizler-chart-options",data_sgvizler_chart_options); 166 $sgvizler_div2.attr("data-sgvizler-log","2"); 167 168 $sgvizler_div2.attr("style",div_style); 169 170 var data_sgvizler_query_raw_text = $('#sample-data-sgvizler-query').val(); 171 $sgvizler_div2.attr('data-sgvizler-query',data_sgvizler_query_raw_text); 172 173 $('#sgvizler-div-outer').empty().append($sgvizler_div2); 174 175 sgvizler2.containerDraw('sgvizler-div'); 176 177 var url = window.location.href; 178 window.location.href = url + "#sgvizler-plot"; 179 history.replaceState(null,null,url); 180 } -
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/js/eurovision.js
r35063 r35071 17 17 "UnitedKingdom": "United Kingdom", 18 18 }; 19 20 21 var esc_countries = [ 22 "Albania", 23 "Andorra", 24 "Armenia", 25 "Australia", 26 "Austria", 27 "Azerbaijan", 28 "Belarus", 29 "Belgium", 30 "Bosnia and Herzegovina", 31 "Bulgaria", 32 "Croatia", 33 "Cyprus", 34 "Czech Republic", 35 "Denmark", 36 "Estonia", 37 "Finland", 38 "France", 39 "Georgia", 40 "Germany", 41 "Greece", 42 "Hungary", 43 "Iceland", 44 "Ireland", 45 "Israel", 46 "Italy", 47 "Latvia", 48 "Lithuania", 49 "Luxembourg", 50 "Macedonia", 51 "Malta", 52 "Moldova", 53 "Monaco", 54 "Montenegro", 55 "Morocco", 56 "The Netherlands", 57 "North Macedonia", 58 "Norway", 59 "Poland", 60 "Portugal", 61 "Romania", 62 "Russia", 63 "San Marino", 64 "Serbia", 65 "Serbia and Montenegro", 66 "Slovakia", 67 "Slovenia", 68 "Spain", 69 "Sweden", 70 "Switzerland", 71 "Turkey", 72 "Ukraine", 73 "United Kingdom", 74 "Yugoslavia", 75 ]; 76 77 78 19 79 20 80 function transpose_i(i,num_cols,num_rows,num_countries) … … 160 220 var votes_country_json_type = "VotesCountryJSON-" + vote_type; 161 221 var votes_points_json_type = "VotesPointsJSON-" + vote_type; 162 var vote_label = (vote_type == "J") ? "Jury votes" : "Televotes"; 222 var vote_label; 223 if (vote_type == "J") { 224 vote_label = "Jury votes"; 225 } 226 else if (vote_type == "T") { 227 vote_label = "Televotes"; 228 } 229 else { 230 vote_label = "Separate Jury and Televotes Added Together"; 231 } 163 232 164 233 var $vote_div = $('<div>').attr("class","voting-label").append(vote_label); … … 239 308 240 309 241 242 function ssq_load(query_text_id)243 {244 $('#sample-sparql-query').val($('#'+query_text_id).text().trim());245 $('.exec-ssq').hide();246 $('#exec-'+query_text_id).show();247 }248 249 function ssq_execute()250 {251 $('#sample-sparql-query-form').submit();252 }253 254 255 256 257 function ssv_load(query_text_id)258 {259 var sample_data_sgvizler_query = $('#'+query_text_id).text().trim();260 $('#sample-data-sgvizler-query').val(sample_data_sgvizler_query);261 262 if ($('#'+query_text_id+"-chart").length>0) {263 // Override existing val with custom value264 $('#sample-data-sgvizler-chart').val($('#'+query_text_id+"-chart").text().trim());265 }266 267 if ($('#'+query_text_id+"-chart-options").length>0) {268 // Override existing val with custom value269 $('#sample-data-sgvizler-chart-options').val($('#'+query_text_id+"-chart-options").text().trim());270 }271 272 if ($('#'+query_text_id+"-div-style").length>0) {273 // Override existing val with custom value274 $('#sample-div-style').val($('#'+query_text_id+"-div-style").text().trim());275 }276 else {277 $('#sample-div-style').val($('#ssv-orig-div-style').text().trim());278 }279 280 $('.exec-ssq').hide();281 $('#exec-'+query_text_id).show();282 }283 284 285 286 function ssv_execute(query_text_id)287 {288 if (query_text_id) {289 var sample_data_sgvizler_query = $('#'+query_text_id).text().trim();290 291 if ($('#'+query_text_id+"-startyear").length>0) {292 var start_year = $('#'+query_text_id+"-startyear").val();293 sample_data_sgvizler_query = sample_data_sgvizler_query.replaceAll("**startyear**",start_year);294 }295 296 if ($('#'+query_text_id+"-endyear").length>0) {297 var end_year = $('#'+query_text_id+"-endyear").val();298 sample_data_sgvizler_query = sample_data_sgvizler_query.replaceAll("**endyear**",end_year);299 }300 301 $('#sample-data-sgvizler-query').val(sample_data_sgvizler_query);302 }303 304 305 var sgvizler_div_raw_text = $('#sample-sgvizler-div').val();306 307 var data_sgvizler_endpoint = $('#sample-data-sgvizler-endpoint').val().trim();308 var data_sgvizler_chart = $('#sample-data-sgvizler-chart').val().trim();309 var data_sgvizler_chart_options = $('#sample-data-sgvizler-chart-options').val().trim();310 311 var div_style = $('#sample-div-style').val();312 313 var $sgvizler_div2 = $('<div>').attr("id","sgvizler-div");314 $sgvizler_div2.attr("data-sgvizler-endpoint",data_sgvizler_endpoint);315 $sgvizler_div2.attr("data-sgvizler-chart",data_sgvizler_chart);316 $sgvizler_div2.attr("data-sgvizler-chart-options",data_sgvizler_chart_options);317 $sgvizler_div2.attr("data-sgvizler-log","2");318 319 $sgvizler_div2.attr("style",div_style);320 321 var data_sgvizler_query_raw_text = $('#sample-data-sgvizler-query').val();322 $sgvizler_div2.attr('data-sgvizler-query',data_sgvizler_query_raw_text);323 324 $('#sgvizler-div-outer').empty().append($sgvizler_div2);325 326 sgvizler2.containerDraw('sgvizler-div');327 328 var url = window.location.href;329 window.location.href = url + "#sgvizler-plot";330 history.replaceState(null,null,url);331 } -
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/dataviz/voting-dataflow-tele.xsl
r35056 r35071 53 53 <!-- --> 54 54 <xsl:text> 55 title=Dataflow Analysis of Televoting by Country (201 8-2019)|height=1200|chartArea.height=1100|fontSize=1155 title=Dataflow Analysis of Televoting by Country (2016-2019)|height=1200|chartArea.height=1100|fontSize=11 56 56 </xsl:text> 57 57 </div> -
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/document.xsl
r35065 r35071 63 63 Jury 64 64 </gsf:when> 65 <gsf:when test="equals" test-value="T"> 66 Televotes 67 </gsf:when> 65 68 <gsf:otherwise> 66 Televotes69 Separate Jury and Televotes Added Together 67 70 </gsf:otherwise> 68 71 </gsf:switch> -
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sgvizler.xsl
r35067 r35071 22 22 <xsl:include href="dataviz/voting-dataflow-jury.xsl"/> 23 23 <xsl:include href="dataviz/voting-dataflow-tele.xsl"/> 24 <xsl:include href="dataviz/jury-tele-diff.xsl"/> 24 25 <xsl:include href="dataviz/draw-bias.xsl"/> 25 26 <xsl:include href="dataviz/draw-bias-normalized.xsl"/> … … 263 264 <xsl:call-template name="ssv-voting-dataflow-jury"/> 264 265 <xsl:call-template name="ssv-voting-dataflow-tele"/> 266 <xsl:call-template name="ssv-jury-tele-diff"/> 265 267 <xsl:call-template name="ssv-draw-bias"/> 266 268 <xsl:call-template name="ssv-draw-bias-normalized"/> … … 378 380 379 381 <li> 382 <b>Differences between Jury and Televoting:</b><br/> 383 <div> 384 <button type="button" class="load-ssq" id="load-ssv-jury-tele-diff" onclick="ssv_load('ssv-jury-tele-diff')">Load query above</button> 385 <span style="padding-right: 12px;"> 386 For the country: <input type="text" id="ssv-jury-tele-diff-tocountry" value="The Netherlands" style="width: 180px; padding-left: 6px"/> 387 In the year: <input type="text" id="ssv-jury-tele-diff-inyear" value="2019" style="width: 80px; padding-left: 6px"/> 388 </span> 389 390 <button type="button" class="exec-ssq" id="exec-ssv-jury-tele-diff" onclick="ssv_execute('ssv-jury-tele-diff')">Visualize Results</button><br/> 391 </div> 392 <p> 393 Plot as a Tree-map how the various juries have cast 394 their votes for a specific country. The area of the 395 block represents the number of points awarded by 396 the jury. To this we add colouring 397 to the block to show how much in agreement 398 the televote was: red indicates the televote was 399 higher than the the jury vote; green is when the 400 votes are similar (neutral); and 401 blue indicates the televote was lower then the 402 jury vote. 403 </p> 404 </li> 405 406 407 <li> 380 408 <b>The Curse of Being the Second Performer in the Lineup?</b><br/> 381 409 <button type="button" class="load-ssq" id="load-ssv-draw-bias" onclick="ssv_load('ssv-draw-bias')">Load query above</button>
Note:
See TracChangeset
for help on using the changeset viewer.