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 35092)
+++ main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/about.xsl	(revision 35093)
@@ -18,4 +18,5 @@
     <gsf:script src="sites/{$site_name}/collect/{$collName}/js/jquery.show-more.js"/>
 
+    
       <div id="about-desc">
 	  <h2>Introduction</h2>
@@ -23,5 +24,5 @@
 	  <p style="padding-bottom: 10px;">
 	    The <a href="https://eurovision.tv">Eurovision Song
-	    Content</a> is a live-broadcast televised event that
+	    Contest</a> is a live-broadcast televised event that
 	    was first held in 1956 featuring artists singing original songs from
 	    7 countries.  Since then it has grown into an event involving
@@ -43,6 +44,6 @@
 	    The contest has grown significantly from
 	    that modest start with 7 countries (and one cameraman),
-	    with over 40 countries competing these daysâeven
-	    Australia takes part now, through a specially
+	    with over 40 countries competing these daysâAustralia
+	    even takes part now, through a specially
 	    arranged invitation. It's an annual celebration of
 	    European culture and the highlight of many people's
@@ -507,22 +508,92 @@
 
 	    <p>
-	      Access to and the analysis of how countries have voted over the years
+	      To fulfill our vision of developing this DL collection
+	      as a rich resource through which people can explore the
+	      phenomenon we went looking for voting data that was
+	      available in a machine-readable format.
+	      We found data compiled through a manual curation process
+	      about how countries have voted going back to 1975 is available through the
+	      <a href="https://www.kaggle.com/datagraver/eurovision-song-contest-scores-19752019">Kaggle website as an Excel spreadsheet</a>.
+	    </p>
+	    <p>
+	      To incorporate this as metadata into the DL, we wrote
+	      some Python code to transform the data into the internal
+	      serialized metadata format used by Greenstone.  Prior to
+	      this project, the only serialized form for this was XML,
+	      which is processed by the MetadataXML plugin.  As it was
+	      more convenient to generate JSON from our Python code,
+	      we took the step of adding in a new plugin to
+	      Greenstone3: MetadataJSON.
+	    </p>
+
+	    <h3>Page Scraping</h3>
+
+	    <p>
+      	      Despite our best intentions work soley with
+      	      machine-readable dataâprimarily as you have seen in the
+      	      form of Linked Open Data, but also utilizing a
+      	      spreadsheet of voting dataâto form the Eurovision DL,
+	      in looking to expand the metadata in the DL to cover
+	      details concerning the draw position of acts, and their
+	      overall placing, we have resorted to page-scraping
+	      content from Wikipedia itself.  This was because such
+	      information was not part of the entity extraction
+	      process that occurs when Wikipedia is mapped to DBpedia.
+	    </p>
+
+	    <p>
+	      A review of Wikipedia article pages about the event in
+	      any given year showed these pages to be especially well
+	      curated, and included a table in each that listed the
+	      information we sought.  While there was some variation
+	      in how this table was expressed in HTML, with a
+	      considerably portion of the heavy lifting being done by
+	      the Python library BeautifulSoup4, it was not too
+	      complex a task to develop a program that extracted this
+	      information and turned it into the newly developed
+	      Greenstone JSON metadata format.
+	    </p>
 	      
-	      To fulfill our vision of developing this DL collection as a rich resource to
-	      through which people can explore the phenomenon.
-	      
-	    </p>
+	    <h3>Patching in Missing Data</h3>
+
 	    
-	    <h3>Patching in Missing Data: Page Scraping</h3>
-
-	    
-	    <p>
-	      Despite our best intentions to work solely with ....
-	      .. missing categories ...
-
-	      totting up how many entrie per year ...
-	      thousands of entries
-	      
+	    <p>
+	      Another difficulty we have encountered is that
+	      not every country who had an entry in Eurovision
+	      in a given year has its own standalone article page.
+	      This leads to missing entries in the category
+	      page for the contest in a given year, which is
+	      problematic to us, because it is this category
+	      information that we draw upon in our SPARQL query
+	      to populate the DL with all the acts.
+	    </p>
+	    <p>
+	      The information about all the countries competing
+	      in a given year does, however, appear in the
+	      article page for the contest in that year.  In fact
+	      it's in the same table we targetted to extract out
+	      draw position and placement.  We therefore
+	      wrote a further page-scraping program to compare
+	      the countries in that table with the countries
+	      listed on the category page for the contest in
+	      that year.  For any entries we find in the
+	      table, but not in the Category page, we
+	      produce a metadata record for the DL
+	      with basic information about the entry:
+	      country, year, song title, artist,
+	      draw-position, placement, and (where available)
+	      their total score.
+	    </p>
+	    <p>
+	      Comparable with the problem titles and artist/entrants,
+	      we have formulated a SPARQL query that enumerates
+	      these missing category entrants:
+	      <!--
 	      We took the opportunity to add in further fields: Performing Position, Placement, Voting Total, thumbnail flag image.
+
+
+	      An unintended side-affect of this is that we have also been able to expand
+	      -->
+
 	      
 	      <ul>
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 35092)
+++ main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sgvizler.xsl	(revision 35093)
@@ -52,4 +52,5 @@
 	  <link rel="stylesheet" href="sites/{$site_name}/collect/{$collName}/style/fuseki.css" type="text/css" />
 	  -->
+	  <gsf:script src="sites/{$site_name}/collect/{$collName}/js/jquery.show-more.js"/>	  
 	  <gsf:script src="sites/{$site_name}/collect/{$collName}/js/eurovision.js"/>
 	  <gsf:script src="sites/{$site_name}/collect/{$collName}/js/dataviz.js"/>
@@ -58,9 +59,10 @@
 	  <link rel="stylesheet" href="sites/{$site_name}/collect/{$collName}/css/dataviz.css" type="text/css" />
 	  <style>
-	    div.page { margin-left: 12px; margin-right: 12px; margin-top: 6px; margin-bottom: 6px;}
-
-	    p  { padding-top: 6px; padding-bottom: 6px;}
-	    a  { text-decoration: underline; }
-	    li { padding-bottom: 6px; margin-bottom: 6px; }
+	    #gs_content div.page     { margin-left: 12px; margin-right: 12px; margin-top: 6px; margin-bottom: 6px;}
+	    #gs_content div.showmore { padding-left:  0px; padding-right:  0px; padding-top: 0px; padding-bottom: 0px;}
+	    
+	    #gs_content p  { padding-top: 6px; padding-bottom: 6px;}
+	    #gs_content a  { text-decoration: underline; }
+	    #gs_content li { padding-bottom: 6px; margin-bottom: 6px; }
 	  </style>
 
@@ -91,25 +93,34 @@
 	    </p>
 
-	    <p>
-	      We use this two-step process so it is possible to
-	      change what query is run, and how the resulting data is visualized.
-	      The first text-box below is for the SPARQL query.  The following
-	      3 text-boxes control aspects of the visualization.
-	      If you haven't worked with the underlying tools before,
-	      we suggest you work your way through the sample visualizations
-	      provided, trying out small edits to see how that affects
-	      what is produced.
-	    </p>
-	    <p>
-	      Rather than visualize results, if you would like to
-	      directly access and/or export the data to peroforms
-	      other forms of analysis, then you'll probably want to
-	      use the:
-	      <ul>
-		<li>
-		  <a href="{$library_name}/collection/{$collName}/page/sparql">Data Analysis page</a>
-		</li>
-	      </ul>
-	    </p>
+	    <div id="sgvizler-show-more" class="showmore">
+	      <p>
+		We use this two-step process so it is possible to
+		change what query is run, and how the resulting data is visualized.
+		The first text-box below is for the SPARQL query.  The following
+		3 text-boxes control aspects of the visualization.
+		If you haven't worked with the underlying tools before,
+		we suggest you work your way through the sample visualizations
+		provided, trying out small edits to see how that affects
+		what is produced.
+	      </p>
+	      <p>
+		Rather than visualize results, if you would like to
+		directly access and/or export the data to peroforms
+		other forms of analysis, then you'll probably want to
+		use the:
+		<ul>
+		  <li>
+		    <a href="{$library_name}/collection/{$collName}/page/sparql">Data Analysis page</a>
+		  </li>
+		</ul>
+	      </p>
+	    </div>
+	    <gsf:script>
+	      $('#sgvizler-show-more').showMore({
+	        minheight: 0,
+		buttontxtmore:"show more ...",
+		buttontxtless:"... show less"
+	      });
+	    </gsf:script>	    
 	    
 	  </div>	  
@@ -183,8 +194,8 @@
 	  <script type="text/javascript">
 	    <xsl:text disable-output-escaping="yes">
-	      $(document).ready(	
-                function() {
+	      $(document).ready(
+              function() {
 	          ssv_load("ssv-orig");
-	          ssv_execute();
+	          ssv_execute(ssv_no_auto_focus);
 	        }
               );
@@ -275,5 +286,5 @@
 		<b>Number of times entered, sorted by frequency:</b><br/>
 		<button type="button" class="load-ssq" id="load-ssv-orig" onclick="ssv_load('ssv-orig')">Load query above</button>
-		<button type="button" class="exec-ssq" id="exec-ssv-orig" onclick="ssv_execute()">Visualize Results</button><br/>
+		<button type="button" class="exec-ssq" id="exec-ssv-orig" onclick="ssv_execute(ssv_auto_focus)">Visualize Results</button><br/>
 		<p>
 		  Plot as a bar graph the number of times each country has competed in the
@@ -285,5 +296,5 @@
 		<b>Made the Finals:</b><br/>
 		<button type="button" class="load-ssq" id="load-ssv-made-the-final" onclick="ssv_load('ssv-made-the-final')">Load query above</button>
-		<button type="button" class="exec-ssq" id="exec-ssv-made-the-final" onclick="ssv_execute()">Visualize Results</button><br/>
+		<button type="button" class="exec-ssq" id="exec-ssv-made-the-final" onclick="ssv_execute(ssv_auto_focus)">Visualize Results</button><br/>
 		<p>Plot as a bar graph the number of times each country has made it to the finals.</p>
 	      </li>
@@ -292,5 +303,5 @@
 		<b>List of Winners:</b><br/>
 		<button type="button" class="load-ssq" id="load-ssv-list-of-winners" onclick="ssv_load('ssv-list-of-winners')">Load query above</button>
-		<button type="button" class="exec-ssq" id="exec-ssv-list-of-winners" onclick="ssv_execute()">Visualize Tabulated Results</button><br/>
+		<button type="button" class="exec-ssq" id="exec-ssv-list-of-winners" onclick="ssv_execute(ssv_auto_focus)">Visualize Tabulated Results</button><br/>
 		<p>The songs that have won through the ages.</p>
 	      </li>
@@ -299,5 +310,5 @@
 		<b>List of Last Place Entrants:</b><br/>
 		<button type="button" class="load-ssq" id="load-ssv-list-of-losers" onclick="ssv_load('ssv-list-of-losers')">Load query above</button>
-		<button type="button" class="exec-ssq" id="exec-ssv-list-of-losers" onclick="ssv_execute()">Visualize Tabulated Results</button><br/>
+		<button type="button" class="exec-ssq" id="exec-ssv-list-of-losers" onclick="ssv_execute(ssv_auto_focus)">Visualize Tabulated Results</button><br/>
 		<p>The songs that have won through the ages.</p>
 	      </li>
@@ -306,5 +317,5 @@
 		<b>Top 3 Acts per Year with (where available) Details of Musical Content:</b><br/>
 		<button type="button" class="load-ssq" id="load-ssv-top-3-with-mir-content" onclick="ssv_load('ssv-top-3-with-mir-content')">Load query above</button>
-		<button type="button" class="exec-ssq" id="exec-ssv-top-3-with-mir-content" onclick="ssv_execute()">Visualize Tabulated Results</button><br/>
+		<button type="button" class="exec-ssq" id="exec-ssv-top-3-with-mir-content" onclick="ssv_execute(ssv_auto_focus)">Visualize Tabulated Results</button><br/>
 		<p>List the Top 3 entries per year, including musical details such as tempo, time-signature, and key where alignment with content in MusicBrainz was possible.</p>
 	      </li>
@@ -313,5 +324,5 @@
 		<b>The ignominy of &quot;nul point&quot;:</b><br/>
 		<button type="button" class="load-ssq" id="load-ssv-got-nul-point" onclick="ssv_load('ssv-got-nul-point')">Load query above</button>
-		<button type="button" class="exec-ssq" id="exec-ssv-got-nul-point" onclick="ssv_execute()">Visualize Results</button><br/>
+		<button type="button" class="exec-ssq" id="exec-ssv-got-nul-point" onclick="ssv_execute(ssv_auto_focus)">Visualize Results</button><br/>
 		<p>
 		  Plot a bar graph showing which countries, and how
@@ -324,5 +335,5 @@
 		<b>The even more galling circumstance of getting &quot;nul point&quot; having won the previous year:</b><br/>
 		<button type="button" class="load-ssq" id="load-ssv-got-nul-point-after-winning" onclick="ssv_load('ssv-got-nul-point-after-winning')">Load query above</button>
-		<button type="button" class="exec-ssq" id="exec-ssv-got-nul-point-after-winning" onclick="ssv_execute()">Visualize Results</button><br/>
+		<button type="button" class="exec-ssq" id="exec-ssv-got-nul-point-after-winning" onclick="ssv_execute(ssv_auto_focus)">Visualize Results</button><br/>
 		<p>
 		  Have any countries ever been in the situation of going from Hero (i.e., winning) to Zero (nul point) in back to back years in
@@ -342,5 +353,5 @@
 		    <input type="text" id="ssv-voting-dataflow-jury-endyear"   value="2019" style="width: 80px; padding-left: 6px"/>
 		  </div>
-		  <button type="button" class="exec-ssq" id="exec-ssv-voting-dataflow-jury" onclick="ssv_execute('ssv-voting-dataflow-jury')">Visualize Results</button>
+		  <button type="button" class="exec-ssq" id="exec-ssv-voting-dataflow-jury" onclick="ssv_execute(ssv_auto_focus,'ssv-voting-dataflow-jury')">Visualize Results</button>
 		</div>
 		<p>
@@ -374,5 +385,5 @@
 		  </span>
 		
-		  <button type="button" class="exec-ssq" id="exec-ssv-voting-dataflow-tele" onclick="ssv_execute('ssv-voting-dataflow-tele')">Visualize Results</button><br/>
+		  <button type="button" class="exec-ssq" id="exec-ssv-voting-dataflow-tele" onclick="ssv_execute(ssv_auto_focus,'ssv-voting-dataflow-tele')">Visualize Results</button><br/>
 		</div>
 		<p>
@@ -397,5 +408,5 @@
 		  </span>
 		
-		  <button type="button" class="exec-ssq" id="exec-ssv-jury-tele-diff" onclick="ssv_execute('ssv-jury-tele-diff')">Visualize Results</button><br/>
+		  <button type="button" class="exec-ssq" id="exec-ssv-jury-tele-diff" onclick="ssv_execute(ssv_auto_focus,'ssv-jury-tele-diff')">Visualize Results</button><br/>
 		</div>
 		<p>
@@ -417,5 +428,5 @@
 		<b>The Curse of Being the Second Performer in the Lineup?</b><br/>
 		<button type="button" class="load-ssq" id="load-ssv-draw-bias" onclick="ssv_load('ssv-draw-bias')">Load query above</button>
-		<button type="button" class="exec-ssq" id="exec-ssv-draw-bias" onclick="ssv_execute()">Visualize Results</button><br/>
+		<button type="button" class="exec-ssq" id="exec-ssv-draw-bias" onclick="ssv_execute(ssv_auto_focus)">Visualize Results</button><br/>
 		<p>
 		  Plot as a bar graph how many times an entrant
@@ -432,5 +443,5 @@
 		<b>Normalized Plot of ... The Curse of Being the Second Performer in the Lineup?</b><br/>
 		<button type="button" class="load-ssq" id="load-ssv-draw-bias-normalized" onclick="ssv_load('ssv-draw-bias-normalized')">Load query above</button>
-		<button type="button" class="exec-ssq" id="exec-ssv-draw-bias-normalized" onclick="ssv_execute()">Visualize Results</button><br/>
+		<button type="button" class="exec-ssq" id="exec-ssv-draw-bias-normalized" onclick="ssv_execute(ssv_auto_focus)">Visualize Results</button><br/>
 		<p>
 		  Same as the above, only to better take account of
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 35092)
+++ main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sparql.xsl	(revision 35093)
@@ -48,10 +48,10 @@
 	  <gsf:style src="sites/{$site_name}/collect/{$collName}/css/dataviz.css" />
 	  <style>
-	    div          { padding-left: 12px; padding-right: 12px; padding-top: 6px; padding-bottom: 6px;}
-	    div.showmore { padding-left:  0px; padding-right:  0px; padding-top: 0px; padding-bottom: 0px;}
-
-	    p  { padding-top: 6px; padding-bottom: 6px;}
-	    a  { text-decoration: underline; }
-	    li { padding-bottom: 6px; margin-bottom: 6px; }
+	    #gs_content div          { padding-left: 12px; padding-right: 12px; padding-top: 6px; padding-bottom: 6px;}
+	    #gs_content div.showmore { padding-left:  0px; padding-right:  0px; padding-top: 0px; padding-bottom: 0px;}
+
+	    #gs_content p  { padding-top: 6px; padding-bottom: 6px;}
+	    #gs_content a  { text-decoration: underline; }
+	    #gs_content li { padding-bottom: 6px; margin-bottom: 6px; }
 	  </style>
 
@@ -389,4 +389,43 @@
 
 
+	    <div id="ssq-from-winning-to-losing" style="display: none;">
+<!-- -->
+<xsl:text>
+	    
+PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
+PREFIX xsd:  &lt;http://www.w3.org/2001/XMLSchema#&gt;
+PREFIX dc:   &lt;http://purl.org/dc/elements/1.1/&gt;
+PREFIX gsdlextracted: &lt;http://greenstone.org/gsdlextracted#&gt;
+
+SELECT (?country as ?Country) (?year AS ?WinningYear) (?total as ?WinningGrandTotal) (?next_year AS ?LosingYear) (?next_total as ?LosingGrandTotal) 		 
+WHERE {
+    GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
+        ?esc_entrant_uri gsdlextracted:Country ?country.
+        ?esc_entrant_uri gsdlextracted:VoteGrandTotal ?total.
+
+	?esc_entrant_uri gsdlextracted:Place ?place.
+        BIND(xsd:integer(?place) AS ?place_int).	
+	FILTER(?place_int = 1).	
+
+	?esc_entrant_uri gsdlextracted:Year ?year.
+	BIND(xsd:integer(?year) AS ?year_int).
+	BIND(?year_int + 1 AS ?next_year_int).
+	BIND(str(?next_year_int) AS ?next_year).
+
+        ?next_esc_entrant_uri gsdlextracted:Country ?country.
+	?next_esc_entrant_uri gsdlextracted:Year ?next_year.
+	
+        ?next_esc_entrant_uri gsdlextracted:VoteGrandTotal ?next_total.
+
+        ?next_esc_entrant_uri gsdlextracted:ReverseFinishingPos ?rev_finishing_pos.
+        BIND(xsd:integer(?rev_finishing_pos) AS ?rev_finishing_pos_int).
+        FILTER(?rev_finishing_pos_int = 1).
+	
+	
+   }
+}
+ORDER BY ?country
+</xsl:text>
+	    </div>
 
 	    <div id="ssq-country-info" style="display: none;">
@@ -528,13 +567,36 @@
 
 		<p>
-		  The number of times a country has won Eurovision across the years.  The includes
-		  the years when only Juries voted (1956-2000) through to the introduction
-		  of Televotes, where a variety of forms have been used such as only
-		  Televotes, a pre-combined score based on Televotes and Jury votes, to
-		  (from 2016 onwards) where the Jury and Tele votes are explicitly
-		  given individually per country, then combined.
+		  The number of times a country has won Eurovision
+		  across the years.  The includes the years when only
+		  Juries voted (1956-2000) through to the introduction
+		  of Televotes, where a variety of forms have been
+		  used such as only Televotes, a pre-combined score
+		  based on Televotes and Jury votes, to (from 2016
+		  onwards) where the Jury and Tele votes are
+		  explicitly given individually per country, then
+		  combined.
 		</p>
 	      </li>
-	      
+
+
+
+	      <li>
+		<b>From Hero to Zero!</b><br/>
+		<button type="button" class="load-ssq" id="load-ssq-from-winning-to-losing" onclick="ssq_load('ssq-from-winning-to-losing')">Load query above</button>
+		<button type="button" class="exec-ssq" id="exec-ssq-from-winning-to-losing" onclick="ssq_execute()">Get Results</button><br/>
+
+		<p>
+		  List countries where, having won in one year, they
+		  have gone on to lose with the lowest score of the
+		  contest the following year.  Note this definition
+		  doesn't quite meet the given heading of <i>From Here
+		  to Zero</i>. There is in fact only one country, to
+		  date, where this has happened (nul-point the
+		  following year).  View the table to see who it is
+		  ...  then why not test out your SPARQL querying
+		  skills and see if you can modify the query used so
+		  it only returns the Hero to Zero case?
+		</p>
+	      </li>
 
 	      <li>
