source: main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/about.xsl@ 35037

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

Updated to newly expanded queries; moved some rough-cut text out to a .scrap file

  • Property svn:executable set to *
File size: 17.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE videocollection [
3 <!ENTITY ndash "&#8211;">
4 <!ENTITY mdash "&#8212;">
5]>
6<xsl:stylesheet version="1.0"
7 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8 xmlns:java="http://xml.apache.org/xslt/java"
9 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
10 xmlns:gslib="http://www.greenstone.org/skinning"
11 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
12 extension-element-prefixes="java util"
13 exclude-result-prefixes="java util">
14
15
16 <xsl:template name="coll-description">
17 <gsf:style src="sites/{$site_name}/collect/{$collName}/css/eurovision.css"/>
18 <gsf:script src="sites/{$site_name}/collect/{$collName}/js/jquery.show-more.js"/>
19
20 <div id="about-desc">
21 <h2>Introduction</h2>
22 <!--
23 <p style="padding-bottom: 10px;">
24 The <a href="https://eurovision.tv">Eurovision Song
25 Content</a> is a live-broadcast televised event that
26 was first held in 1956 featuring artists singing original songs from
27 7 countries. Since then it has grown into an event involving
28 over 40 countries, and streamed all around the world. ...
29
30 </p>
31 -->
32
33 <p style="padding-bottom: 10px;">
34 <i style="padding-right:6px;">A help to shore up a post war Europe in 1956 it
35 all began, where there were only seven countries and one
36 camera man!</i>
37 </p>
38 <p>
39 The <a href="https://eurovision.tv">Eurovision Song
40 Contest</a> is a long-running, live-broadcast televised multi-national
41 competition with a collaborative mission, not dissimilar
42 in spirit to the Olympics.
43 The contest has grown significantly from
44 that modest start with 7 countries (and one cameraman),
45 with over 40 countries competing these days—even
46 Australia takes part now, through a specially
47 arranged invitation. It's an annual celebration of
48 European culture and the highlight of many people's
49 year.
50 </p>
51
52 <div id="about-show-more">
53 <p>
54 At Eurovision there is no division because wherever
55 you come from Eurovision is home. The Eurovision song
56 contest is widely known as a safe space for LGBTQIA+
57 people and a platform for free expression. For example
58 trans-woman
59 <a href="https://en.wikipedia.org/wiki/Dana_International">Dana International</a>
60 won as far back as 1998.
61 There have been songs in many different languages over the
62 years, although most are in English these days. This
63 doesn't matter, however, because music is a language we all
64 know how to speak.
65 </p>
66 <p>
67 In its latest incarnation, after
68 all the performances are over, artists wait
69 nervously as via the Internet the show's hosts visit each
70 of the 40+ countries in turn collecting all points cast
71 by the country appointed juries. This includes
72 the all important top score that can be cast, 12 points
73 (douze points!), a double-increment up from the
74 10 points awarded to the song a country ranks second,
75 followed by 8, 7, 6 
 1 points awarded.
76 Next comes the &quot;the popular vote&quot;
77 where fans, still grouped by country, have
78 the votes they cast by phone, SMS or the Eurovision app
79 tallied and mapped into the same format of 12 points for 1st
80 place, and so on.
81 This all culminates in a new winner being crowned, with
82 the competition usually being hosted the following year
83 by that country.
84 </p>
85 </div>
86 <gsf:script>
87 $('#about-show-more').showMore({
88 minheight: 0,
89 buttontxtmore:"show more ...",
90 buttontxtless:"... show less"
91 });
92 </gsf:script>
93
94
95 <h2>Features of this Website</h2>
96
97 <p>
98 This (unoffical) website has been developed by a small
99 team of dedicated Digital Library researchers who also
100 happen to be <i>huge</i> fans of Eurovision. We wish to
101 share our love for the competition, and at the same time
102 demonstrate what is possible when—harnessing some of that
103 passion!—the techniques of
104 <a href="https://en.wikipedia.org/wiki/Linked_data">Linked
105 Open Data</a> are applied
106 to the Open Source
107 <a href="https://www.greenstone.org">Greenstone3</a>
108 Digital Library platform. For the technically interested
109 see the
110 <a href="{$library_name}/collection/{$collName}/page/about#it-all-started-with">
111 <i style="padding-right: 6px;">It All Started with a Little <strike>Sparkle</strike>SPARQL</i></a>
112 below for details about how the digital library was formed.
113 </p>
114
115 <p>
116 For those who want to jump right in and access information about, as well as see and hear some of the past performances,
117 we suggest you
118 start by exploring the assembled information through
119 the browsing tabs, such as
120 <a href="{$library_name}/collection/{$collName}/browse/CL3">browser by country</a>
121 or else search the collection for a general term that you sparks
122 interest, such as
123 <a href="{$library_name}/collection/{$collName}/search/TextQuery?qs=1&amp;rt=rd&amp;s1.level=Doc&amp;startPage=1&amp;s1.query=love&amp;s1.index=ZZ">love</a>
124 and
125 <a href="{$library_name}/collection/{$collName}/search/TextQuery?qs=1&amp;rt=rd&amp;s1.level=Doc&amp;startPage=1&amp;s1.query=amore&amp;s1.index=ZZ">amore</a>,
126 or perhaps something more frivolous such as
127 <a href="{$library_name}/collection/{$collName}/search/TextQuery?qs=1&amp;rt=rd&amp;s1.level=Doc&amp;startPage=1&amp;s1.query=la&amp;s1.index=ZZ">la</a>.
128
129 </p>
130
131<!--
132 <script type="text/javascript" src="//www.google.com/jsapi"><xsl:text> </xsl:text></script>
133 <script type="text/javascript" src="//mgskjaeveland.github.io/sgvizler/v/0.6/sgvizler.js"><xsl:text> </xsl:text></script>
134-->
135 <script type="text/javascript" src="ext/jena/sgvizler2/sgvizler2.js"><xsl:text> </xsl:text></script>
136
137 <script type="text/javascript">
138 <xsl:text disable-output-escaping="yes">
139 $(document).ready(
140 function() {
141
142 //sgvizler.prefix('dc','http://purl.org/dc/elements/1.1/');
143 //sgvizler.prefix('gsdlextracted','http://greenstone.org/gsdlextracted#');
144
145
146 // Exaple triple
147 // "s": { "type": "uri" , "value": "http://127.0.0.1:8383/greenstone3/library/collection/eurovision/document/HASH0191e9cc7bfdf14743472257s10" } ,
148 // "p": { "type": "uri" , "value": "gsdlextracted:Country" } ,
149 // "o": { "type": "literal" , "value": "United Kingdom" }
150
151 //sgvizler.containerDraw('sgvizler1-country-count');
152
153 sgvizler2.containerDraw('sgvizler2-country-count');
154
155 }
156 );
157 </xsl:text>
158 </script>
159
160 <div id="sgvizler2-country-count"
161 data-sgvizler-endpoint="//sowemustthink.space/greenstone3-lod3/greenstone/query"
162 data-sgvizler-chart="google.visualization.BarChart"
163 data-sgvizler-chart-options="title=Number of Songs from each Country|legend.position=none|height=900|chartArea.height=840|fontSize=11"
164 data-sgvizler-log="2"
165 style="width:900px; height:300px; margin-left: auto; margin-right: auto; overflow-y: scroll; overflow-x: hidden;">
166 <xsl:attribute name="data-sgvizler-query">
167 PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
168 PREFIX gsdlextracted: &lt;http://greenstone.org/gsdlextracted#&gt;
169 SELECT (?country) (COUNT(?country) AS ?freqCount)
170 WHERE {
171 GRAPH &lt;http://localhost:4040/greenstone/data/<xsl:value-of select="$collName"/>&gt; {
172 ?s gsdlextracted:Country ?country
173 }
174 }
175 GROUP BY ?country ORDER BY asc(?country)
176 </xsl:attribute>
177 <xsl:text> Loading ...</xsl:text>
178 </div>
179
180
181 <p style="padding-top: 10px;">
182 All the metadata in the digital library is simultaneously published an linked data, meaning it is
183 possible to extract and analyze the data contained here in a variety of ways.
184 To aid in such analysis we have also we have added in a data visualization layer to the
185 digital library. This is how the bar-graph below has been created, which shows how many
186 times each country has competed. We provide samples to give you an idea of the sorts of analysis
187 that can be done, but—more importantly—these samples are editable so you
188 are free to change them however you wish, or once you're mastered the
189 query syntax, develop completely original forms of anaysis.
190 </p>
191 <p>
192 Through our
193 <a href="{$library_name}/collection/{$collName}/page/sgvizler">Vizualizer page</a>
194 you'll find a sample that shows you how often different countries have won
195 Eurovision, but what about who has lost the most often? The provided
196 sample dataflow visualization
197 of voting patterns over the last decade makes for interesting viewing, but
198 what about other time periods?
199 </p>
200
201 <div id="viz-show-more" style="margin-bottom: 10px;">
202 <p>
203 We suggest starting with viewing sample visualizations to see what's possible,
204 and making minor edits to that to adjust what is visualized.
205 Then, if you want to start visualizing the data in a more substantially different way
206 or else export the data for more detailed analysis under your own control,
207 switch to the SPARQL Query Interface. We also provide sample queries on the
208 this page to help you get started.
209
210 </p>
211 <ul>
212 <li><a href="{$library_name}/collection/{$collName}/page/sgvizler">Visualizer page</a></li>
213
214 <li><a href="{$library_name}/collection/{$collName}/page/sparql">Data Export</a>
215 </li>
216 <!--
217 This is a good place to go to see what sort of data is being stored, and we provide some sample
218 queries to get you going. But if you like to see the data presented more visually, we suggest
219 you try out the
220
221 <li><a href="{$library_name}/collection/{$collName}/page/sgvizler">SGVizler page</a></li>
222-->
223 </ul>
224
225 </div>
226
227 <gsf:script>
228 $('#viz-show-more').showMore({
229 minheight: 0,
230 buttontxtmore:"show more ...",
231 buttontxtless:"... show less"
232 });
233 </gsf:script>
234
235
236<!--
237 <p>
238 If you'd like to dig into the data behind this Digital Library collection, this can be done directly
239 using the <a href="{$library_name}/collection/{$collName}/page/sparql">SPARQL Query interface</a>.
240 This is a good place to go to see what sort of data is being stored, and we provide some sample
241 queries to get you going. But if you like to see the data presented more visually, we suggest
242 you try out the <a href="{$library_name}/collection/{$collName}/page/sgvizler">SGVizler page</a>,
243 which takes things to the next level, using pie-charts, histograms and other forms of
244 visualization to present the data.
245 </p>
246
247-->
248
249
250<!--
251 <div style="padding-top: 6px;">
252 So the above visualization show how many times each country has entered, over the years, but what about how
253 many times countries have won? And what about how many times countries have won per head of population?
254 <ul>
255 <li>
256 <a href="{$library_name}/collection/{$collName}/page/sgvizler"><i>Show me more visualizations ...</i></a>
257 </li>
258 </ul>
259 </div>
260-->
261
262 <h2 id="it-all-started-with">It All Started with a Little <strike>Sparkle</strike>SPARQL</h2>
263
264
265 <div id="technicaldev-turnstyle" style="margin-top: 12px;">
266 <div class="turnstyle-header" style="background-image: none; background-color: hsl(195, 47%, 35%);">
267 DL Technical Development
268 </div>
269
270 <div style="display: none; padding-left: 6px; padding-top: 6px; margin-left: 2px; margin-right: 2px; border-left: white solid 1px; border-right: white solid 1px; border-bottom: white solid 1px;">
271 <p>
272 In terms of how this collection was developed using the
273 Greenstone DL architecture, the starting point is the
274 formulation of a SPARQL query to retrieve from DBpedia
275 entries about all the entrants in the contest over the
276 years:
277 <pre style="background-color: #fff; color: #000; padding: 12px; margin-right: 6px;">
278SELECT ?countries_in_esc_by_year ?country_in_year ?year as ?Year ?country as ?Country ?entrant ?entrant_label as ?Creator ?song ?song_label as ?Title ?was_derived_from as ?WikipediaURL
279WHERE {
280 ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year.
281
282 ?country_in_year dct:subject ?countries_in_esc_by_year.
283 bind( REPLACE(str(?country_in_year), ".*(\\d{4})", "$1") as ?year).
284 FILTER ( xsd:integer(?year) &lt; 2020).
285
286 ?country_in_year dbp:country ?country.
287
288 ?country_in_year dbp:entrant ?entrant.
289 ?entrant rdfs:label ?entrant_label
290 FILTER (lang(?entrant_label) = 'en').
291
292 ?country_in_year dbp:song ?song.
293 ?song rdfs:label ?song_label
294 FILTER (lang(?song_label) = 'en').
295
296 OPTIONAL {
297 ?song prov:wasDerivedFrom ?was_derived_from
298 }
299}
300ORDER BY DESC(?countries_in_esc_by_year)
301 </pre>
302
303 </p>
304
305 <p>
306 The resulting SPARQL query result set (JSON format
307 selected for output) is then ingested into a Greenstone
308 DL collection, and used in a variety of ways. For now
309 an (admittedly cryptic) list of technical steps that
310 were developed and/or deployed to provide the
311 functionality encountered in interacting with this site.
312
313 <ul>
314 <li>New SPARQL plugin for <i>download_from.pl</i> developed, used in GLI to enter the above query</li>
315 <li>New SPARQL <i>Document Processing</i> plugin developed</li>
316 <li>Greenstone3 Apache Jena Triple Store Extension activated</li>
317 <li>SGVizler used to display Google Visualizations such as the pie-chart above.</li>
318 <li>Metadata in document view enhanced through Greenstone Format Statements micro-data</li>
319 <li>Custom <i>interface</i> developed</li>
320 </ul>
321 </p>
322
323 <p>
324 Bullet points above to be expanded upon!
325 </p>
326
327 <p>
328 Viewing the
329 <a download="collectionConfig.xml"
330 href="sites/{$site_name}/collect/{$collName}/etc/collectionConfig.xml">collection
331 configuration file</a> provides a good insight into how
332 all of these technical aspectcs are brought together.
333 </p>
334
335 <p>
336 Full disclosure as to how the collection all ticks is
337 provided through our Subversion repository. Topping up
338 our
339 <a href="https//trac.greenstone.org/browser/main/trunk/greenstone3">Greenstone3
340 code base</a> we have:
341
342 <ul>
343 <li>The site: <a href="https://trac.greenstone.org/browser/main/trunk/model-sites-dev/eurovision-lod">eurovision-lod</a></li>
344 <li>The interface: <a href="https://trac.greenstone.org/browser/main/trunk/model-interfaces-dev/eurovision-lod">eurovision-lod</a></li>
345 <li>The triplestore extension: <a href="https://trac.greenstone.org/browser/gs2-extensions/apache-jena/trunk/src">apache-jena</a></li>
346 </ul>
347
348 </p>
349 </div>
350 </div>
351
352 <script>
353 <xsl:text disable-output-escaping="yes">
354 $(function(){
355 transformToTurnstyleBlock("technicaldev");
356 });
357 </xsl:text>
358 </script>
359
360 <div id="LOD-turnstyle" style="margin-top: 12px;">
361 <div class="turnstyle-header" style="background-image: none; background-color: hsl(195, 47%, 35%);">
362 Linked Open Data
363 </div>
364
365 <div style="display: none; padding-left: 6px; padding-top: 6px; margin-left: 2px; margin-right: 2px; border-left: white solid 1px; border-right: white solid 1px; border-bottom: white solid 1px;">
366
367
368 <h2>Eurovision LOD SPARQL Endpoints</h2>
369 <p>
370 The source data can be access vis the DBpedia SPARQL endpoint. The ingested,
371 data (with correction) is available through the collection's local
372 SPARQL endpoint:
373 <ul>
374 <li>
375 <a href="https://dbpedia.org/sparql/">DBpedia's SPARQL endpoint</a>
376 </li>
377 <li>
378 <a href="{$library_name}/collection/{$collName}/page/sparql">DL's (local) SPARQL endpoint</a>
379 </li>
380 </ul>
381 </p>
382
383 <h2>Eurovision LOD Errata</h2>
384 <p>
385 Songs titles and Entrants (artists) that do not resolve to URIs:
386 <ul>
387 <li>
388 <a href="sites/{$site_name}/collect/{$collName}/prepare/problem-lod-lists/dbpedia-problem-songs.html">Problem Songs (titles are string literals not IRIs)</a>
389 </li>
390 <li>
391 <a href="sites/{$site_name}/collect/{$collName}/prepare/problem-lod-lists/dbpedia-problem-entrants.html">Problem Entrants (artists are string literals not IRIs)</a>
392 </li>
393 <li>
394 <a href="sites/{$site_name}/collect/{$collName}/prepare/problem-lod-lists/dbpedia-problem-category-in-year.html">Problem Category pages (some countries not listed in a given year despite competing)</a>
395 </li>
396 </ul>
397 </p>
398 </div>
399 </div>
400
401 <script>
402 <xsl:text disable-output-escaping="yes">
403 $(function(){
404 transformToTurnstyleBlock("LOD");
405 });
406 </xsl:text>
407 </script>
408
409 <div id="voting-turnstyle" style="margin-top: 12px;">
410 <div class="turnstyle-header" style="background-image: none; background-color: hsl(195, 47%, 35%);">
411 Voting Data
412 </div>
413
414 <div style="display: none; padding-left: 6px; padding-top: 6px; margin-left: 2px; margin-right: 2px; border-left: white solid 1px; border-right: white solid 1px; border-bottom: white solid 1px;">
415 <p>
416 The Voting data used in this collection is sourced from the Kaggle, which in turn
417 is derived from work available through Data Graver:
418 <ul>
419 <li><a href="https://www.kaggle.com/datagraver/eurovision-song-contest-scores-19752019">Kaggle Eurovision Voting dataset 1975-2019</a></li>
420 <li><a href="https://data.world/datagraver/eurovision-song-contest-scores-1975-2019">Data Graver</a></li>
421 <li><a href="https://docs.google.com/spreadsheets/d/1veXpiF54hQGP4OVuf1xjowumIe8HUOhI/edit#gid=528591420">Google Spreadsheet (internal use only)</a></li>
422
423 </ul>
424 </p>
425 </div>
426 </div>
427
428 <script>
429 <xsl:text disable-output-escaping="yes">
430 $(function(){
431 transformToTurnstyleBlock("voting");
432 });
433 </xsl:text>
434 </script>
435
436
437 </div>
438
439 </xsl:template>
440
441
442</xsl:stylesheet>
443
Note: See TracBrowser for help on using the repository browser.