source: main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/dataviz/voting-dataflow-jury.xsl@ 35107

Last change on this file since 35107 was 35056, checked in by davidb, 3 years ago

SPARQL queries cut across to using public-facing web prefix rather than localhost

File size: 2.4 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:java="http://xml.apache.org/xslt/java"
5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6 xmlns:gslib="http://www.greenstone.org/skinning"
7 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
8 extension-element-prefixes="java util"
9 exclude-result-prefixes="java util">
10
11 <xsl:template name="ssv-voting-dataflow-jury">
12
13 <div id="ssv-voting-dataflow-jury" style="display: none;">
14
15<!-- Dataflow voting patterns (Sankey) -->
16<xsl:text>
17
18PREFIX gsdlextracted: &lt;http://greenstone.org/gsdlextracted#&gt;
19PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;
20PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt;
21
22SELECT (?jury_country AS ?jury_vote_from_country) (?country AS ?to_country) (SUM(?jury_vote_int) * SUM(?jury_vote_int) AS ?country_jury_to_country_total_squared) (SUM(?jury_vote_int) AS ?jury_vote_total) WHERE {
23 GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt; {
24# ?esc_entrant_uri dc:Relation.isPartOf &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;.
25
26 ?esc_entrant_uri ?gsdlextracted_jury_country_uri ?jury_vote.
27 BIND(STRENDS(str(?gsdlextracted_jury_country_uri),"-J") AS ?is_jury_vote)
28 FILTER (?is_jury_vote).
29 BIND(REPLACE(str(?gsdlextracted_jury_country_uri), ".*#(.*?)-J$", "$1-J") AS ?jury_country).
30
31 BIND(xsd:integer(?jury_vote) AS ?jury_vote_int).
32
33 ?esc_entrant_uri gsdlextracted:Year ?year
34 FILTER(xsd:integer(?year) &gt;= **startyear** &amp;&amp; xsd:integer(?year) &lt;= **endyear**).
35 ?esc_entrant_uri gsdlextracted:Country ?country.
36
37
38 }
39}
40GROUP BY ?jury_country ?country
41
42
43</xsl:text>
44 </div>
45 <div id="ssv-voting-dataflow-jury-chart" style="display: none;">
46<!-- -->
47<xsl:text>
48google.visualization.Sankey
49</xsl:text>
50 </div>
51 <div id="ssv-voting-dataflow-jury-chart-options" style="display: none;">
52<!-- -->
53<xsl:text>
54title=Dataflow Analysis of Country Juries to Country Entrants (2010-2019)|height=1200|chartArea.height=1100|fontSize=11
55</xsl:text>
56 </div>
57 <div id="ssv-voting-dataflow-jury-div-style" style="display: none;">
58<!-- -->
59<xsl:text>
60width:900px; height:1200px; margin-left: auto; margin-right: auto; overflow-y: hidden; overflow-x: hidden;
61</xsl:text>
62
63 </div>
64
65 </xsl:template>
66
67</xsl:stylesheet>
68
Note: See TracBrowser for help on using the repository browser.