Index: main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/js/eurovision.js
===================================================================
--- main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/js/eurovision.js	(revision 35188)
+++ main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/js/eurovision.js	(revision 35189)
@@ -492,9 +492,10 @@
 }
 
+// endpoint
+var endpoint_url="//localhost:4040/greenstone/query"; // **** External IP? ****
+//var endpoint_url="//so-we-must-think.space/greenstone3-lod3/greenstone/query";
+
 function ajaxpick_random_entrant() {
 
-    // endpoint
-    var endpoint_url="//localhost:4040/greenstone/query"; // **** External IP? ****
-    //var endpoint_url="//sowemustthink.space/greenstone3-lod3/greenstone/query";
     var sparql_query = $('#select-random-entrant-sparqlquery').text();
 
@@ -511,2 +512,101 @@
     });
 }
+
+
+function display_treemap_winner_2021(json_data)
+{
+    //console.log('display-treemap-winner-2021');
+
+    google.charts.load('current', {'packages':['treemap']});
+    google.charts.setOnLoadCallback(drawChart);
+
+    function drawChart() {
+
+	
+	var results = json_data.results.bindings;
+
+	var data_array = []
+
+	var results_len = results.length;
+
+	var data_header = [ "Vote from country", "To country",
+			    "Total Jury/Tele-combined Vote", "Difference in vote",
+			    "Jury Vote", "Televote"];
+	data_array.push(data_header);
+
+	//console.log(results);
+	for (var i=0; i<results_len; i++) {
+	    var result = results[i];
+
+	    var jt_vote_from_country = result.jt_vote_from_country.value;
+	    var to_country           = (result.to_country) ? result.to_country.value : null;
+	    var total_vote_int       = parseInt((result.total_vote_int) ? result.total_vote_int.value : 0);
+	    var diff_vote_int        = parseInt((result.diff_vote_int) ? result.diff_vote_int.value : 0);
+	    var jury_vote_int        = parseInt((result.j_vote_int) ? result.j_vote_int.value : 0);
+	    var tele_vote_int        = parseInt((result.t_vote_int) ? result.t_vote_int.value : 0);
+	    
+	    var data_row = [ jt_vote_from_country, to_country,
+			     total_vote_int, diff_vote_int,
+			     jury_vote_int, tele_vote_int ];
+	    
+	    data_array.push(data_row);
+	}
+	//console.log(data_array);
+
+	
+        var data = google.visualization.arrayToDataTable(data_array)
+	var tree = new google.visualization.TreeMap(document.getElementById('treemap-voting-for-winner-2021-divchart'));
+	tree.draw(data, {
+	    title: "Difference in Jury and Televoting for Italy, the Eurovision Song Contest Winner in 2021",
+	    height: 600,
+	    chartArea: { height: 1100},
+	    fontSize: 14,
+	    minColorValue: -12,
+	    maxColorValue: 12,
+	    minColor: "#008896",
+	    midColor: "#f7f7f7",
+	    maxColor: "#ee4000",
+	    headerHeight: 15,
+	    showScale: true,
+            fontColor: 'black',
+	    generateTooltip: showTreemapWinner2021Tooltip
+        });
+
+	function showTreemapWinner2021Tooltip(row, size, value) {
+
+	    var from_country = data.getValue(row, 0);
+	    var to_country   = data.getValue(row, 1);
+	    var total_votes  = data.getValue(row, 2);
+	    var diff_votes   = data.getValue(row, 3);
+	    var jury_votes   = data.getValue(row, 4);
+	    var tele_votes   = data.getValue(row, 5);
+	    
+	    return '<div style="background:#fd9; padding:10px; border-style:solid;">' +
+		'<span style="font-family:Courier"><b>Voting total from ' + from_country 
+		+ ' to ' + to_country + ': ' + total_votes + '</b>'
+		+ ' (a difference of ' + diff_votes + ')<br />'
+		+ 'Tele Vote: ' + tele_votes + '<br />'
+		+ 'Jury Vote: ' + jury_votes + '<br />'
+		+ '</span></div>';
+
+	}
+	
+    }
+}
+
+function ajax_display_treemap_winner_2021() {
+
+    var sparql_query = $('#treemap-voting-for-winner-2021-sparqlquery').text();
+
+    $("#select-random-entrant-div").css("cursor", "progress");
+    $("#select-random-entrant-div a").css("cursor", "progress");
+    $("#select-random-entrant-div button").css("cursor", "progress");
+    
+    $.ajax({
+	type: "POST",
+	url: endpoint_url,
+	data: { query: sparql_query, output: "json" },
+	success: display_treemap_winner_2021,
+	dataType: "json"
+    });
+}
Index: main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/layouts/header.xsl
===================================================================
--- main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/layouts/header.xsl	(revision 35188)
+++ main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/layouts/header.xsl	(revision 35189)
@@ -12,10 +12,21 @@
 
   <!-- Apache Jena Fuseki v3 -->
-  <xsl:variable name="sparqlEndpointHostAndOptPort">localhost:4040</xsl:variable> <!-- **** External IP? ****-->
-  <xsl:variable name="sparqlGraphBasePrefix">http://localhost:8383</xsl:variable> <!-- **** External IP? ****-->
+  
+  <xsl:variable name="sparqlEndpointHostAndOptPort">localhost:4040</xsl:variable> < ! - - **** External IP? ****- - >
+  <xsl:variable name="sparqlGraphBasePrefix">http://localhost:8383</xsl:variable> < ! - - **** External IP? ****- - >
 
+  <xsl:variable name="sparqlEndpointPrefix1"></xsl:variable>
   <xsl:variable name="sparqlEndpointPrefix3"></xsl:variable>
-  <xsl:variable name="sparqlEndpoint3">http://localhost:4040</xsl:variable>       <!-- **** External IP ? **** -->
+  <xsl:variable name="sparqlEndpoint3">http://localhost:4040</xsl:variable>       < ! - - **** External IP ? **** - - >
 
+  <!--
+  <xsl:variable name="sparqlEndpointHostAndOptPort">so-we-must-think.space</xsl:variable>
+  <xsl:variable name="sparqlGraphBasePrefix">https://so-we-must-think.space</xsl:variable> 
+
+  <xsl:variable name="sparqlEndpointPrefix3">/greenstone3-lod3</xsl:variable>
+  <xsl:variable name="sparqlEndpointPrefix1">/greenstone3-lod</xsl:variable>
+  <xsl:variable name="sparqlEndpoint3">https://so-we-must-think.space/greenstone3-lod3</xsl:variable>
+  -->
+  
   <!--
   <xsl:variable name="sparqlEndpointProtocol">https</xsl:variable>
Index: main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/about.xsl
===================================================================
--- main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/about.xsl	(revision 35188)
+++ main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/about.xsl	(revision 35189)
@@ -160,7 +160,11 @@
 	    </ul>	    
 	  </p>
-
+	  
 	  <!-- endpoint -->
-	  <xsl:variable name="graphURI"><xsl:value-of select="$sparqlGraphBasePrefix"/><xsl:value-of select="$siteURL"/><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/></xsl:variable>	  
+	  
+	  <xsl:variable name="graphURI"><xsl:value-of select="$sparqlGraphBasePrefix"/><xsl:value-of select="$siteURL"/><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/></xsl:variable>
+	  <!--
+	  <xsl:variable name="graphURI"><xsl:value-of select="$sparqlGraphBasePrefix"/><xsl:value-of select="$siteURL"/>eurovision-dev-library/collection/<xsl:value-of select="$collName"/></xsl:variable>	  
+	  -->
 	  <!-- 
 	       Kudos to:
@@ -202,7 +206,72 @@
 
 	  <h2>Data Analysis and Visualization</h2>
+
+
+	  <!-- bespoke visualization done by getting SPARQL data first, and then
+	       feeding into Google Charts (Treemap) to get better control -->
+	  <div id="treemap-voting-for-winner-2021-sparqlquery" style="display: none;">
+PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
+PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;
+PREFIX gsdlextracted: &lt;http://greenstone.org/gsdlextracted#&gt;
+
+SELECT  (?j_country AS ?jt_vote_from_country) ?to_country ?total_vote_int ?diff_vote_int ?j_vote_int ?t_vote_int 
+WHERE {
+{
+  GRAPH &lt;<xsl:value-of select="$graphURI"/>&gt;  {
+
+  ?esc_entrant_uri gsdlextracted:Year ?year
+      FILTER(xsd:integer(?year) = 2021).
+
+    ?esc_entrant_uri ?gsdlextracted_j_country_uri ?j_vote.
+    BIND(STRENDS(str(?gsdlextracted_j_country_uri),"-J") AS ?is_j_vote).
+    FILTER (?is_j_vote).
+    BIND(REPLACE(str(?gsdlextracted_j_country_uri), ".*#(.*?)-J$", "$1") AS ?j_country).
+
+    ?esc_entrant_uri ?gsdlextracted_t_country_uri ?t_vote.
+    BIND(STRENDS(str(?gsdlextracted_t_country_uri),"-T") AS ?is_t_vote).
+    FILTER (?is_t_vote).
+    BIND(REPLACE(str(?gsdlextracted_t_country_uri), ".*#(.*?)-T$", "$1") AS ?t_country).
+
+    FILTER(?j_country = ?t_country).
+
+    BIND(xsd:integer(?j_vote) AS ?j_vote_int).
+    BIND(xsd:integer(?t_vote) AS ?t_vote_int).
+
+    BIND((?t_vote_int + ?j_vote_int) AS ?total_vote_int).
+    BIND((?t_vote_int - ?j_vote_int) AS ?diff_vote_int).
+
+    ?esc_entrant_uri gsdlextracted:Country ?to_country.
+
+    FILTER(?to_country = "Italy").
+      
+  }
+ }
+ UNION { 
+  VALUES (?j_country ?to_country ?total_vote_int ?diff_vote_int ?j_vote_int ?t_vote_int ) {
+     ( "Italy"  UNDEF 0 0 0 0 )
+  }
+ }
+}
+	  </div>
+	  <style>
+	    .google-visualization-tooltip {
+	       z-index: 1000;
+	       }
+	     .goog-tooltip {
+	       z-index: 1000;
+	     }
+	  </style>
+	  <div id="treemap-voting-for-winner-2021-divchart" style="width: 900px; height: 600px; background-color: #fff; margin-left: auto; margin-right: auto; margin-bottom: 12px;">">
+	    Loading ...
+	  </div>
+
+	  <gsf:script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"/>
+	  <gsf:script>
+	    $(document).ready(function() { ajax_display_treemap_winner_2021() });
+	  </gsf:script>
 	  
 	  <gsf:script src="ext/jena/sgvizler2/sgvizler2.js"/>
 
+	  <!--
 	  <gsf:script>
 	      $(document).ready(	
@@ -218,6 +287,8 @@
 	      );
 	  </gsf:script>
+	  -->
 
 	  <!-- endpoint -->
+	  <!--
 	  <div id="sgvizler2-country-count"
 	       data-sgvizler-endpoint="//{$sparqlEndpointHostAndOptPort}{$sparqlEndpointPrefix3}/greenstone/query"
@@ -245,6 +316,6 @@
 	       <xsl:text> Loading ...</xsl:text>
 	  </div>
-
-	 
+	  -->
+	  <!--
 	  <p style="padding-top: 10px;">
 	    All the metadata in the digital library is simultaneously
@@ -257,6 +328,7 @@
 	    competed, alphabetically sorted.
 	  </p>
+	  -->
 	  <p>
-	    Through our:
+	    For more visualization, see our:
 	    <ul>
 	      <li>
@@ -266,5 +338,5 @@
 	  </p>
 	  <p>
-	    we provide samples you can try out to give you an idea of
+	    where we provide samples you can try out to give you an idea of
 	    the sorts of visualization that can be produced. More
 	    importantly, these samples are editable so you are free to
Index: main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sgvizler.xsl
===================================================================
--- main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sgvizler.xsl	(revision 35188)
+++ main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sgvizler.xsl	(revision 35189)
@@ -13,6 +13,9 @@
 
 	<!-- endpoint -->
+	
 	<xsl:variable name="graphURI"><xsl:value-of select="$sparqlGraphBasePrefix"/><xsl:value-of select="$siteURL"/><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/></xsl:variable>	
-	
+	<!--
+	<xsl:variable name="graphURI"><xsl:value-of select="$sparqlGraphBasePrefix"/><xsl:value-of select="$siteURL"/>eurovision-dev-library/collection/<xsl:value-of select="$collName"/></xsl:variable>	  	
+	-->
 	<xsl:include href="dataviz/made-the-final.xsl"/>
 	<xsl:include href="dataviz/list-of-winners.xsl"/>
Index: main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sparql.xsl
===================================================================
--- main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sparql.xsl	(revision 35188)
+++ main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sparql.xsl	(revision 35189)
@@ -118,6 +118,9 @@
 
 	  <!-- endpoint -->
+
 	  <xsl:variable name="graphURI"><xsl:value-of select="$sparqlGraphBasePrefix"/><xsl:value-of select="$siteURL"/><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/></xsl:variable>
-	  
+	  <!--
+	  <xsl:variable name="graphURI"><xsl:value-of select="$sparqlGraphBasePrefix"/><xsl:value-of select="$siteURL"/>eurovision-dev-library/collection/<xsl:value-of select="$collName"/></xsl:variable>	  	  
+	  -->
 	  <div class="moreindent">
 	    <!-- endpoint -->
@@ -157,7 +160,7 @@
 		    <option value=""></option>
 		    <!-- endpoint -->
-		    <option value="//{$sparqlEndpointHostAndOptPort}/xml-to-html.xsl">xml-to-html</option>
-		    <option value="//{$sparqlEndpointHostAndOptPort}/xml-to-html-links.xsl" selected="selected">xml-to-html-links</option>
-		    <option value="//{$sparqlEndpointHostAndOptPort}/xml-to-html-plain.xsl">xml-to-html-plain</option>
+		    <option value="//{$sparqlEndpointHostAndOptPort}{$sparqlEndpointPrefix1}/xml-to-html.xsl">xml-to-html</option>
+		    <option value="//{$sparqlEndpointHostAndOptPort}{$sparqlEndpointPrefix1}/xml-to-html-links.xsl" selected="selected">xml-to-html-links</option>
+		    <option value="//{$sparqlEndpointHostAndOptPort}{$sparqlEndpointPrefix1}/xml-to-html-plain.xsl">xml-to-html-plain</option>
 		  </select>
 		</div>
