Changeset 35920 for main


Ignore:
Timestamp:
2022-01-08T22:34:42+13:00 (2 years ago)
Author:
davidb
Message:

Example SPARQL query added in that tabulates the number of major scale and minor scale entries that won Eurovision

File:
1 edited

Legend:

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

    r35917 r35920  
    298298       
    299299
     300        <div id="ssq-esc-winners-freq-count-scale" style="display: none;">
     301<!-- -->
     302<xsl:text>
     303PREFIX gsdlextracted: &lt;http://greenstone.org/gsdlextracted#&gt;
     304PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;
     305PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt;
     306PREFIX essentia: &lt;http://upf.edu/essentia#&gt;
     307
     308
     309SELECT ?scale (STR(COUNT(?scale)) as ?number_in_scale) WHERE {
     310#SELECT ?scale ?country ?year WHERE {
     311  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
     312     
     313    ?esc_entrant_uri gsdlextracted:Place "1".
     314    # ?esc_entrant_uri essentia:tonal_key_edma_key ?musical_key.
     315    ?esc_entrant_uri essentia:tonal_key_edma_scale ?scale.
     316
     317    ?esc_entrant_uri gsdlextracted:Year ?year.
     318    ?esc_entrant_uri gsdlextracted:Country ?country.   
     319  }
     320}
     321GROUP BY ?scale
     322ORDER BY DESC(?number_in_scale)
     323</xsl:text>
     324        </div>
     325
     326       
    300327        <div id="ssq-jury-votes-totals-1975" style="display: none;">
    301328<!-- -->
     
    571598          the estimated key signature of the song, which is pre-computed using the Essentia audio content analysis toolkit
    572599          when the collection is built.
     600        </p>
     601          </li>
     602
     603          <li>
     604        <b>Musical scale comparison of winning entries:</b><br/>
     605        <button type="button" class="load-ssq" id="load-ssq-esc-winners-freq-count-scale" onclick="ssq_load('ssq-esc-winners-freq-count-scale')">Load query above</button>
     606        <button type="button" class="exec-ssq" id="exec-ssq-esc-winners-freq-count-scale" onclick="ssq_execute()">Get Results</button><br/>
     607       
     608        <p>
     609          Frequency count of the scale (major or minor) that
     610          winning songs were in.  The estimated musical scale
     611          of the song is an estimate, pre-computed using the
     612          Essentia audio content analysis toolkit when the
     613          collection is built.
    573614        </p>
    574615          </li>
Note: See TracChangeset for help on using the changeset viewer.