Changeset 35043
- Timestamp:
- 2021-04-07T00:31:43+12:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/about.xsl
r35037 r35043 67 67 In its latest incarnation, after 68 68 all the performances are over, artists wait 69 nervously as via the Internetthe show's hosts visit each69 nervously as via live television link-ups the show's hosts visit each 70 70 of the 40+ countries in turn collecting all points cast 71 71 by the country appointed juries. This includes … … 74 74 10 points awarded to the song a country ranks second, 75 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. 76 78 Next comes the "the popular vote" 77 79 where fans, still grouped by country, have … … 80 82 place, and so on. 81 83 This all culminates in a new winner being crowned, with 82 the competition usually being hosted the following year83 bythat country.84 the competition typically being hosted the following year 85 in that country. 84 86 </p> 85 87 </div> … … 113 115 </p> 114 116 117 <!-- 115 118 <p> 116 119 For those who want to jump right in and access information about, as well as see and hear some of the past performances, … … 118 121 start by exploring the assembled information through 119 122 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 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 122 128 interest, such as 123 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> 124 130 and 125 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>, 126 or perhapssomething more frivolous such as132 or maybe something more frivolous such as 127 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>. 128 134 129 135 </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 136 --> 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"> 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> 139 170 $(document).ready( 140 171 function() { 141 172 142 //sgvizler.prefix('dc','http://purl.org/dc/elements/1.1/');143 //sgvizler.prefix('gsdlextracted','http://greenstone.org/gsdlextracted#');144 145 146 173 // Exaple triple 147 174 // "s": { "type": "uri" , "value": "http://127.0.0.1:8383/greenstone3/library/collection/eurovision/document/HASH0191e9cc7bfdf14743472257s10" } , … … 149 176 // "o": { "type": "literal" , "value": "United Kingdom" } 150 177 151 //sgvizler.containerDraw('sgvizler1-country-count'); 152 153 sgvizler2.containerDraw('sgvizler2-country-count'); 154 178 sgvizler2.containerDraw('sgvizler2-country-count'); 155 179 } 156 ); 157 </xsl:text> 158 </script> 159 180 ); 181 </gsf:script> 182 160 183 <div id="sgvizler2-country-count" 161 184 data-sgvizler-endpoint="//sowemustthink.space/greenstone3-lod3/greenstone/query" … … 180 203 181 204 <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;"> 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 202 238 <p> 203 We suggest starting with viewing sample visualizations to see what's possible, 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, 204 260 and making minor edits to that to adjust what is visualized. 205 261 Then, if you want to start visualizing the data in a more substantially different way 206 262 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> 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 216 267 <!-- 217 268 This is a good place to go to see what sort of data is being stored, and we provide some sample … … 221 272 <li><a href="{$library_name}/collection/{$collName}/page/sgvizler">SGVizler page</a></li> 222 273 --> 223 </ ul>274 </p> 224 275 225 276 </div> … … 262 313 <h2 id="it-all-started-with">It All Started with a Little <strike>Sparkle</strike>SPARQL</h2> 263 314 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;"> 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;"> 278 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 279 377 WHERE { … … 299 397 } 300 398 ORDER BY DESC(?countries_in_esc_by_year) 301 </pre> 302 303 </p> 304 399 </pre> 400 401 <p> 402 You can try this query out yourself if you like. Select the entirety of the SPARQL query 403 in the above text box, and press <i>Control-C</i> to place it in your Copy-buffer. 404 Next visit the DBPedia SPARQL Endpoint given below, and in the main text box of the page 405 that appears, press <i>Control-V</i> 406 to past in your SPARQL query. Finally, click on the <i>Execute Query</i> button 407 to initiate the search. 408 <ul> 409 <li> 410 <a href="https://dbpedia.org/sparql/" target="_blank">DBpedia's SPARQL endpoint</a> 411 </li> 412 </ul> 413 </p> 414 <p> 415 Through the SPARQL Endpoint you can change the output format that is used to, for example, JSON or Turtle. 416 For convenience, if you are just interested in seeing what the outcome of running the query is, displayed as a web page: 417 <ul> 418 <li> 419 <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> 420 </li> 421 </ul> 422 </p> 423 424 <h3>Triplestore Errata</h3> 425 426 <h3>Adding in Voting Metadata</h3> 427 428 <h3>Page Scraping</h3> 429 430 431 <h3>The Gory Details</h3> 432 <!-- 305 433 <p> 306 434 The resulting SPARQL query result set (JSON format … … 320 448 </ul> 321 449 </p> 322 323 <p> 324 Bullet points above to be expanded upon! 325 </p> 326 450 --> 327 451 <p> 328 452 Viewing the … … 347 471 348 472 </p> 473 474 475 </div> 476 <gsf:script> 477 $('#dl-tech-show-more').showMore({ 478 minheight: 0, 479 buttontxtmore:"show more ...", 480 buttontxtless:"... show less" 481 }); 482 </gsf:script> 483 484 485 <div id="technicaldev-turnstyle" style="margin-top: 12px;"> 486 <div class="turnstyle-header" style="background-image: none; background-color: hsl(195, 47%, 35%);"> 487 DL Technical Development 488 </div> 489 490 <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;"> 491 <p> 492 In terms of how this collection was developed using the 493 Greenstone DL architecture, the starting point is the 494 formulation of a SPARQL query to retrieve from DBpedia 495 entries about all the entrants in the contest over the 496 years: 497 498 </p> 499 500 501 <p> 502 Bullet points above to be expanded upon! 503 </p> 504 349 505 </div> 350 506 </div>
Note:
See TracChangeset
for help on using the changeset viewer.