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 |
|
---|
12 | <!-- use the 'main' layout -->
|
---|
13 | <xsl:import href="layouts/main.xsl"/>
|
---|
14 |
|
---|
15 | <xsl:variable name="groupPath"><xsl:value-of select="/page/pageRequest/paramList/param[@name='group']/@value"/></xsl:variable>
|
---|
16 | <!-- set page title -->
|
---|
17 | <xsl:template name="pageTitle">SPARQL Query</xsl:template>
|
---|
18 |
|
---|
19 | <!-- set page breadcrumbs -->
|
---|
20 | <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/>
|
---|
21 | <xsl:if test="$groupPath != ''">
|
---|
22 | <xsl:for-each select="/page/pageResponse/pathList/group">
|
---|
23 | <xsl:sort data-type="number" select="@position"/>
|
---|
24 | <a>
|
---|
25 | <xsl:attribute name="href"><gslib:groupHref path="{@path}"/></xsl:attribute>
|
---|
26 | <xsl:attribute name="title"><gslib:groupName path="{@path}"/></xsl:attribute>
|
---|
27 | <gslib:groupName path="{@path}"/>
|
---|
28 | </a>
|
---|
29 | <gslib:rightArrow/>
|
---|
30 | </xsl:for-each>
|
---|
31 | </xsl:if>
|
---|
32 | <a href="{$library_name}/collection/{$collName}/page/about"><gslib:collectionName/></a>
|
---|
33 | </xsl:template>
|
---|
34 |
|
---|
35 | <!-- the page content -->
|
---|
36 | <xsl:template match="/page">
|
---|
37 | <!--
|
---|
38 | <link rel="stylesheet" href="sites/{$site_name}/collect/{$collName}/style/fuseki.css" type="text/css" />
|
---|
39 | -->
|
---|
40 | <gsf:script src="sites/{$site_name}/collect/{$collName}/js/jquery.show-more.js"/>
|
---|
41 | <gsf:script src="sites/{$site_name}/collect/{$collName}/js/eurovision.js"/>
|
---|
42 | <gsf:script src="sites/{$site_name}/collect/{$collName}/js/dataviz.js"/>
|
---|
43 |
|
---|
44 | <!--
|
---|
45 | <link rel="stylesheet" href="sites/{$site_name}/collect/{$collName}/css/eurovision.css" type="text/css" />
|
---|
46 | -->
|
---|
47 | <gsf:style src="sites/{$site_name}/collect/{$collName}/css/eurovision.css" />
|
---|
48 | <gsf:style src="sites/{$site_name}/collect/{$collName}/css/dataviz.css" />
|
---|
49 | <style>
|
---|
50 | div { padding-left: 12px; padding-right: 12px; padding-top: 6px; padding-bottom: 6px;}
|
---|
51 | div.showmore { padding-left: 0px; padding-right: 0px; padding-top: 0px; padding-bottom: 0px;}
|
---|
52 |
|
---|
53 | p { padding-top: 6px; padding-bottom: 6px;}
|
---|
54 | a { text-decoration: underline; }
|
---|
55 | li { padding-bottom: 6px; margin-bottom: 6px; }
|
---|
56 | </style>
|
---|
57 |
|
---|
58 | <div>
|
---|
59 | <h2>Query the Linked-Data and let its values Sparkle (aka SPARQL)</h2>
|
---|
60 |
|
---|
61 | <p>
|
---|
62 | Using this page you can query the linked-data in the Greenstone3 <i>eurovision</i> triplestore
|
---|
63 | graph using <a href="https://en.wikipedia.org/wiki/SPARQL">SPARQL</a> query syntax.
|
---|
64 | The default query provided in the text box below is effectively issuing a query that
|
---|
65 | returns everything stored (a bit like matching with the wildcard '*' that some text-based search
|
---|
66 | systems have), limited to show just the first 500 entries that matched.
|
---|
67 | </p>
|
---|
68 |
|
---|
69 | <p>
|
---|
70 | Use the default query to get a feel for the data that is
|
---|
71 | stored. Feel free to experiment with the syntax to vary
|
---|
72 | what is returned. For example, to view other "slices"
|
---|
73 | of the rows of data returned, change the values of
|
---|
74 | OFFSET and LIMIT. OFFSET controls how many result rows
|
---|
75 | are skipped over before rows are selected. LIMIT
|
---|
76 | controls how many rows are then taken.
|
---|
77 |
|
---|
78 | </p>
|
---|
79 |
|
---|
80 | <div id="sparql-show-more" class="showmore">
|
---|
81 | <p>
|
---|
82 | Alternatively, you might be interested in experimenting
|
---|
83 | with forms of access to the triplestore through the more powerful, but complex:
|
---|
84 | <ul>
|
---|
85 | <li>
|
---|
86 | <a target="_blank" href="https://so-we-must-think.space/greenstone3-lod3/dataset.html?tab=query&ds=/greenstone">Fuseki interface</a>
|
---|
87 | </li>
|
---|
88 | </ul>
|
---|
89 | </p>
|
---|
90 | <p>
|
---|
91 | Or else export the entire triplestore to work on it with whichever Linked Data tools are your preference:
|
---|
92 | <ul>
|
---|
93 | <li>
|
---|
94 | <a href="/greenstone3-lod3/greenstone/data" download="greenstone3-eurovision-lod.trig">Full Export in TriG Syntax</a>
|
---|
95 | </li>
|
---|
96 | <li>
|
---|
97 | <a href="/greenstone3-lod3/greenstone/data" download="greenstone3-eurovision-lod.ttl">Full Export in Turtle Syntax</a>
|
---|
98 | </li>
|
---|
99 | </ul>
|
---|
100 | </p>
|
---|
101 |
|
---|
102 | </div>
|
---|
103 | <gsf:script>
|
---|
104 | $('#sparql-show-more').showMore({
|
---|
105 | minheight: 0,
|
---|
106 | buttontxtmore:"show more ...",
|
---|
107 | buttontxtless:"... show less"
|
---|
108 | });
|
---|
109 | </gsf:script>
|
---|
110 |
|
---|
111 | </div>
|
---|
112 | <div>
|
---|
113 | <h2>SPARQL Query</h2>
|
---|
114 | <!--
|
---|
115 | <p>
|
---|
116 | Dataset: /greenstone<br/>
|
---|
117 | Graph: eurovision
|
---|
118 | </p>
|
---|
119 | -->
|
---|
120 |
|
---|
121 | </div>
|
---|
122 |
|
---|
123 | <xsl:variable name="graphURI">https://so-we-must-think.space<xsl:value-of select="$siteURL"/><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/></xsl:variable>
|
---|
124 |
|
---|
125 | <div class="moreindent">
|
---|
126 | <form id="sample-sparql-query-form" action="/greenstone3-lod3/greenstone/query" target="_blank"
|
---|
127 | method="POST" accept-charset="UTF-8">
|
---|
128 |
|
---|
129 | <textarea id="sample-sparql-query" name="query" style="width:100%; min-width:100%; max-width: 100%;" rows="14">
|
---|
130 | <!-- -->
|
---|
131 | <xsl:text>
|
---|
132 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
133 |
|
---|
134 | SELECT ?subject ?predicate ?object WHERE {
|
---|
135 | GRAPH <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>> {
|
---|
136 | ?subject ?predicate ?object.
|
---|
137 | }
|
---|
138 | }
|
---|
139 | OFFSET 0 LIMIT 500
|
---|
140 | </xsl:text>
|
---|
141 | </textarea>
|
---|
142 |
|
---|
143 | <div style="display:none;">
|
---|
144 | <div>
|
---|
145 | Output:
|
---|
146 | <select name="output">
|
---|
147 | <option value="text">Text</option>
|
---|
148 | <option value="json">JSON</option>
|
---|
149 | <option value="xml" selected="selected">XML</option>
|
---|
150 | <option value="csv">CSV</option>
|
---|
151 | <option value="tsv">TSV</option>
|
---|
152 | </select>
|
---|
153 | </div>
|
---|
154 |
|
---|
155 | <div>
|
---|
156 | If XML output, add XSLT style sheet (blank for none):
|
---|
157 | <select name="stylesheet">
|
---|
158 | <option value=""></option>
|
---|
159 | <option value="/greenstone3-lod/xml-to-html.xsl">xml-to-html</option>
|
---|
160 | <option value="/greenstone3-lod/xml-to-html-links.xsl" selected="selected">xml-to-html-links</option>
|
---|
161 | <option value="/greenstone3-lod/xml-to-html-plain.xsl">xml-to-html-plain</option>
|
---|
162 | </select>
|
---|
163 | </div>
|
---|
164 |
|
---|
165 | <div>
|
---|
166 | <input type="checkbox" name="force-accept" value="text/plain" />
|
---|
167 | Force the accept header to <tt>text/plain</tt> regardless.
|
---|
168 | </div>
|
---|
169 | </div>
|
---|
170 |
|
---|
171 | <div>
|
---|
172 | <input type="submit" value="Get Results" />
|
---|
173 | </div>
|
---|
174 |
|
---|
175 | </form>
|
---|
176 | </div>
|
---|
177 |
|
---|
178 | <div>
|
---|
179 | <h2>Sample Queries</h2>
|
---|
180 |
|
---|
181 | <p>
|
---|
182 | The sample queries provided below gradually increase in
|
---|
183 | the query syntax complexity used. They are intended
|
---|
184 | primarily for illustrative purposes, to introduce a user
|
---|
185 | unfamiliar to various aspects of SPARQL query syntax.
|
---|
186 | Click on one of the <i>Load query above</i> buttons to load
|
---|
187 | the relevant query syntax into the SPARQL Query textbox
|
---|
188 | above, then press <i>Get Results</i> to initiate the
|
---|
189 | query.
|
---|
190 | </p>
|
---|
191 |
|
---|
192 | <div id="ssq-restrict-year" style="display: none;">
|
---|
193 | <!-- -->
|
---|
194 | <xsl:text>
|
---|
195 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
196 |
|
---|
197 | SELECT ?subject ?predicate ?object WHERE {
|
---|
198 | GRAPH <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>> {
|
---|
199 | ?subject ?predicate ?object.
|
---|
200 | ?subject gsdlextracted:Year "2000".
|
---|
201 | }
|
---|
202 | }
|
---|
203 | OFFSET 0 LIMIT 200
|
---|
204 | </xsl:text>
|
---|
205 | </div>
|
---|
206 |
|
---|
207 | <div id="ssq-restrict-year-then-filter" style="display: none;">
|
---|
208 | <!-- -->
|
---|
209 | <xsl:text>
|
---|
210 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
211 |
|
---|
212 | SELECT ?subject ?predicate ?object WHERE {
|
---|
213 | GRAPH <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>> {
|
---|
214 | ?subject ?predicate ?object.
|
---|
215 | ?subject gsdlextracted:Year "2000".
|
---|
216 |
|
---|
217 | # The following removes a triple that stores JSON data that
|
---|
218 | # is voluminous but not very interesting to look at
|
---|
219 | FILTER (?predicate != gsdlextracted:JSON).
|
---|
220 | }
|
---|
221 | }
|
---|
222 | OFFSET 0 LIMIT 200
|
---|
223 | </xsl:text>
|
---|
224 | </div>
|
---|
225 |
|
---|
226 |
|
---|
227 | <div id="ssq-restrict-country-and-year" style="display: none;">
|
---|
228 | <!-- -->
|
---|
229 | <xsl:text>
|
---|
230 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
231 | PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
---|
232 |
|
---|
233 | SELECT ?subject ?predicate ?object WHERE {
|
---|
234 | GRAPH <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>> {
|
---|
235 | ?subject ?predicate ?object
|
---|
236 |
|
---|
237 | # The following removes a triple that stores JSON data that
|
---|
238 | # is voluminous but not very interesting to look at
|
---|
239 | FILTER (?predicate != gsdlextracted:JSON).
|
---|
240 |
|
---|
241 | ?subject gsdlextracted:Year ?year.
|
---|
242 | ?subject gsdlextracted:Country ?country.
|
---|
243 | FILTER (?country = "France").
|
---|
244 | FILTER (xsd:integer(?year) >= 1996 && xsd:integer(?year) <= 2000).
|
---|
245 |
|
---|
246 | }
|
---|
247 | }
|
---|
248 | OFFSET 0 LIMIT 200
|
---|
249 | </xsl:text>
|
---|
250 | </div>
|
---|
251 |
|
---|
252 |
|
---|
253 | <div id="ssq-esc-entrants" style="display: none;">
|
---|
254 | <!-- -->
|
---|
255 | <xsl:text>
|
---|
256 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
257 | PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
---|
258 | PREFIX dc: <http://purl.org/dc/elements/1.1/>
|
---|
259 |
|
---|
260 | SELECT ?esc_entrant_uri ?country ?year WHERE {
|
---|
261 | GRAPH <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>> {
|
---|
262 | ?esc_entrant_uri dc:Relation.isPartOf <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>>.
|
---|
263 |
|
---|
264 | ?esc_entrant_uri gsdlextracted:Year ?year.
|
---|
265 | ?esc_entrant_uri gsdlextracted:Country ?country.
|
---|
266 | }
|
---|
267 | }
|
---|
268 | ORDER BY ASC(?year) ?country
|
---|
269 | </xsl:text>
|
---|
270 | </div>
|
---|
271 |
|
---|
272 |
|
---|
273 | <div id="ssq-jury-votes-totals-1975" style="display: none;">
|
---|
274 | <!-- -->
|
---|
275 | <xsl:text>
|
---|
276 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
277 | PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
---|
278 | PREFIX dc: <http://purl.org/dc/elements/1.1/>
|
---|
279 |
|
---|
280 | SELECT ?country ?year ?total WHERE {
|
---|
281 | GRAPH <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>> {
|
---|
282 | ?esc_entrant_uri dc:Relation.isPartOf <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>>.
|
---|
283 |
|
---|
284 | ?esc_entrant_uri gsdlextracted:SingVotesTotal ?total.
|
---|
285 | BIND(xsd:integer(?total) AS ?total_int).
|
---|
286 |
|
---|
287 | ?esc_entrant_uri gsdlextracted:Year ?year
|
---|
288 | FILTER(xsd:integer(?year) = 1975).
|
---|
289 | ?esc_entrant_uri gsdlextracted:Country ?country.
|
---|
290 | }
|
---|
291 | }
|
---|
292 | ORDER BY DESC(?total_int)
|
---|
293 | </xsl:text>
|
---|
294 | </div>
|
---|
295 |
|
---|
296 |
|
---|
297 | <div id="ssq-jury-votes-1975" style="display: none;">
|
---|
298 | <!-- -->
|
---|
299 | <xsl:text>
|
---|
300 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
301 | PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
---|
302 | PREFIX dc: <http://purl.org/dc/elements/1.1/>
|
---|
303 |
|
---|
304 | SELECT ?country ?year ?jury_country ?jury_vote WHERE {
|
---|
305 | GRAPH <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>> {
|
---|
306 | ?esc_entrant_uri dc:Relation.isPartOf <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>>.
|
---|
307 |
|
---|
308 | ?esc_entrant_uri ?gsdlextracted_jury_country_uri ?jury_vote.
|
---|
309 | BIND(STRENDS(str(?gsdlextracted_jury_country_uri),"-J") AS ?is_jury_vote)
|
---|
310 | FILTER (?is_jury_vote).
|
---|
311 | BIND(REPLACE(str(?gsdlextracted_jury_country_uri), ".*#(.*?)-J$", "$1") AS ?jury_country).
|
---|
312 |
|
---|
313 | ?esc_entrant_uri gsdlextracted:Year ?year
|
---|
314 | FILTER(xsd:integer(?year) = 1975).
|
---|
315 | ?esc_entrant_uri gsdlextracted:Country ?country.
|
---|
316 |
|
---|
317 |
|
---|
318 | }
|
---|
319 | }
|
---|
320 | ORDER BY ASC(?year) ?country
|
---|
321 | </xsl:text>
|
---|
322 | </div>
|
---|
323 |
|
---|
324 |
|
---|
325 | <div id="ssq-winning-totals" style="display: none;">
|
---|
326 | <!-- -->
|
---|
327 | <xsl:text>
|
---|
328 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
329 | PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
---|
330 | PREFIX dc: <http://purl.org/dc/elements/1.1/>
|
---|
331 |
|
---|
332 | SELECT ?year ?country ?total_max WHERE {
|
---|
333 | GRAPH <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>> {
|
---|
334 |
|
---|
335 | {
|
---|
336 | SELECT ?year (STR(MAX(?total_int_inner)) as ?total_max) WHERE {
|
---|
337 |
|
---|
338 | ?esc_entrant_uri gsdlextracted:VoteGrandTotal ?total.
|
---|
339 | BIND(xsd:integer(?total) AS ?total_int_inner).
|
---|
340 |
|
---|
341 | ?esc_entrant_uri gsdlextracted:Year ?year.
|
---|
342 | }
|
---|
343 | GROUP BY ?year
|
---|
344 | }
|
---|
345 |
|
---|
346 | ?esc_entrant_uri gsdlextracted:VoteGrandTotal ?total_max.
|
---|
347 | ?esc_entrant_uri gsdlextracted:Year ?year.
|
---|
348 | ?esc_entrant_uri gsdlextracted:Country ?country.
|
---|
349 |
|
---|
350 | BIND(xsd:integer(?total_max) as ?total_int).
|
---|
351 | }
|
---|
352 | }
|
---|
353 | ORDER BY DESC(?total_int)
|
---|
354 | </xsl:text>
|
---|
355 | </div>
|
---|
356 |
|
---|
357 |
|
---|
358 | <div id="ssq-winning-freq-count" style="display: none;">
|
---|
359 | <!-- -->
|
---|
360 | <xsl:text>
|
---|
361 |
|
---|
362 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
363 | PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
---|
364 | PREFIX dc: <http://purl.org/dc/elements/1.1/>
|
---|
365 |
|
---|
366 |
|
---|
367 | SELECT ?country (STR(COUNT(?country)) as ?number_of_vote_wins) WHERE {
|
---|
368 | GRAPH <</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>> {
|
---|
369 | {
|
---|
370 | SELECT ?year (STR(MAX(?total_int)) as ?total_max) WHERE {
|
---|
371 | ?esc_entrant_uri gsdlextracted:VoteGrandTotal ?total.
|
---|
372 | BIND(xsd:integer(?total) AS ?total_int).
|
---|
373 |
|
---|
374 | ?esc_entrant_uri gsdlextracted:Year ?year.
|
---|
375 | }
|
---|
376 | GROUP BY ?year
|
---|
377 | }
|
---|
378 |
|
---|
379 | ?esc_entrant_uri gsdlextracted:VoteGrandTotal ?total_max.
|
---|
380 | ?esc_entrant_uri gsdlextracted:Year ?year.
|
---|
381 | ?esc_entrant_uri gsdlextracted:Country ?country.
|
---|
382 | }
|
---|
383 | }
|
---|
384 | GROUP BY ?country
|
---|
385 | ORDER BY DESC(?number_of_vote_wins)
|
---|
386 | </xsl:text>
|
---|
387 | </div>
|
---|
388 |
|
---|
389 |
|
---|
390 |
|
---|
391 |
|
---|
392 | <div id="ssq-country-info" style="display: none;">
|
---|
393 | <!--
|
---|
394 | Adapted from:
|
---|
395 | https://stackoverflow.com/questions/40069644/retrieve-information-about-all-european-countries
|
---|
396 | -->
|
---|
397 | <xsl:text>
|
---|
398 |
|
---|
399 | PREFIX gsdlextracted: <http://greenstone.org/gsdlextracted#>
|
---|
400 |
|
---|
401 | PREFIX dbo: <http://dbpedia.org/ontology/>
|
---|
402 | PREFIX dbp: <http://dbpedia.org/property/>
|
---|
403 | PREFIX dct: <http://purl.org/dc/terms/>
|
---|
404 | #PREFIX geo: <http://www.opengis.net/ont/geosparql#>
|
---|
405 |
|
---|
406 | PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
|
---|
407 |
|
---|
408 | SELECT DISTINCT ?country_uri ?capital ?area ?populationTotal ?lat ?long
|
---|
409 | ?currency ?gdpPppPerCapita ?giniCoefficient WHERE {
|
---|
410 |
|
---|
411 | SERVICE <https://dbpedia.org/sparql> {
|
---|
412 |
|
---|
413 | ?db_country_uri dbo:capital ?db_capital.
|
---|
414 |
|
---|
415 | BIND(?db_country_uri AS ?country_uri).
|
---|
416 | BIND(str(?db_country_uri) AS ?country_uri_str).
|
---|
417 | BIND(?db_capital AS ?capital).
|
---|
418 |
|
---|
419 | # OPTIONAL {
|
---|
420 | # ?country_uri dbp:areaKm ?area.
|
---|
421 | # ?country_uri dbo:populationTotal ?populationTotal.
|
---|
422 | # ?country_uri geo:lat ?lat.
|
---|
423 | # ?country_uri geo:long ?long.
|
---|
424 | # }
|
---|
425 |
|
---|
426 | OPTIONAL { ?country_uri dbp:areaKm ?area. }
|
---|
427 | OPTIONAL { ?country_uri dbo:populationTotal ?populationTotal. }
|
---|
428 | OPTIONAL { ?capital geo:lat ?lat. }
|
---|
429 | OPTIONAL { ?capital geo:long ?long. }
|
---|
430 |
|
---|
431 | OPTIONAL { ?country_uri dbp:currencyCode ?currency. }
|
---|
432 | OPTIONAL { ?country_uri dbp:gdpPppPerCapita ?gdpPppPerCapita. }
|
---|
433 |
|
---|
434 | OPTIONAL { ?country_uri dbo:giniCoefficient ?giniCoefficient. }
|
---|
435 | }
|
---|
436 |
|
---|
437 | ?esc_entrant_uri gsdlextracted:CountryDBURI ?country_uri_str.
|
---|
438 |
|
---|
439 | }
|
---|
440 | ORDER BY ASC(?country_uri)
|
---|
441 | </xsl:text>
|
---|
442 | </div>
|
---|
443 |
|
---|
444 |
|
---|
445 |
|
---|
446 | <ul class="ssq">
|
---|
447 | <li>
|
---|
448 | <b>Year Restricted (raw data rows):</b><br />
|
---|
449 | <button type="button" class="load-ssq" id="load-ssq-restrict-year" onclick="ssq_load('ssq-restrict-year')">Load query above</button>
|
---|
450 | <button type="button" class="exec-ssq" id="exec-ssq-restrict-year" onclick="ssq_execute()">Get Results</button><br />
|
---|
451 | <p>Similar to the default query (all results returned) but restricted to entries associated with the year 2000.</p>
|
---|
452 | </li>
|
---|
453 |
|
---|
454 | <div id="raw-sparql-show-more" class="showmore">
|
---|
455 | <style>
|
---|
456 | #showmore-button-raw-sparql-show-more { width: 260px; }
|
---|
457 | </style>
|
---|
458 |
|
---|
459 | <li>
|
---|
460 | <b>Year Restricted (raw data rows) then filter out <i>gsdlextracted:JSON</i> entries:</b><br/>
|
---|
461 | <button type="button" class="load-ssq" id="load-ssq-restrict-year-then-filter" onclick="ssq_load('ssq-restrict-year-then-filter')">Load query above</button>
|
---|
462 | <button type="button" class="exec-ssq" id="exec-ssq-restrict-year-then-filter" onclick="ssq_execute()">Get Results</button><br/>
|
---|
463 | <p>
|
---|
464 | Similar to the previous query (restricted to results from 2000) but filtering out the voluminous, but not very interesting to look at,
|
---|
465 | <i>gsdlextracted:JSON</i>.
|
---|
466 | </p>
|
---|
467 | <p>
|
---|
468 | This field is formed by Greenstone at ingest-time: it represents all the metadata fields for a particular country
|
---|
469 | stored in the JSON format. It is a handy item for the Greenstone3 runtime-system to access, but in the context of viewing the output
|
---|
470 | of SPARQL queries at HTML only serves to pollute the generated result set with large text items.
|
---|
471 | </p>
|
---|
472 | </li>
|
---|
473 |
|
---|
474 | <li>
|
---|
475 | <b>Country and Year Restricted (raw data rows):</b><br/>
|
---|
476 | <button type="button" class="load-ssq" id="load-ssq-restrict-country-and-year" onclick="ssq_load('ssq-restrict-country-and-year')">Load query above</button>
|
---|
477 | <button type="button" class="exec-ssq" id="exec-ssq-restrict-country-and-year" onclick="ssq_execute()">Get Results</button><br/>
|
---|
478 |
|
---|
479 | <p>Similar to the previous query, but restricted to entries about the country France, in the years 1996-2000.</p>
|
---|
480 | </li>
|
---|
481 | </div>
|
---|
482 | <gsf:script>
|
---|
483 | $('#raw-sparql-show-more').showMore({
|
---|
484 | minheight: 0,
|
---|
485 | buttontxtmore:"show further raw-data queries ...",
|
---|
486 | buttontxtless:"... show less"
|
---|
487 | });
|
---|
488 | </gsf:script>
|
---|
489 |
|
---|
490 | <li>
|
---|
491 | <b>Eurovision Song Contest (ESC) entrants:</b><br/>
|
---|
492 | <button type="button" class="load-ssq" id="load-ssq-esc-entrants" onclick="ssq_load('ssq-esc-entrants')">Load query above</button>
|
---|
493 | <button type="button" class="exec-ssq" id="exec-ssq-esc-entrants" onclick="ssq_execute()">Get Results</button><br/>
|
---|
494 |
|
---|
495 | <p>List all the entrants (country and year) sorted by year, then by country.</p>
|
---|
496 | </li>
|
---|
497 |
|
---|
498 | <li>
|
---|
499 | <b>Voting Totals in 1975:</b><br/>
|
---|
500 | <button type="button" class="load-ssq" id="load-ssq-jury-votes-totals-1975" onclick="ssq_load('ssq-jury-votes-totals-1975')">Load query above</button>
|
---|
501 | <button type="button" class="exec-ssq" id="exec-ssq-jury-votes-totals-1975" onclick="ssq_execute()">Get Results</button><br/>
|
---|
502 |
|
---|
503 | <p>In 1975 all voting was done exclusively by jury. This query retrieves the
|
---|
504 | totals of this Single voting format, and orders them by that score.</p>
|
---|
505 | </li>
|
---|
506 |
|
---|
507 | <li>
|
---|
508 | <b>Jury Votes Cast by Country in 1975:</b><br/>
|
---|
509 | <button type="button" class="load-ssq" id="load-ssq-jury-votes-1975" onclick="ssq_load('ssq-jury-votes-1975')">Load query above</button>
|
---|
510 | <button type="button" class="exec-ssq" id="exec-ssq-jury-votes-1975" onclick="ssq_execute()">Get Results</button><br/>
|
---|
511 |
|
---|
512 | <p>List all votes case in the 1975 competition.</p>
|
---|
513 | </li>
|
---|
514 |
|
---|
515 |
|
---|
516 | <li>
|
---|
517 | <b>Most points won:</b><br/>
|
---|
518 | <button type="button" class="load-ssq" id="load-ssq-winning-totals" onclick="ssq_load('ssq-winning-totals')">Load query above</button>
|
---|
519 | <button type="button" class="exec-ssq" id="exec-ssq-winning-totals" onclick="ssq_execute()">Get Results</button><br/>
|
---|
520 |
|
---|
521 | <p>List the countries which won and their voting totals, sorted by total score.</p>
|
---|
522 | </li>
|
---|
523 |
|
---|
524 | <li>
|
---|
525 | <b>Number of Times Countries Have Won:</b><br/>
|
---|
526 | <button type="button" class="load-ssq" id="load-ssq-winning-freq-count" onclick="ssq_load('ssq-winning-freq-count')">Load query above</button>
|
---|
527 | <button type="button" class="exec-ssq" id="exec-ssq-winning-freq-count" onclick="ssq_execute()">Get Results</button><br/>
|
---|
528 |
|
---|
529 | <p>
|
---|
530 | The number of times a country has won Eurovision across the years. The includes
|
---|
531 | the years when only Juries voted (1956-2000) through to the introduction
|
---|
532 | of Televotes, where a variety of forms have been used such as only
|
---|
533 | Televotes, a pre-combined score based on Televotes and Jury votes, to
|
---|
534 | (from 2016 onwards) where the Jury and Tele votes are explicitly
|
---|
535 | given individually per country, then combined.
|
---|
536 | </p>
|
---|
537 | </li>
|
---|
538 |
|
---|
539 |
|
---|
540 | <li>
|
---|
541 | <b>Facts and Figures About Competing Countries:</b><br/>
|
---|
542 | <button type="button" class="load-ssq" id="load-ssq-country-info" onclick="ssq_load('ssq-country-info')">Load query above</button>
|
---|
543 | <button type="button" class="exec-ssq" id="exec-ssq-country-info" onclick="ssq_execute()">Get Results</button><br/>
|
---|
544 |
|
---|
545 | <p>
|
---|
546 | Demographics about other related information about the countries the song contest entries are from.
|
---|
547 | Query takes a bit longer to run than the previous ones.
|
---|
548 | </p>
|
---|
549 | </li>
|
---|
550 |
|
---|
551 | </ul>
|
---|
552 |
|
---|
553 | <p>
|
---|
554 | Looking for something a bit more visual? Why not head over to our
|
---|
555 | <a href="{$library_name}/collection/{$collName}/page/sgvizler"><i>SGVizler page</i></a> and try the SPARQL-based visualization samples there.
|
---|
556 | </p>
|
---|
557 |
|
---|
558 | </div>
|
---|
559 | </xsl:template>
|
---|
560 |
|
---|
561 |
|
---|
562 | </xsl:stylesheet>
|
---|
563 |
|
---|