Ignore:
Timestamp:
2021-03-09T23:30:43+13:00 (3 years ago)
Author:
davidb
Message:

Changes associated with adding in Combined and Single Voting totals; adjustments to DL based on Terhi's feedback

Location:
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/document.xsl

    r34918 r34960  
    191191
    192192    <div id="to-country-votes">
     193      <gsf:switch>
     194    <gsf:metadata name='FinishingPos'/>
     195    <gsf:when test='exists'>
     196      <h2>
     197        Overall Final Postion: <gsf:metadata name='FinishingPos'/>
     198      </h2>
     199    </gsf:when>
     200      </gsf:switch>
     201     
    193202      <gsf:script>
    194203    append_to_country_votes("Jury Votes","JuryVotesJSON","JuryVotesTotal");
    195204    append_to_country_votes("Televotes","TeleVotesJSON","TeleVotesTotal");
     205
     206    append_to_country_votes("Combined Jury &amp; Tele Votes","CombVotesJSON","CombVotesTotal");
     207    append_to_country_votes("Voting Exclusively by Jury","SingVotesJSON","SingVotesTotal");
    196208      </gsf:script>
    197209
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sparql.xsl

    r34956 r34960  
    103103          </textarea>
    104104         
    105           <div style="display:none;">
     105          <div style="displayXXXX:none;">
    106106        <div>
    107107          Output:
     
    229229    ?esc_entrant_uri dc:Relation.isPartOf &lt;http://127.0.0.1:8383/greenstone3/library/collection/eurovision&gt;.
    230230
    231     ?esc_entrant_uri gsextracted:JuryVotesTotal ?total.
     231    ?esc_entrant_uri gsextracted:SingVotesTotal ?total.
    232232    BIND(xsd:integer(?total) AS ?total_int).
    233233   
     
    268268</xsl:text>
    269269        </div>
     270
     271
     272        <div id="ssq-winning-totals" style="display: none;">
     273<!-- -->
     274<xsl:text>
     275PREFIX gsextracted: &lt;http://greenstone.org/gsextracted#&gt;
     276PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;
     277PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt;
     278
     279
     280SELECT ?year ?country ?total_max WHERE {
     281  GRAPH &lt;http://localhost:3030/greenstone/data/eurovision&gt;  {
     282
     283    {
     284      SELECT ?year (STR(MAX(?total_int_inner)) as ?total_max) WHERE {
     285     
     286        ?esc_entrant_uri gsextracted:VoteGrandTotal ?total.
     287        BIND(xsd:integer(?total) AS ?total_int_inner).
     288   
     289        ?esc_entrant_uri gsextracted:Year ?year.
     290      }
     291      GROUP BY ?year
     292     }
     293
     294    ?esc_entrant_uri gsextracted:VoteGrandTotal ?total_max.   
     295    ?esc_entrant_uri gsextracted:Year ?year.
     296    ?esc_entrant_uri gsextracted:Country ?country.
     297
     298    BIND(xsd:integer(?total_max) as ?total_int).   
     299  }
     300}
     301ORDER BY DESC(?total_int)
     302</xsl:text>
     303        </div>
     304
     305
     306        <div id="ssq-winning-freq-count" style="display: none;">
     307<!-- -->
     308<xsl:text>
     309
     310PREFIX gsextracted: &lt;http://greenstone.org/gsextracted#&gt;
     311PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;
     312PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt;
     313
     314
     315SELECT ?country (STR(COUNT(?country)) as ?number_of_vote_wins) WHERE {
     316  GRAPH &lt;http://localhost:3030/greenstone/data/eurovision&gt;  {
     317
     318
     319    {
     320      SELECT ?year (STR(MAX(?total_int)) as ?total_max) WHERE {
     321
     322     
     323        ?esc_entrant_uri gsextracted:VoteGrandTotal ?total.
     324        BIND(xsd:integer(?total) AS ?total_int).
     325   
     326        ?esc_entrant_uri gsextracted:Year ?year.
     327      }
     328      GROUP BY ?year
     329    }
     330
     331    ?esc_entrant_uri gsextracted:VoteGrandTotal ?total_max.   
     332    ?esc_entrant_uri gsextracted:Year ?year.
     333    ?esc_entrant_uri gsextracted:Country ?country.   
     334  }
     335}
     336GROUP BY ?country
     337ORDER BY DESC(?number_of_vote_wins)
     338</xsl:text>
     339        </div>
     340
     341
    270342
    271343
     
    350422
    351423          <li>
    352         Jury Voting Totals in 1975:<br/>
     424        Voting Totals in 1975:<br/>
    353425        <button type="button" class="load-ssq" id="load-ssq-jury-votes-totals-1975" onclick="ssq_load('ssq-jury-votes-totals-1975')">Load query above</button>
    354426        <button type="button" class="exec-ssq" id="exec-ssq-jury-votes-totals-1975" onclick="ssq_execute()">Get Results</button><br/>
    355427       
    356         The jury vote totals countries received in 1975, ranked to score.
     428        In 1975 all voting was done exclusively by jury.  This query retrieves the
     429        totals of this Single voting format, and orders them by that score.
    357430          </li>
    358431         
     
    365438          </li>
    366439
     440
     441          <li>
     442        Most points won:<br/>
     443        <button type="button" class="load-ssq" id="load-ssq-winning-totals" onclick="ssq_load('ssq-winning-totals')">Load query above</button>
     444        <button type="button" class="exec-ssq" id="exec-ssq-winning-totals" onclick="ssq_execute()">Get Results</button><br/>
     445       
     446        List the coutries which won and their voting totals, sorted by total score.
     447          </li>
     448
     449          <li>
     450        Number of Times Countries Have Won:<br/>
     451        <button type="button" class="load-ssq" id="load-ssq-winning-freq-count" onclick="ssq_load('ssq-winning-freq-count')">Load query above</button>
     452        <button type="button" class="exec-ssq" id="exec-ssq-winning-freq-count" onclick="ssq_execute()">Get Results</button><br/>
     453
     454        The number of times a country has won Eurovision across the years.  The includes
     455        the years when only Juries voted (1956-2000) through to the introduction
     456        of Televotes, where a variety of forms have been used such as only
     457        Televotes, a pre-combined score based on Televotes and Jury votes, to
     458        (from 2016 onwards) where the Jury and Tele votes are explicitly
     459        given individually per country, then combined.
     460          </li>
     461         
     462
    367463          <li>
    368464        Facts and Figures About Competing Countries:<br/>
     
    374470         
    375471        </ul>
     472
     473        <p>
     474          Looking for something a bit more visual?  Why not head over to our
     475          <a href="{$library_name}/collection/{$collName}/page/sgvizler"><i>SGVizler page</i></a> and try the SPARQL-based visualization samples there.
     476        </p>
    376477       
    377478      </div>
Note: See TracChangeset for help on using the changeset viewer.