1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE videocollection [
|
---|
3 | <!ENTITY ndash "–">
|
---|
4 | <!ENTITY mdash "—">
|
---|
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 live television link-ups 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 | With over 20 countries competing in a final, this means
|
---|
77 | that not all performers gets points from that country.
|
---|
78 | Next comes the "the popular vote"
|
---|
79 | where fans, still grouped by country, have
|
---|
80 | the votes they cast by phone, SMS or the Eurovision app
|
---|
81 | tallied and mapped into the same format of 12 points for 1st
|
---|
82 | place, and so on.
|
---|
83 | This all culminates in a new winner being crowned, with
|
---|
84 | the competition typically being hosted the following year
|
---|
85 | in that country.
|
---|
86 | </p>
|
---|
87 | </div>
|
---|
88 | <gsf:script>
|
---|
89 | $('#about-show-more').showMore({
|
---|
90 | minheight: 0,
|
---|
91 | buttontxtmore:"show more ...",
|
---|
92 | buttontxtless:"... show less"
|
---|
93 | });
|
---|
94 | </gsf:script>
|
---|
95 |
|
---|
96 |
|
---|
97 | <h2>Features of this Website</h2>
|
---|
98 |
|
---|
99 | <p>
|
---|
100 | This (unoffical) website has been developed by a small
|
---|
101 | team of dedicated Digital Library researchers who also
|
---|
102 | happen to be <i>huge</i> fans of Eurovision. We wish to
|
---|
103 | share our love for the competition, and at the same time
|
---|
104 | demonstrate what is possible whenâharnessing some of that
|
---|
105 | passion!âthe techniques of
|
---|
106 | <a href="https://en.wikipedia.org/wiki/Linked_data">Linked
|
---|
107 | Open Data</a> are applied
|
---|
108 | to the Open Source
|
---|
109 | <a href="https://www.greenstone.org">Greenstone3</a>
|
---|
110 | Digital Library platform. For the technically interested
|
---|
111 | see the
|
---|
112 | <a href="{$library_name}/collection/{$collName}/page/about#it-all-started-with">
|
---|
113 | <i style="padding-right: 6px;">It All Started with a Little <strike>Sparkle</strike>SPARQL</i></a>
|
---|
114 | below for details about how the digital library was formed.
|
---|
115 | </p>
|
---|
116 |
|
---|
117 | <!--
|
---|
118 | <p>
|
---|
119 | For those who want to jump right in and access information about, as well as see and hear some of the past performances,
|
---|
120 | we suggest you
|
---|
121 | start by exploring the assembled information through
|
---|
122 | the browsing tabs, such as
|
---|
123 | <a href="{$library_name}/collection/{$collName}/browse/CL3">browse by countries</a>
|
---|
124 | if you want (for instance) to reminise about songs your country have entered in the past, or
|
---|
125 | <a href="{$library_name}/collection/{$collName}/browse/CL4">browse by years</a> if
|
---|
126 | you are curious about who were the countries competing in that inaugural year of 1956.
|
---|
127 | Alternatively, use the quick-search box to query the DL collection for a term that you sparks
|
---|
128 | interest, such as
|
---|
129 | <a href="{$library_name}/collection/{$collName}/search/TextQuery?qs=1&rt=rd&s1.level=Doc&startPage=1&s1.query=love&s1.index=ZZ">love</a>
|
---|
130 | and
|
---|
131 | <a href="{$library_name}/collection/{$collName}/search/TextQuery?qs=1&rt=rd&s1.level=Doc&startPage=1&s1.query=amore&s1.index=ZZ">amore</a>,
|
---|
132 | or maybe something more frivolous such as
|
---|
133 | <a href="{$library_name}/collection/{$collName}/search/TextQuery?qs=1&rt=rd&s1.level=Doc&startPage=1&s1.query=la&s1.index=ZZ">la</a>.
|
---|
134 |
|
---|
135 | </p>
|
---|
136 | -->
|
---|
137 |
|
---|
138 | <p>
|
---|
139 | For those who want to jump right in and access information about, as well as see and hear some of the past performances,
|
---|
140 | we suggest you
|
---|
141 | start by exploring the assembled information through
|
---|
142 | the browsing tabs. For example:
|
---|
143 | <ul>
|
---|
144 | <li><a href="{$library_name}/collection/{$collName}/browse/CL3">Browse by countries</a>
|
---|
145 | if you want (for instance) to reminise about songs your country have entered in the past; or</li>
|
---|
146 | <li><a href="{$library_name}/collection/{$collName}/browse/CL4">Browse by years</a> if
|
---|
147 | you are curious about who were the countries competing in that inaugural year of 1956.</li>
|
---|
148 | </ul>
|
---|
149 | </p>
|
---|
150 | <p>
|
---|
151 | Alternatively, use the quick-search box to query the DL collection for a term that you sparks
|
---|
152 | interest. For example:
|
---|
153 | <ul>
|
---|
154 | <li>
|
---|
155 | <a href="{$library_name}/collection/{$collName}/search/TextQuery?qs=1&rt=rd&s1.level=Doc&startPage=1&s1.query=love&s1.index=ZZ">love</a>
|
---|
156 | and
|
---|
157 | <a href="{$library_name}/collection/{$collName}/search/TextQuery?qs=1&rt=rd&s1.level=Doc&startPage=1&s1.query=amore&s1.index=ZZ">amore</a>,
|
---|
158 | or maybe something more frivolous such as
|
---|
159 | <a href="{$library_name}/collection/{$collName}/search/TextQuery?qs=1&rt=rd&s1.level=Doc&startPage=1&s1.query=la&s1.index=ZZ">la</a>.
|
---|
160 | </li>
|
---|
161 | </ul>
|
---|
162 | </p>
|
---|
163 |
|
---|
164 |
|
---|
165 | <h3>Data Analysis and Visualization</h3>
|
---|
166 |
|
---|
167 | <gsf:script src="ext/jena/sgvizler2/sgvizler2.js"/>
|
---|
168 |
|
---|
169 | <gsf:script>
|
---|
170 | $(document).ready(
|
---|
171 | function() {
|
---|
172 |
|
---|
173 | // Exaple triple
|
---|
174 | // "s": { "type": "uri" , "value": "http://127.0.0.1:8383/greenstone3/library/collection/eurovision/document/HASH0191e9cc7bfdf14743472257s10" } ,
|
---|
175 | // "p": { "type": "uri" , "value": "gsdlextracted:Country" } ,
|
---|
176 | // "o": { "type": "literal" , "value": "United Kingdom" }
|
---|
177 |
|
---|
178 | sgvizler2.containerDraw('sgvizler2-country-count');
|
---|
179 | }
|
---|
180 | );
|
---|
181 | </gsf:script>
|
---|
182 |
|
---|
183 | <div id="sgvizler2-country-count"
|
---|
184 | data-sgvizler-endpoint="//sowemustthink.space/greenstone3-lod3/greenstone/query"
|
---|
185 | data-sgvizler-chart="google.visualization.BarChart"
|
---|
186 | data-sgvizler-chart-options="title=Number of Songs from each Country|legend.position=none|height=900|chartArea.height=840|fontSize=11"
|
---|
187 | data-sgvizler-log="2"
|
---|
188 | style="width:900px; height:300px; margin-left: auto; margin-right: auto; overflow-y: scroll; overflow-x: hidden;">
|
---|
189 | <xsl:attribute name="data-sgvizler-query">
|
---|
190 | PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
---|
191 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
192 | SELECT (?country) (COUNT(?country) AS ?freqCount)
|
---|
193 | WHERE {
|
---|
194 | GRAPH <http://localhost:4040/greenstone/data/<xsl:value-of select="$collName"/>> {
|
---|
195 | ?s gsdlextracted:Country ?country
|
---|
196 | }
|
---|
197 | }
|
---|
198 | GROUP BY ?country ORDER BY asc(?country)
|
---|
199 | </xsl:attribute>
|
---|
200 | <xsl:text> Loading ...</xsl:text>
|
---|
201 | </div>
|
---|
202 |
|
---|
203 |
|
---|
204 | <p style="padding-top: 10px;">
|
---|
205 | All the metadata in the digital library is simultaneously
|
---|
206 | published an linked data, meaning it is possible to
|
---|
207 | extract and analyze the data contained here in a variety
|
---|
208 | of ways. To aid in such analysis we have also we have
|
---|
209 | added in a data visualization layer to the digital
|
---|
210 | library. This is how the bar-graph above has been
|
---|
211 | created, which shows how many times each country has
|
---|
212 | competed, alphabetically sorted.
|
---|
213 | </p>
|
---|
214 | <p>
|
---|
215 | Through our:
|
---|
216 | <ul>
|
---|
217 | <li>
|
---|
218 | <a href="{$library_name}/collection/{$collName}/page/sgvizler">Vizualizer page</a>
|
---|
219 | </li>
|
---|
220 | </ul>
|
---|
221 | </p>
|
---|
222 | <p>
|
---|
223 | we provide samples your can try out to give you an idea of
|
---|
224 | the sorts of visualization that can be produced. More
|
---|
225 | importantly, these samples are editable so you are free to
|
---|
226 | change them however you wish. On the visualization page
|
---|
227 | you'll find a sample that shows you how often different
|
---|
228 | countries have won Eurovision, but perhaps you'd like to
|
---|
229 | find out who has lost the most often? We also provide a
|
---|
230 | sample dataflow visualization of jury voting patterns over
|
---|
231 | the last decade, which makes for interesting viewing!
|
---|
232 | Adjust the values used to discover how this compares
|
---|
233 | withother time periods.
|
---|
234 | </p>
|
---|
235 |
|
---|
236 | <div id="viz-show-more" style="margin-bottom: 10px;">
|
---|
237 |
|
---|
238 | <p>
|
---|
239 | In addition to the visualizer, through the:
|
---|
240 | <ul>
|
---|
241 | <li>
|
---|
242 | <a href="{$library_name}/collection/{$collName}/page/sparql">Data Analysis page</a>
|
---|
243 | </li>
|
---|
244 | </ul>
|
---|
245 | you will find a set of samples you can test-drive to give you an idea of the
|
---|
246 | sorts of raw data analysis that can be done. The syntax used is call
|
---|
247 | <a href="https://en.wikipedia.org/wiki/SPARQL" target="_blank">SPARQL</a> (pronounced "sparkle"). If you are unfamiliar
|
---|
248 | with this syntax, there are a variety of tutorials available online where you can learn about query language, such as
|
---|
249 | the one done by <a href="https://jena.apache.org/tutorials/sparql.html" target="_blank">Apache Jena</a>, an Open Source
|
---|
250 | initiative that provides a vareity of Semantic Web and Linked Data tools.
|
---|
251 | As before, these samples are editable so you are free to
|
---|
252 | change them however you wish adjust the analysis undertaken, or once you're mastered the
|
---|
253 | query syntax, develop completely original forms of
|
---|
254 | anaysis.
|
---|
255 | </p>
|
---|
256 |
|
---|
257 |
|
---|
258 | <p>
|
---|
259 | We suggest starting with viewing <a href="{$library_name}/collection/{$collName}/page/sgvizler">sample visualizations</a> to see what's possible,
|
---|
260 | and making minor edits to that to adjust what is visualized.
|
---|
261 | Then, if you want to start visualizing the data in a more substantially different way
|
---|
262 | or else export the data for more detailed analysis under your own control,
|
---|
263 | switch to the <a href="{$library_name}/collection/{$collName}/page/sparql">SPARQL-based data analysis</a> page to ensure the underlying
|
---|
264 | data retrieved is as you intended. Then take the newly developed SPARQL query back to the visualizer page, and through the
|
---|
265 | additional text-input fields provided there, develop the visualization.
|
---|
266 |
|
---|
267 | <!--
|
---|
268 | This is a good place to go to see what sort of data is being stored, and we provide some sample
|
---|
269 | queries to get you going. But if you like to see the data presented more visually, we suggest
|
---|
270 | you try out the
|
---|
271 |
|
---|
272 | <li><a href="{$library_name}/collection/{$collName}/page/sgvizler">SGVizler page</a></li>
|
---|
273 | -->
|
---|
274 | </p>
|
---|
275 |
|
---|
276 | </div>
|
---|
277 |
|
---|
278 | <gsf:script>
|
---|
279 | $('#viz-show-more').showMore({
|
---|
280 | minheight: 0,
|
---|
281 | buttontxtmore:"show more ...",
|
---|
282 | buttontxtless:"... show less"
|
---|
283 | });
|
---|
284 | </gsf:script>
|
---|
285 |
|
---|
286 |
|
---|
287 | <!--
|
---|
288 | <p>
|
---|
289 | If you'd like to dig into the data behind this Digital Library collection, this can be done directly
|
---|
290 | using the <a href="{$library_name}/collection/{$collName}/page/sparql">SPARQL Query interface</a>.
|
---|
291 | This is a good place to go to see what sort of data is being stored, and we provide some sample
|
---|
292 | queries to get you going. But if you like to see the data presented more visually, we suggest
|
---|
293 | you try out the <a href="{$library_name}/collection/{$collName}/page/sgvizler">SGVizler page</a>,
|
---|
294 | which takes things to the next level, using pie-charts, histograms and other forms of
|
---|
295 | visualization to present the data.
|
---|
296 | </p>
|
---|
297 |
|
---|
298 | -->
|
---|
299 |
|
---|
300 |
|
---|
301 | <!--
|
---|
302 | <div style="padding-top: 6px;">
|
---|
303 | So the above visualization show how many times each country has entered, over the years, but what about how
|
---|
304 | many times countries have won? And what about how many times countries have won per head of population?
|
---|
305 | <ul>
|
---|
306 | <li>
|
---|
307 | <a href="{$library_name}/collection/{$collName}/page/sgvizler"><i>Show me more visualizations ...</i></a>
|
---|
308 | </li>
|
---|
309 | </ul>
|
---|
310 | </div>
|
---|
311 | -->
|
---|
312 |
|
---|
313 | <h2 id="it-all-started-with">It All Started with a Little <strike>Sparkle</strike>SPARQL</h2>
|
---|
314 |
|
---|
315 |
|
---|
316 | <p>
|
---|
317 | In terms of how this collection was developed using the
|
---|
318 | Greenstone3 Digital Library (DL) architecture, we are
|
---|
319 | being a touch irreverent to say <i>it all started with a
|
---|
320 | little SPARQL</i>.
|
---|
321 | It is certainly true to say that, operationally, the DL
|
---|
322 | was created using SPARQL query that draws down JSON
|
---|
323 | records from
|
---|
324 | <a href="https://dbpedia.org" target="_blank">DBPedia</a>
|
---|
325 | about all the different entrants in the Eurovision. This
|
---|
326 | is then ingested into Greenstone using its document- and
|
---|
327 | metadata-processing pipeline: expand through the <i>show
|
---|
328 | more ...</i> button below to see the actual query.
|
---|
329 | But in truth, our starting point of the SPARQL query is
|
---|
330 | only possible due to the Herculean efforts of the
|
---|
331 | contributors to the Wikipedia pages about
|
---|
332 | the Eurovision Song Content, and following on from
|
---|
333 | that the endeavors of the DBPedia project to
|
---|
334 | transform a substantial portion of that information
|
---|
335 | into machine-readable linked data.
|
---|
336 | </p>
|
---|
337 |
|
---|
338 | <p>
|
---|
339 | Continuing the technical develoment of the DL,
|
---|
340 | to the DBpedia extraxcted content, we then added in voting metadataâagain
|
---|
341 | using the Greenstone document- and metadata- processing
|
---|
342 | pipelineâthis time in the form of CSV-based spreadsheet derived from the
|
---|
343 | <a href="https://www.kaggle.com/datagraver/eurovision-song-contest-scores-19752019" target="_blank">Kaggle Eurovision Voting dataset 1975-2019</a>.
|
---|
344 | </p>
|
---|
345 |
|
---|
346 | <!--
|
---|
347 | The resulting SPARQL query result set (JSON format
|
---|
348 | selected for output) is then ingested into a Greenstone
|
---|
349 | DL collection, and used in a variety of ways.
|
---|
350 |
|
---|
351 |
|
---|
352 |
|
---|
353 | the starting point is the
|
---|
354 | formulation of a SPARQL query to retrieve from DBpedia
|
---|
355 | entries about all the entrants in the contest over the
|
---|
356 | years:
|
---|
357 | -->
|
---|
358 |
|
---|
359 |
|
---|
360 | <div id="dl-tech-show-more">
|
---|
361 | <p>
|
---|
362 | Here's the SPARQL query that retrieves, for every year
|
---|
363 | Eurovision has been held, the countries that took part.
|
---|
364 | At under 20 lines of code, we think it's pretty awesome!
|
---|
365 | The information retrieved includes the country, year,
|
---|
366 | title of the song, and name of the entrant (the
|
---|
367 | act/artist), amgonst other things. All useful core
|
---|
368 | information to seed the digital library collection. As
|
---|
369 | the 2020 Eurovision event did not run due to the
|
---|
370 | Covid-19 Pandemic, and (at the time of writing the 2021
|
---|
371 | is yet to occur), we have opted to filter the matches
|
---|
372 | returned to be prior to 2020.
|
---|
373 | </p>
|
---|
374 |
|
---|
375 | <pre style="background-color: #fff; color: #000; padding: 12px; margin-right: 6px;">
|
---|
376 | SELECT ?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
|
---|
377 | WHERE {
|
---|
378 | ?countries_in_esc_by_year skos:broader dbc:Countries_in_the_Eurovision_Song_Contest_by_year.
|
---|
379 |
|
---|
380 | ?country_in_year dct:subject ?countries_in_esc_by_year.
|
---|
381 | # bind( REPLACE(str(?country_in_year), ".*(\\d{4})", "$1") as ?year).
|
---|
382 | ?country_in_year dbp:year ?year.
|
---|
383 | FILTER ( xsd:integer(?year) < 2020).
|
---|
384 |
|
---|
385 | ?country_in_year dbp:country ?country.
|
---|
386 |
|
---|
387 | ?country_in_year dbp:entrant ?entrant.
|
---|
388 | ?entrant rdfs:label ?entrant_label
|
---|
389 | FILTER (lang(?entrant_label) = 'en').
|
---|
390 |
|
---|
391 | ?country_in_year dbp:song ?song.
|
---|
392 | ?song rdfs:label ?song_label
|
---|
393 | FILTER (lang(?song_label) = 'en').
|
---|
394 |
|
---|
395 | OPTIONAL {
|
---|
396 | ?song prov:wasDerivedFrom ?was_derived_from
|
---|
397 | }
|
---|
398 | }
|
---|
399 | ORDER BY DESC(?countries_in_esc_by_year)
|
---|
400 | </pre>
|
---|
401 |
|
---|
402 | <p>
|
---|
403 | You can try this query out yourself if you like. Select the entirety of the SPARQL query
|
---|
404 | in the above text box, and press <i>Control-C</i> to place it in your Copy-buffer.
|
---|
405 | Next visit the DBPedia SPARQL Endpoint given below, and in the main text box of the page
|
---|
406 | that appears, press <i>Control-V</i>
|
---|
407 | to past in your SPARQL query. Finally, click on the <i>Execute Query</i> button
|
---|
408 | to initiate the search.
|
---|
409 | <ul>
|
---|
410 | <li>
|
---|
411 | <a href="https://dbpedia.org/sparql/" target="_blank">DBpedia's SPARQL endpoint</a>
|
---|
412 | </li>
|
---|
413 | </ul>
|
---|
414 | </p>
|
---|
415 | <p>
|
---|
416 | Through the SPARQL Endpoint you can change the output format that is used to, for example, JSON or Turtle.
|
---|
417 | For convenience, if you are just interested in seeing what the outcome of running the query is, displayed as a web page:
|
---|
418 | <ul>
|
---|
419 | <li>
|
---|
420 | <a href="https://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=SELECT+%3Fcountries_in_esc_by_year+%3Fcountry_in_year+%3Fyear+as+%3FYear+%3Fcountry+as+%3FCountry+%3Fentrant+%3Fentrant_label+as+%3FCreator+%3Fsong+%3Fsong_label+as+%3FTitle+%3Fwas_derived_from+as+%3FWikipediaURL%0D%0AWHERE+%7B%0D%0A++++%3Fcountries_in_esc_by_year+skos%3Abroader+dbc%3ACountries_in_the_Eurovision_Song_Contest_by_year.%0D%0A%0D%0A++++%3Fcountry_in_year+dct%3Asubject+%3Fcountries_in_esc_by_year.%0D%0A++++bind%28+REPLACE%28str%28%3Fcountry_in_year%29%2C+%22.*%28%5C%5Cd%7B4%7D%29%22%2C+%22%241%22%29+as+%3Fyear%29.%0D%0A++++FILTER+%28+xsd%3Ainteger%28%3Fyear%29+%3C+2020%29.%0D%0A%0D%0A++++%3Fcountry_in_year+dbp%3Acountry+%3Fcountry.%0D%0A%0D%0A++++%3Fcountry_in_year+dbp%3Aentrant+%3Fentrant.%0D%0A++++%3Fentrant+rdfs%3Alabel+%3Fentrant_label%0D%0A++++++FILTER+%28lang%28%3Fentrant_label%29+%3D+%27en%27%29.%0D%0A%0D%0A++++%3Fcountry_in_year+dbp%3Asong+%3Fsong.%0D%0A++++%3Fsong+rdfs%3Alabel+%3Fsong_label%0D%0A++++++FILTER+%28lang%28%3Fsong_label%29+%3D+%27en%27%29.%0D%0A%0D%0A++++OPTIONAL+%7B%0D%0A++++++%3Fsong+prov%3AwasDerivedFrom+%3Fwas_derived_from%0D%0A++++%7D%0D%0A%7D%0D%0AORDER+BY+DESC%28%3Fcountries_in_esc_by_year%29&format=text%2Fhtml&timeout=30000&signal_void=on&signal_unconnected=on" target="_blank">Click here to run the query directly</a>
|
---|
421 | </li>
|
---|
422 | </ul>
|
---|
423 | </p>
|
---|
424 |
|
---|
425 | <h3>Triplestore Errata</h3>
|
---|
426 |
|
---|
427 | <p>
|
---|
428 | The above SPARQL query is a good starting point to
|
---|
429 | extract all the Eurovision entries over the years,
|
---|
430 | however a more careful study of the returned results
|
---|
431 | revealed a few complications that needed to be
|
---|
432 | adressed. One issue stems from the fact that in its
|
---|
433 | inaugural year, countries were allowed to send two
|
---|
434 | entries each. For 1956, for every URI representing a
|
---|
435 | country in that year there are two title and two
|
---|
436 | entrants represented. As initially expressed, the
|
---|
437 | SPARQL query does not cater for this circumstance and
|
---|
438 | results in 2 x 2 = 4 combintations of artist and title
|
---|
439 | per song.
|
---|
440 | </p>
|
---|
441 | <p>
|
---|
442 | The way to address this is to include an additional
|
---|
443 | constraint that ensures that the URI representing
|
---|
444 | <i>?song</i> includes the relationship <i>dbp:artist</i>
|
---|
445 | for <i>?entrant</i>, effectively locking in to the
|
---|
446 | artist that performed that particular song. Studying
|
---|
447 | the result of this change, however, showed up a more
|
---|
448 | wide-reaching problem which was that not all the
|
---|
449 | <i>?country_year</i> URI entries expressed relationships
|
---|
450 | to songs and artists that were themselves URI: sometimes
|
---|
451 | they were represented as a string literal, meaning the
|
---|
452 | added constraint would fail, and reject entirely the
|
---|
453 | details about a country's entry in that
|
---|
454 | year. Compounding this, we also saw that some of the
|
---|
455 | processing work by DBPedia to turn the manually curated
|
---|
456 | information in Wikipedia into machine-readable form
|
---|
457 | errenouesly handled the formation of some of the song
|
---|
458 | titles and artists.
|
---|
459 | </p>
|
---|
460 | <p>
|
---|
461 | Given that the erroneous entries were strings (even
|
---|
462 | integer numbers at times!) and not URI gave us a way in
|
---|
463 | to see how wide-spread the problem was. Using adapted
|
---|
464 | versions of the the main SPARQL query we had formulated,
|
---|
465 | we were able to produce lists of the affected entries.
|
---|
466 | The lists are available here through the following
|
---|
467 | links:
|
---|
468 | <ul>
|
---|
469 | <li>
|
---|
470 | <a target="_blank" href="sites/{$site_name}/collect/{$collName}/prepare/problem-lod-lists/dbpedia-problem-songs.html">Problem Songs (titles are literals not URIs/IRIs)</a>
|
---|
471 | </li>
|
---|
472 | <li>
|
---|
473 | <a target="_blank" href="sites/{$site_name}/collect/{$collName}/prepare/problem-lod-lists/dbpedia-problem-entrants.html">Problem Entrants (artists are literals not URIs/IRIs)</a>
|
---|
474 | </li>
|
---|
475 | </ul>
|
---|
476 | </p>
|
---|
477 |
|
---|
478 | <p>
|
---|
479 | The generation of these lists also provided the key to
|
---|
480 | the approach we used to compensate for the compliations
|
---|
481 | these issues introduced. Skipping ahead slightly to the
|
---|
482 | formation of the Digital Library collection with
|
---|
483 | Greenstone3, we make use of this software architecture's
|
---|
484 | Triplestore Extension, which means that in addition to
|
---|
485 | the main DL and Open Archive Inititiave (OAI) server
|
---|
486 | endpoints, there is also an triplestore backend. While
|
---|
487 | the triplestore extension was designed to provide SPARQL
|
---|
488 | access to the metadata and document content of the DL
|
---|
489 | collections, its existence means we can include in it a
|
---|
490 | graph that represents the necessary errata information
|
---|
491 | we need to "course correct" the SPARQL query
|
---|
492 | to perform how it is intended.
|
---|
493 | </p>
|
---|
494 |
|
---|
495 | <p>
|
---|
496 | This does admittedly complicate the expression of the
|
---|
497 | query, but the additions are managible. The expanded
|
---|
498 | query makes use of SPARQL's federated search feature:
|
---|
499 | the query starts as before with the retrieval of triples
|
---|
500 | from the DBPedia endpoint; based on resolved values of
|
---|
501 | entities such as <i>?country_year</i> and <i>?song</i>,
|
---|
502 | it then optionally retrieves matching items from the DL
|
---|
503 | SPARQL endpoint. The final step is to use a conditional
|
---|
504 | clause (if-statment) to test to see if the DBpedia
|
---|
505 | version of the song is a literal, and if it is and if
|
---|
506 | there is a bound value for the DL retrieved one, then it
|
---|
507 | selects that one in preference.
|
---|
508 | </p>
|
---|
509 |
|
---|
510 | <p>
|
---|
511 | The DBpedia SPARQL endpoint doesn't allow for federated
|
---|
512 | queries, and so we initiate the SPARQL queries through
|
---|
513 | the DLs SPARQL endpoint, using SERVICE blocks to specify
|
---|
514 | the parts of the query that are run on the DBpedia endpoint.
|
---|
515 | <ul>
|
---|
516 | <li>
|
---|
517 | <a href="{$library_name}/collection/{$collName}/page/sparql">DL's (local) SPARQL endpoint</a>
|
---|
518 | </li>
|
---|
519 | </ul>
|
---|
520 | </p>
|
---|
521 |
|
---|
522 | <h3>Adding in Voting Metadata</h3>
|
---|
523 |
|
---|
524 | <p>
|
---|
525 | To fulfill our vision of developing this DL collection as a rich resource to
|
---|
526 | through which to explore the phenonomon
|
---|
527 |
|
---|
528 | </p>
|
---|
529 |
|
---|
530 | <h3>Patching in Missing Data: Page Scraping</h3>
|
---|
531 |
|
---|
532 |
|
---|
533 | <p>
|
---|
534 | Despite our best intentions to work soley with ....
|
---|
535 | .. missing categories ...
|
---|
536 |
|
---|
537 | totting up how many entrie per year ...
|
---|
538 | thousands of entries
|
---|
539 |
|
---|
540 | We took the opportunity to add in further fields: Performing Position, Placement, Voting Total, thumbnail flag image.
|
---|
541 |
|
---|
542 | <ul>
|
---|
543 | <li>
|
---|
544 | <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>
|
---|
545 | </li>
|
---|
546 | </ul>
|
---|
547 | </p>
|
---|
548 |
|
---|
549 |
|
---|
550 | </div>
|
---|
551 | <gsf:script>
|
---|
552 | $('#dl-tech-show-more').showMore({
|
---|
553 | minheight: 0,
|
---|
554 | buttontxtmore:"show more ...",
|
---|
555 | buttontxtless:"... show less"
|
---|
556 | });
|
---|
557 | </gsf:script>
|
---|
558 |
|
---|
559 |
|
---|
560 | <div>
|
---|
561 | <h3>The Gory Details</h3>
|
---|
562 | <!--
|
---|
563 | <p>
|
---|
564 | The resulting SPARQL query result set (JSON format
|
---|
565 | selected for output) is then ingested into a Greenstone
|
---|
566 | DL collection, and used in a variety of ways. For now
|
---|
567 | an (admittedly cryptic) list of technical steps that
|
---|
568 | were developed and/or deployed to provide the
|
---|
569 | functionality encountered in interacting with this site.
|
---|
570 |
|
---|
571 | <ul>
|
---|
572 | <li>New SPARQL plugin for <i>download_from.pl</i> developed, used in GLI to enter the above query</li>
|
---|
573 | <li>New SPARQL <i>Document Processing</i> plugin developed</li>
|
---|
574 | <li>Greenstone3 Apache Jena Triple Store Extension activated</li>
|
---|
575 | <li>SGVizler used to display Google Visualizations such as the pie-chart above.</li>
|
---|
576 | <li>Metadata in document view enhanced through Greenstone Format Statements micro-data</li>
|
---|
577 | <li>Custom <i>interface</i> developed</li>
|
---|
578 | </ul>
|
---|
579 | </p>
|
---|
580 | -->
|
---|
581 | <p>
|
---|
582 | Viewing the
|
---|
583 | <a download="collectionConfig.xml"
|
---|
584 | href="sites/{$site_name}/collect/{$collName}/etc/collectionConfig.xml">collection
|
---|
585 | configuration file</a> provides a good insight into how
|
---|
586 | all of these technical aspectcs are brought together.
|
---|
587 | </p>
|
---|
588 |
|
---|
589 | <p>
|
---|
590 | Full disclosure as to how the collection all ticks is
|
---|
591 | provided through our Subversion repository. Topping up
|
---|
592 | our
|
---|
593 | <a href="https//trac.greenstone.org/browser/main/trunk/greenstone3">Greenstone3
|
---|
594 | code base</a> we have:
|
---|
595 |
|
---|
596 | <ul>
|
---|
597 | <li>The site: <a href="https://trac.greenstone.org/browser/main/trunk/model-sites-dev/eurovision-lod">eurovision-lod</a></li>
|
---|
598 | <li>The interface: <a href="https://trac.greenstone.org/browser/main/trunk/model-interfaces-dev/eurovision-lod">eurovision-lod</a></li>
|
---|
599 | <li>The triplestore extension: <a href="https://trac.greenstone.org/browser/gs2-extensions/apache-jena/trunk/src">apache-jena</a></li>
|
---|
600 | </ul>
|
---|
601 |
|
---|
602 | </p>
|
---|
603 |
|
---|
604 | </div>
|
---|
605 |
|
---|
606 | <!--
|
---|
607 | <div id="technicaldev-turnstyle" style="margin-top: 12px;">
|
---|
608 | <div class="turnstyle-header" style="background-image: none; background-color: hsl(195, 47%, 35%);">
|
---|
609 | DL Technical Development
|
---|
610 | </div>
|
---|
611 |
|
---|
612 | <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;">
|
---|
613 | <p>
|
---|
614 | In terms of how this collection was developed using the
|
---|
615 | Greenstone DL architecture, the starting point is the
|
---|
616 | formulation of a SPARQL query to retrieve from DBpedia
|
---|
617 | entries about all the entrants in the contest over the
|
---|
618 | years:
|
---|
619 |
|
---|
620 | </p>
|
---|
621 |
|
---|
622 | </div>
|
---|
623 | </div>
|
---|
624 |
|
---|
625 | <script>
|
---|
626 | <xsl:text disable-output-escaping="yes">
|
---|
627 | $(function(){
|
---|
628 | transformToTurnstyleBlock("technicaldev");
|
---|
629 | });
|
---|
630 | </xsl:text>
|
---|
631 | </script>
|
---|
632 | -->
|
---|
633 |
|
---|
634 | <!--
|
---|
635 | <div id="LOD-turnstyle" style="margin-top: 12px;">
|
---|
636 | <div class="turnstyle-header" style="background-image: none; background-color: hsl(195, 47%, 35%);">
|
---|
637 | Linked Open Data
|
---|
638 | </div>
|
---|
639 |
|
---|
640 | <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;">
|
---|
641 |
|
---|
642 |
|
---|
643 | <h2>Eurovision LOD SPARQL Endpoints</h2>
|
---|
644 | <p>
|
---|
645 | The source data can be access vis the DBpedia SPARQL endpoint. The ingested,
|
---|
646 | data (with correction) is available through the collection's local
|
---|
647 | SPARQL endpoint:
|
---|
648 | <ul>
|
---|
649 | <li>
|
---|
650 | <a href="https://dbpedia.org/sparql/">DBpedia's SPARQL endpoint</a>
|
---|
651 | </li>
|
---|
652 | <li>
|
---|
653 | <a href="{$library_name}/collection/{$collName}/page/sparql">DL's (local) SPARQL endpoint</a>
|
---|
654 | </li>
|
---|
655 | </ul>
|
---|
656 | </p>
|
---|
657 |
|
---|
658 | <h2>Eurovision LOD Errata</h2>
|
---|
659 | </div>
|
---|
660 | </div>
|
---|
661 |
|
---|
662 | <script>
|
---|
663 | <xsl:text disable-output-escaping="yes">
|
---|
664 | $(function(){
|
---|
665 | transformToTurnstyleBlock("LOD");
|
---|
666 | });
|
---|
667 | </xsl:text>
|
---|
668 | </script>
|
---|
669 | -->
|
---|
670 |
|
---|
671 | <!--
|
---|
672 | <div id="voting-turnstyle" style="margin-top: 12px;">
|
---|
673 | <div class="turnstyle-header" style="background-image: none; background-color: hsl(195, 47%, 35%);">
|
---|
674 | Voting Data
|
---|
675 | </div>
|
---|
676 |
|
---|
677 | <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;">
|
---|
678 | <p>
|
---|
679 | The Voting data used in this collection is sourced from the Kaggle, which in turn
|
---|
680 | is derived from work available through Data Graver:
|
---|
681 | <ul>
|
---|
682 | <li><a href="https://www.kaggle.com/datagraver/eurovision-song-contest-scores-19752019">Kaggle Eurovision Voting dataset 1975-2019</a></li>
|
---|
683 | <li><a href="https://data.world/datagraver/eurovision-song-contest-scores-1975-2019">Data Graver</a></li>
|
---|
684 | <li><a href="https://docs.google.com/spreadsheets/d/1veXpiF54hQGP4OVuf1xjowumIe8HUOhI/edit#gid=528591420">Google Spreadsheet (internal use only)</a></li>
|
---|
685 |
|
---|
686 | </ul>
|
---|
687 | </p>
|
---|
688 | </div>
|
---|
689 | </div>
|
---|
690 |
|
---|
691 | <script>
|
---|
692 | <xsl:text disable-output-escaping="yes">
|
---|
693 | $(function(){
|
---|
694 | transformToTurnstyleBlock("voting");
|
---|
695 | });
|
---|
696 | </xsl:text>
|
---|
697 | </script>
|
---|
698 |
|
---|
699 | -->
|
---|
700 |
|
---|
701 | </div>
|
---|
702 |
|
---|
703 | </xsl:template>
|
---|
704 |
|
---|
705 |
|
---|
706 | </xsl:stylesheet>
|
---|
707 |
|
---|