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

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

Initial cut at having a TreeMap showing Jury/Tele voting differences

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-tele">
12
13
14 <div id="ssv-voting-dataflow-tele" style="display: none;">
15
16<!-- Dataflow voting patterns (Sankey) -->
17<xsl:text>
18
19PREFIX gsdlextracted: &lt;http://greenstone.org/gsdlextracted#&gt;
20PREFIX xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;
21PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt;
22
23SELECT (?tele_country AS ?tele_vote_from_country) (?country AS ?to_country) (SUM(?tele_vote_int) * SUM(?tele_vote_int) AS ?country_tele_to_country_total_squared) (SUM(?tele_vote_int) AS ?tele_vote_total) WHERE {
24 GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt; {
25# ?esc_entrant_uri dc:Relation.isPartOf &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;.
26
27 ?esc_entrant_uri ?gsdlextracted_tele_country_uri ?tele_vote.
28 BIND(STRENDS(str(?gsdlextracted_tele_country_uri),"-T") AS ?is_tele_vote)
29 FILTER (?is_tele_vote).
30 BIND(REPLACE(str(?gsdlextracted_tele_country_uri), ".*#(.*?)$", "$1") AS ?tele_country).
31
32 BIND(xsd:integer(?tele_vote) AS ?tele_vote_int).
33
34 ?esc_entrant_uri gsdlextracted:Year ?year
35 FILTER(xsd:integer(?year) &gt;= **startyear** &amp;&amp; xsd:integer(?year) &lt;= **endyear**).
36 ?esc_entrant_uri gsdlextracted:Country ?country.
37
38
39 }
40}
41GROUP BY ?tele_country ?country
42
43
44</xsl:text>
45 </div>
46 <div id="ssv-voting-dataflow-tele-chart" style="display: none;">
47<!-- -->
48<xsl:text>
49google.visualization.Sankey
50</xsl:text>
51 </div>
52 <div id="ssv-voting-dataflow-tele-chart-options" style="display: none;">
53<!-- -->
54<xsl:text>
55title=Dataflow Analysis of Televoting by Country (2016-2019)|height=1200|chartArea.height=1100|fontSize=11
56</xsl:text>
57 </div>
58 <div id="ssv-voting-dataflow-tele-div-style" style="display: none;">
59<!-- -->
60<xsl:text>
61width:900px; height:1200px; margin-left: auto; margin-right: auto; overflow-y: hidden; overflow-x: hidden;
62</xsl:text>
63
64 </div>
65
66 </xsl:template>
67
68</xsl:stylesheet>
69
Note: See TracBrowser for help on using the repository browser.