Changeset 35010


Ignore:
Timestamp:
2021-04-04T20:16:58+12:00 (3 years ago)
Author:
davidb
Message:

Refactoring and expansion of samples

File:
1 edited

Legend:

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

    r34972 r35010  
    1212    <!-- use the 'main' layout -->
    1313    <xsl:import href="layouts/main.xsl"/>
    14 
     14    <xsl:import href="dataviz/made-the-final.xsl"/>
     15    <xsl:import href="dataviz/got-nul-point.xsl"/>
     16    <xsl:import href="dataviz/voting-dataflow-jury.xsl"/>
     17    <xsl:import href="dataviz/voting-dataflow-tele.xsl"/>
     18   
    1519    <xsl:variable name="groupPath"><xsl:value-of select="/page/pageRequest/paramList/param[@name='group']/@value"/></xsl:variable>
    1620    <!-- set page title -->
     
    7276<!-- -->
    7377<xsl:text>
     78<!-- 
    7479PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
    7580PREFIX gsdlextracted: &lt;http://greenstone.org/gsdlextracted#&gt;
     
    8186}
    8287GROUP BY ?country ORDER BY DESC(?freqCount)
    83 </xsl:text>
    84           </textarea>
    85 <!--
    86           <pre>sgvizler-div:</pre>
    87           <textarea id="sample-sgvizler-div" name="sgvizler-div" class="sgvizler" rows="7">
    88 
    89 <xsl:text>
    90 &lt;div id="sgvizler-div"
    91      data-sgvizler-endpoint="//sowemustthink.space/greenstone3-lod3/greenstone/query"     
    92      data-sgvizler-chart="google.visualization.BarChart"
    93      data-sgvizler-chart-options="title=Number of Songs from each Country (sorted by size)|legend.position=none|height=900|chartArea.height=840|fontSize=11"
    94      data-sgvizler-log="2"&gt;
    95 &lt;/div&gt;
    96 </xsl:text>
    97           </textarea>
    9888-->
    99 
     89</xsl:text>
     90          </textarea>
    10091
    10192          <pre>data-sgvizler-endpoint:</pre>
     
    148139          $(document).ready(   
    149140                function() {
     141              ssv_load("ssv-orig");
    150142              ssv_execute();
    151143            }
     
    172164        </p>
    173165
    174         <div id="ssv-made-the-final" style="display: none;">
    175 
    176 <!-- Made the finals -->
     166
     167
     168        <div id="ssv-orig" style="display: none;">
     169<!-- -->
    177170<xsl:text>
    178171PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
     
    182175    GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
    183176        ?s gsdlextracted:Country ?country.
    184         ?s gsdlextracted:Final "true"
    185177   }
    186178}
    187 GROUP BY ?country ORDER BY DESC(?freqCount)                   
    188 </xsl:text>
    189         </div>
    190 
     179GROUP BY ?country ORDER BY DESC(?freqCount)
     180</xsl:text>
     181        </div>
     182        <div id="ssv-orig-endpoint" style="display: none;">
     183<!-- -->
     184<xsl:text>
     185//sowemustthink.space/greenstone3-lod3/greenstone/query
     186</xsl:text>
     187        </div>
     188        <div id="ssv-orig-chart" style="display: none;">
     189<!-- -->
     190<xsl:text>
     191google.visualization.BarChart
     192</xsl:text>
     193        </div>
     194        <div id="ssv-orig-chart-options" style="display: none;">
     195<!-- -->
     196<xsl:text>
     197title=Number of Songs from each Country (sorted by size)|legend.position=none|height=900|chartArea.height=840|fontSize=11
     198</xsl:text>
     199        </div>
     200        <div id="ssv-orig-div-style" style="display: none;">
     201<!-- -->
     202<xsl:text>
     203width:900px; height:300px; margin-left: auto; margin-right: auto; overflow-y: scroll; overflow-x: hidden; 
     204</xsl:text>
     205        </div>
     206
     207
     208        <xsl:call-template name="ssv-made-the-final"/>
     209        <xsl:call-template name="ssv-got-nul-point"/>
     210        <xsl:call-template name="ssv-voting-dataflow-jury"/>
     211        <xsl:call-template name="ssv-voting-dataflow-tele"/>
     212       
    191213       
    192214        <ul class="ssq">
     215          <li>
     216        Number of times entered, sorted by frequency:<br/>
     217        <button type="button" class="load-ssq" id="load-ssv-orig" onclick="ssv_load('ssv-orig')">Load query above</button>
     218        <button type="button" class="exec-ssq" id="exec-ssv-orig" onclick="ssv_execute()">Visualize Results</button><br/>
     219        Plot as a bar graph the number of times each country has completed in the
     220        Eurovision Song Contest, sorted by frequency.
     221          </li>
     222
    193223          <li>
    194224        Made the Finals:<br/>
     
    198228          </li>
    199229
     230          <li>
     231        The ignominy of &quot;nul point&quot;:<br/>
     232        <button type="button" class="load-ssq" id="load-ssv-got-nul-point" onclick="ssv_load('ssv-got-nul-point')">Load query above</button>
     233        <button type="button" class="exec-ssq" id="exec-ssv-got-nul-point" onclick="ssv_execute()">Visualize Results</button><br/>
     234        Plot as a bar graph the number of times each country has made it to the finals.
     235          </li>
     236
     237
     238          <li>
     239        Dataflow Voting Patterns of Juries:<br/>
     240        <button type="button" class="load-ssq" id="load-ssv-voting-dataflow-jury" onclick="ssv_load('ssv-voting-dataflow-jury')">Load query above</button>
     241        <button type="button" class="exec-ssq" id="exec-ssv-voting-dataflow-jury" onclick="ssv_execute()">Visualize Results</button><br/>
     242
     243        Plot as a Sankey Dataflow Graph how juries allocate
     244        their votes to countries over the years 2010-2019.
     245        Note: to help emphaisze the voting patterns, we plot
     246        the <i>square</i> of the voting totals.
     247
     248       
     249        Experiment with editing the date range specified in
     250        the <tt>FILTER(xsd:integer(?year) &gt; 2010
     251        &amp;&amp; xsd:integer(?year) &lt;= 2019)</tt> clause
     252        in the above text box and then press <i>Show
     253        Visualization</i> to see how the voting by jury has
     254        changed over the decades.
     255       
     256
     257          </li>
     258         
     259
     260         
     261          <li>
     262        Dataflow Voting Patterns in Televoting:<br/>
     263        <button type="button" class="load-ssq" id="load-ssv-voting-dataflow-tele" onclick="ssv_load('ssv-voting-dataflow-tele')">Load query above</button>
     264        <button type="button" class="exec-ssq" id="exec-ssv-voting-dataflow-tele" onclick="ssv_execute()">Visualize Results</button><br/>
     265
     266        Plot as a Sankey Dataflow Graph of the televoting
     267        data by coutnry.  Years plotted are 2018-2019
     268        as these are the only years the data has been
     269        published separate to jury voting.  As with
     270        the Jury Sankey visual above, we plot 
     271        the <i>square</i> of the voting totals to
     272        help emphasize where differences occur.
     273
     274          </li>
     275         
     276
     277
    200278         
    201279        </ul>
     
    204282    </xsl:template>
    205283   
    206 
    207284</xsl:stylesheet> 
    208285
Note: See TracChangeset for help on using the changeset viewer.