CINXE.COM
Sparna Blog » 03-Technologie
<?xml version="1.0" encoding="UTF-8"?><rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/" > <channel rdf:about="https://blog.sparna.fr"> <title>Sparna Blog » 03-Technologie</title> <link>https://blog.sparna.fr</link> <description>Web de données | Architecture de l'information | Accès aux connaissances</description> <dc:date>2024-10-15T16:22:00Z</dc:date> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase> <items> <rdf:Seq> <rdf:li rdf:resource="https://blog.sparna.fr/2024/10/15/sparnatural-say-it-with-shacl/"/> <rdf:li rdf:resource="https://blog.sparna.fr/2024/01/15/cordis-a-sparql-endpoint-is-born/"/> <rdf:li rdf:resource="https://blog.sparna.fr/2023/03/13/2013-2023-tis-skosplays-birthday/"/> <rdf:li rdf:resource="https://blog.sparna.fr/2022/10/18/dashboards-from-sparql-knowledge-graphs-using-looker-studio-google-data-studio/"/> <rdf:li rdf:resource="https://blog.sparna.fr/2022/07/20/clean-json-ld-from-rdf-using-framing/"/> <rdf:li rdf:resource="https://blog.sparna.fr/2022/04/19/supports-de-formation-sparql-cc-by-sa/"/> <rdf:li rdf:resource="https://blog.sparna.fr/2021/06/30/fair-data-collective-is-doing-cool-things-with-skos-play-and-xls2rdf/"/> <rdf:li rdf:resource="https://blog.sparna.fr/2021/03/24/alimenter-talend-avec-sparql-sur-wikidata/"/> <rdf:li rdf:resource="https://blog.sparna.fr/2020/03/11/shacl-play-online-shacl-rdf-validator/"/> <rdf:li rdf:resource="https://blog.sparna.fr/2020/02/20/semantic-markdown/"/> </rdf:Seq> </items> </channel> <item rdf:about="https://blog.sparna.fr/2024/10/15/sparnatural-say-it-with-shacl/"> <title>Sparnatural : say it with SHACL !</title> <link>https://blog.sparna.fr/2024/10/15/sparnatural-say-it-with-shacl/</link> <dc:date>2024-10-15T16:02:59Z</dc:date> <dc:creator><![CDATA[Marie Muller]]></dc:creator> <dc:subject><![CDATA[SHACL]]></dc:subject> <dc:subject><![CDATA[Sparnatural]]></dc:subject> <dc:subject><![CDATA[DBpedia]]></dc:subject> <dc:subject><![CDATA[endpoint]]></dc:subject> <dc:subject><![CDATA[SPARQL]]></dc:subject> <description><![CDATA[<p>Do you Sparnatural ? If you follow us here, you may be familiar with our most well-known Sparnatural visual query builder. If not, have a look at the website and give us your impressions on it ! To make it short, Sparnatural is a client-side component that allows non-expert users to explore an RDF Knowledge Graph…</p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2024/10/15/sparnatural-say-it-with-shacl/">Sparnatural : say it with SHACL !</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></description> <content:encoded><![CDATA[<p><span style="font-weight: 400;">Do you Sparnatural ? If you follow us here, you may be familiar with our most well-known Sparnatural visual query builder. If not, have a look <a href="https://sparnatural.eu/">at the website</a></span><span style="font-weight: 400;"> and give us your impressions on it !</span></p> <p><span style="font-weight: 400;">To make it short, Sparnatural is a client-side component that allows non-expert users to explore an RDF Knowledge Graph by building SPARQL queries with little effort.</span><span style="font-weight: 400;"> </span></p> <p><span style="font-weight: 400;">Fully configurable – and </span><span style="font-weight: 400;">customizable</span><span style="font-weight: 400;"> – it </span><span style="font-weight: 400;">can be plugged to any existing SPARQL endpoint, without additional server required</span><span style="font-weight: 400;"> to adapt to your knowledge graph ontology.</span><span style="font-weight: 400;"> </span></p> <p><span style="font-weight: 400;">Innovative and intuitive, it aims at bringing your knowledge graph to your end-users in a visual way that « gamifies » the knowledge graph experience.</span><span style="font-weight: 400;"> </span></p> <p><span style="font-weight: 400;">Nb : Sparnatural is open source, under a LGPL-3.0 license.</span></p> <p><a href="https://blog.sparna.fr/wp-content/uploads/2024/10/sparnaturaleu.png"><img class="aligncenter size-large wp-image-1808" src="https://blog.sparna.fr/wp-content/uploads/2024/10/sparnaturaleu-1024x521.png" alt="sparnaturaleu" width="650" height="331" /></a></p> <p><span style="font-weight: 400;">So far, the configuration was made through an OWL ontology…</span></p> <p> </p> <p><strong><em>Sparnatural in SHACL !</em></strong><span style="font-weight: 400;"> </span></p> <p><span style="font-weight: 400;">… until now,</span></p> <p><em><span style="font-weight: 400;">But </span><span style="font-weight: 400;">the times they are a-changin’</span><span style="font-weight: 400;"> …</span></em></p> <p><span style="font-weight: 400;">You can now configure Sparnatural starting <a href="https://docs.sparnatural.eu/#31-shacl-configuration">from a SHACL configuration spreadsheet</a> !</span></p> <p><span style="font-weight: 400;"> </span><span style="font-weight: 400;"> </span></p> <p><em><strong>SHACL in a nutshell</strong></em><span style="font-weight: 400;"> </span></p> <p><span style="font-weight: 400;">Defined by a </span><a href="http://www.w3.org/2014/data-shapes/wiki/Main_Page"><span style="font-weight: 400;">W3C Working Group</span></a><span style="font-weight: 400;">, <a href="https://www.w3.org/TR/shacl/">SHACL, as for « Shapes Constraint Language »</a>,</span><span style="font-weight: 400;"> is </span><span style="font-weight: 400;">« </span><em><span style="font-weight: 400;">a language for validating RDF graphs against a set of conditions. These conditions are provided as shapes and other constructs expressed in the form of an RDF graph.</span></em><span style="font-weight: 400;"> »</span><span style="font-weight: 400;"> </span></p> <p><span style="font-weight: 400;">First published in 2017, it has become a widely used standard to :</span></p> <ul> <li style="font-weight: 400;"><span style="font-weight: 400;">describe structural constraints on data graphs ;</span></li> <li style="font-weight: 400;"><span style="font-weight: 400;">validate that data graphs satisfy a set of conditions ;</span></li> <li style="font-weight: 400;"><span style="font-weight: 400;">but also build </span><span style="font-weight: 400;">user interface, generate code and integrate data</span><span style="font-weight: 400;"> !</span></li> </ul> <p><span style="font-weight: 400;">The latter we will leverage for our brand new Sparnatural SHACL configuration.</span></p> <p> </p> <p><em><strong>Yes, in a spreadsheet !</strong></em></p> <p><span style="font-weight: 400;">SHACL may be quite unfamiliar for our users.</span></p> <p><span style="font-weight: 400;">A good thing is you don’t need to be a SHACL expert to build your SHACL-shaped Sparnatural configuration.</span></p> <p><span style="font-weight: 400;">Indeed ! the entire configuration is done <a href="https://github.com/sparna-git/sparnatural.eu/raw/refs/heads/main/demos/demo-dbpedia-en/sparnatural-config.xlsx">via a spreadsheet</a> whose columns correspond to the SHACL model.</span></p> <p><a href="https://blog.sparna.fr/wp-content/uploads/2024/10/configxlsx.png"><img class="aligncenter size-large wp-image-1807" src="https://blog.sparna.fr/wp-content/uploads/2024/10/configxlsx-1024x415.png" alt="configxlsx" width="650" height="263" /></a></p> <p><span style="font-weight: 400;">Still, you can observe that all the Sparnatural features are here :</span></p> <ul> <li style="font-weight: 400;"><span style="font-weight: 400;">the nodes & the edges of the knowledge graph, of course ;</span></li> <li style="font-weight: 400;"><span style="font-weight: 400;">its labels and literal attributes (different kind of notes) ;</span></li> <li style="font-weight: 400;"><span style="font-weight: 400;">but also the Sparnatural search widgets, icons, etc.</span></li> </ul> <p> </p> <p><em><strong>Give it a try !</strong></em><span style="font-weight: 400;"> </span></p> <p><span style="font-weight: 400;">Go to</span> <span style="font-weight: 400;">the <a href="https://sparnatural.eu/demos/demo-dbpedia-en/index.html?lang=en">DBpedia Museums demo</a></span><span style="font-weight: 400;"> :</span></p> <p><a href="https://blog.sparna.fr/wp-content/uploads/2024/10/start.png"><img class="aligncenter size-large wp-image-1806" src="https://blog.sparna.fr/wp-content/uploads/2024/10/start-1024x556.png" alt="start" width="650" height="353" /></a></p> <p> </p> <p><em><strong>Navigate the graph</strong></em><span style="font-weight: 400;"> </span></p> <p><span style="font-weight: 400;">Start with picking up a class from the list and navigate through the properties to another class of the graph, search for a value…</span></p> <p><a href="https://blog.sparna.fr/wp-content/uploads/2024/10/navigate.png"><img class="aligncenter size-large wp-image-1805" src="https://blog.sparna.fr/wp-content/uploads/2024/10/navigate-1024x768.png" alt="navigate" width="650" height="488" /></a></p> <p><span style="font-weight: 400;">… then click on the arrow to launch the query </span>▶️</p> <p><a href="https://blog.sparna.fr/wp-content/uploads/2024/10/launch-query.png"><img class="aligncenter size-large wp-image-1804" src="https://blog.sparna.fr/wp-content/uploads/2024/10/launch-query-1024x733.png" alt="launch query" width="650" height="465" /></a></p> <p> </p> <p><span style="font-weight: 400;">Click on « </span><i><span style="font-weight: 400;">Toggle SPARQL editor</span></i><span style="font-weight: 400;"> »</span><span style="font-weight: 400;"> below the query builder to display the </span><span style="font-weight: 400;">corresponding SPARQL query :</span></p> <p><img class="aligncenter size-large wp-image-1803" src="https://blog.sparna.fr/wp-content/uploads/2024/10/SPARQL-1024x1000.png" alt="SPARQL" width="650" height="635" /></p> <p> </p> <p><span style="font-weight: 400;">… no need to say that you can create even more elaborate queries, just by adding new parameters when navigating through the knowledge graph !</span></p> <p> </p> <p><em><strong>Sample queries </strong></em></p> <p><span style="font-weight: 400;">To give you a quick overview of it, you can also try to launch one of the sample queries we added to the demo.</span></p> <p><span style="font-weight: 400;">On the screenshot below we can observe this one is a quite more complex query, using an optional parameter as we noticed that some values happen to be missing on DBpedia, either for Movements or Artworks…</span></p> <p>Can we deduce that 19th-Century French women artists records are rather incomplete in English DBpedia ? <img src="https://s.w.org/images/core/emoji/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p> <p><a href="https://sparnatural.eu/demos/demo-dbpedia-en/index.html?query=XQAAAAJ9BgAAAAAAAABtAYrNc5EUmvX8DWAhQM_bO-RQtw8eLv5AfYUbHEHKg8akAeq81XRpWDKqgPFC6wFYkF9uefA_M1YPtUEFzqfNkOzRoORdqJdSqPunlpPDRtYOdThL-Rrlj29P6MGeLGpCE6d9GUG95msHusjvbvBBcy3M5V6BQh29xB3VKbXXDqKH_thv6xoP64-p5Xtke6piQ_O25w_Puab4_OglI3gIdGC_6WUL91vh_5fgu9FXp38b7j2alfs8tQia6zFJOy8m9sdWC_wpMlXxpZL8PhuceKyNSwN7RmNsX1ogUfiUVlV1GG3CjySXEKxJU_xzrDmAX4Y4nRw2M2kw0SlMQ-cud_iCp-OPwaMy2r95of-gKzQJOXI6sKIa56rWrweIiOIsL6elNaQhGDgVKEFd3fgQxTqz-WRRMaqzLmWbeq0YW7gFLczxOy1lkXLO-8KEpGVCG_5ZINJ2warZKFmrGfBbG6Du2jpBvD9pBnUfs36GmmMKlDxSplRdInD6fL1coq5Gvs2U6qQwMKfGv5YXCIH-nHBHut2GvZsi9-X9__LER9o">We’ll let you investigate on this point</a>.</p> <p><a href="https://blog.sparna.fr/wp-content/uploads/2024/10/sample.png"><img class="aligncenter size-large wp-image-1836" src="https://blog.sparna.fr/wp-content/uploads/2024/10/sample-1024x942.png" alt="sample" width="650" height="598" /></a></p> <p> </p> <p><em><strong>Multilingual</strong></em><span style="font-weight: 400;"> </span></p> <p><span style="font-weight: 400;">It is also possible to translate (and display) your configuration in any language of your choice, so that you can showcase your knowledge graph in different languages – even if the graph itself does not contain labels or values with this language…</span><span style="font-weight: 400;"> </span></p> <p><span style="font-weight: 400;">Here translated in French :</span></p> <p><a href="https://blog.sparna.fr/wp-content/uploads/2024/10/multilingual1.png"><img class="aligncenter size-large wp-image-1824" src="https://blog.sparna.fr/wp-content/uploads/2024/10/multilingual1-1024x630.png" alt="multilingual" width="650" height="400" /></a></p> <p> </p> <p><em><strong>Fully documented</strong></em><span style="font-weight: 400;"> </span></p> <p><span style="font-weight: 400;">This new version of Sparnatural comes with </span><a href="https://docs.sparnatural.eu/"><span style="font-weight: 400;">an extensive documentation of all the features that can be used to date</span></a><span style="font-weight: 400;">, from basic installation to more advanced configuration of the tool.</span></p> <p><a href="https://docs.sparnatural.eu/hello-sparnatural/Hello-Sparnatural.html"><b><i>Get started with Hello Sparnatural !</i></b></a></p> <p> </p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2024/10/15/sparnatural-say-it-with-shacl/">Sparnatural : say it with SHACL !</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></content:encoded> </item> <item rdf:about="https://blog.sparna.fr/2024/01/15/cordis-a-sparql-endpoint-is-born/"> <title>CORDIS : a SPARQL endpoint is born !</title> <link>https://blog.sparna.fr/2024/01/15/cordis-a-sparql-endpoint-is-born/</link> <dc:date>2024-01-15T08:55:41Z</dc:date> <dc:creator><![CDATA[Marie Muller]]></dc:creator> <dc:subject><![CDATA[Linked Data]]></dc:subject> <dc:subject><![CDATA[Ontologies]]></dc:subject> <dc:subject><![CDATA[Open Data]]></dc:subject> <dc:subject><![CDATA[SPARQL]]></dc:subject> <dc:subject><![CDATA[Thesaurus]]></dc:subject> <dc:subject><![CDATA[Triplestores]]></dc:subject> <dc:subject><![CDATA[Visualisation de données]]></dc:subject> <dc:subject><![CDATA[endpoint]]></dc:subject> <dc:subject><![CDATA[Europe]]></dc:subject> <dc:subject><![CDATA[Linked Open Data]]></dc:subject> <dc:subject><![CDATA[ontologie]]></dc:subject> <dc:subject><![CDATA[ontologies]]></dc:subject> <dc:subject><![CDATA[thesaurus]]></dc:subject> <description><![CDATA[<p>Another star to light on EU’s linked open data maturity flag ! 🌟 Not talking about 2024 exceptional Northern Lights to come, but this one’s also good news for science ! ➡️ Late 2023, the Publications Office of the European Union announced on social media the public release of the new CORDIS SPARQL endpoint. CORDIS, aka « the Community…</p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2024/01/15/cordis-a-sparql-endpoint-is-born/">CORDIS : a SPARQL endpoint is born !</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></description> <content:encoded><![CDATA[<p><span style="font-weight: 400;">Another star to light on EU’s linked open data maturity flag ! <img src="https://s.w.org/images/core/emoji/72x72/1f31f.png" alt="🌟" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span></p> <p><span style="font-weight: 400;">Not talking about 2024 exceptional <a href="https://www.nationalgeographic.com/science/article/auroras-solar-maximum-2024">Northern Lights to come,</a> </span><span style="font-weight: 400;">but this one’s also good news for science !</span></p> <p><span style="font-weight: 400;">➡️ Late 2023, </span><span style="font-weight: 400;">the Publications Office of the European Union</span><span style="font-weight: 400;"> <a href="https://twitter.com/CORDIS_EU/status/1726865540143276079">announced on social media</a> </span><span style="font-weight: 400;">the public release of </span><strong><a href="https://cordis.europa.eu/datalab/sparql-endpoint">the new CORDIS SPARQL endpoint</a></strong><span style="font-weight: 400;">.</span></p> <p><span style="font-weight: 400;">CORDIS, aka « </span><span style="font-weight: 400;">t</span><span style="font-weight: 400;">he Community Research and Development Information Service </span><span style="font-weight: 400;">of</span><span style="font-weight: 400;"> the European Commission</span><span style="font-weight: 400;"> », is « </span><em><a href="https://cordis.europa.eu/about"><span style="font-weight: 400;">the […] primary source of results from the projects funded by the EU’s framework programmes for research and innovation, from FP1 to Horizon Europe</span></a></em><span style="font-weight: 400;"> ». Described as a « <em>rich and structured public repository with all project information held by the European Commission such as project factsheets, participants, reports, deliverables and links to open-access publications</em> », the CORDIS catalog has also been made available in 6 European languages by Publications Office’s editorial team.</span></p> <p><span style="font-weight: 400;">Cherry on top <img src="https://s.w.org/images/core/emoji/72x72/1f352.png" alt="🍒" class="wp-smiley" style="height: 1em; max-height: 1em;" /> of a whole process, the CORDIS SPARQL endpoint release comes to crown a long-term linked open data project. The aim identifying, acquiring, preserving and providing access to knowledge in a common will to share with the widest public possible a trust-worthy, qualified and structured information (see </span><a href="https://op.europa.eu/webpub/op/annual-management-report-2021/en/"><span style="font-weight: 400;">Publications Office 2021 Annual Management Report</span></a><span style="font-weight: 400;">).</span></p> <p><span style="font-weight: 400;">In the context of the pandemic (and recent opening of <a href="https://data.europa.eu/en">data.europa.eu</a>, the official portal for European data, as defined in 2017–2025 European Open Data Space strategy), </span><a href="https://data.europa.eu/data/datasets/euroscivoc-the-european-science-vocabulary?locale=en"><span style="font-weight: 400;">the EuroSciVoc taxonomy of fields of science</span></a><span style="font-weight: 400;"> was released April 2020, followed December 2021 by the publishing of </span><a href="https://data.europa.eu/data/datasets/european-research-information-ontology?locale=en"><span style="font-weight: 400;">European research information ontology (EURIO)</span></a><span style="font-weight: 400;"> on the EU Vocabularies website <img src="https://s.w.org/images/core/emoji/72x72/1f310.png" alt="🌐" class="wp-smiley" style="height: 1em; max-height: 1em;" />.</span></p> <p><span style="font-weight: 400;">As presented at </span><a href="https://op.europa.eu/en/web/endorse-2021/conference"><span style="font-weight: 400;">ENDORSE conference March 2021</span></a><span style="font-weight: 400;">, the redesign of CORDIS data-model in accordance with Semantic Web standards contributed to bring the platform « <strong><em>from acting as a data repository to finally playing an active role as data provider</em></strong> », where EuroSciVoc taxonomy & EURIO ontology both played key roles in the creation of future CORDIS knowledge graph and SPARQL endpoint :</span></p> <p><span style="font-weight: 400;"><img src="https://s.w.org/images/core/emoji/72x72/1f538.png" alt="🔸" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span><em><span style="font-weight: 400;"> <a href="https://data.europa.eu/data/datasets/euroscivoc-the-european-science-vocabulary?locale=en">EuroSciVoc</a> […] is a multilingual, SKOS-XL based taxonomy that represents all the main fields of science that were discovered from the CORDIS content, e.g., project abstracts. It was built starting from the hierarchy of the OECD’s Fields of R&D classification (FoRD) as root and extended through a semi-automatic process based on NLP techniques. It contains almost 1 000 categories in 6 languages (English, French, German, Italian, Polish and Spanish) and each category is enriched with relevant keywords extracted from the textual description of CORDIS projects. It is constantly evolving and is available on EU Vocabularies website […].</span></em></p> <p><span style="font-weight: 400;"><img src="https://s.w.org/images/core/emoji/72x72/1f538.png" alt="🔸" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span><em><span style="font-weight: 400;"> In order to transform CORDIS data into Linked Open Data, thus aligning with Semantic Web standards, best practices and tools in industry and public organizations, the need for an ontology emerged. CORDIS created the <a href="https://data.europa.eu/data/datasets/european-research-information-ontology?locale=en">EURIO</a> (European Research Information Ontology) based on data about research projects funded by the EU’s framework programmes for research and innovation. EURIO is aligned with EU ontologies such as <a href="https://dcodings.github.io/DINGO/">DINGO</a> and <a href="https://github.com/SPAROntologies/frapo">FRAPO</a> and de facto standard ontologies such as schema.org and the Organization Ontology from W3C. It models projects, their results and actors such as people and organizations, and includes administrative information like funding schemes and grants.</span></em></p> <p><span style="font-weight: 400;"><img src="https://s.w.org/images/core/emoji/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span><em> EURIO, which is available on EU Vocabularies website, was <strong>the starting point to develop a Knowledge Graph of CORDIS data that will be publicly available via a dedicated SPARQL endpoint</strong>.</em> <em>»</em></p> <p>(Enrico Bignotti & Baya Remaoun, « <a href="https://op.europa.eu/en/web/endorse-2021/programme">EuroSciVoc taxonomy and EURIO ontology: CORDIS as (semantic) data provider</a> » , ENDORSE March 16, 2021. <a href="https://op.europa.eu/documents/10120270/10133951/BIGNOTTI_REMAOUN_presentation_EuroSciVoc+taxonomy+and+EURIO+ontology+CORDIS+as+%28semantic%29+data+provider.pdf/3303e7b9-967d-65f2-23a3-96b3e2bd2856?t=1616568751644"><span style="font-weight: 400;">PDF</span></a><span style="font-weight: 400;"> </span><a href="https://www.youtube.com/watch?v=vIBC_PO5aoM&t=3689s"><span style="font-weight: 400;">VIDEO</span></a>)</p> <p><span style="font-weight: 400;">… A Knowledge graph <a href="https://upcommons.upc.edu/bitstream/handle/2117/378291/2022-ISWC.pdf?sequence=1&isAllowed=y">that was soon released in 2022-2023</a></span><span style="font-weight: 400;"> (see INDUSTRY TRACK 1 on Tuesday, 25 October of <a href="http://iswc2022.semanticweb.org/index.php/conference/">ISWC 2022 Conference</a> for more detail), until final opening of a </span><a href="https://cordis.europa.eu/datalab"><span style="font-weight: 400;">CORDIS SPARQL endpoint</span></a><span style="font-weight: 400;"> late november 2023.</span></p> <p><span style="font-weight: 400;">Now fancy a few SPARQL queries in there ?</span></p> <p><strong>Follow the SPARQL <img src="https://s.w.org/images/core/emoji/72x72/1f4ab.png" alt="💫" class="wp-smiley" style="height: 1em; max-height: 1em;" /></strong></p> <p><span style="font-weight: 400;">CORDIS SPARQL endpoint is </span><a href="https://cordis.europa.eu/datalab"><span style="font-weight: 400;">actually made available on CORDIS Datalab</span></a><span style="font-weight: 400;"> (and already referenced in <a href="https://linkedopendata.eu/wiki/The_EU_Knowledge_Graph">EU Knowledge Graph</a> among other European SPARQL endpoints ! <a href="http://tinyurl.com/yn5fsylk">see the query</a> / <a href="http://tinyurl.com/2e8z6y5e">see the results</a>)</span></p> <p><span style="font-weight: 400;">Here you can access a quick documentation guide to CORDIS Linked Open Data : </span><a href="https://cordis.europa.eu/about/sparql"><span style="font-weight: 400;">https://cordis.europa.eu/about/sparql</span></a><span style="font-weight: 400;">.</span></p> <p><span style="font-weight: 400;">Let’s have a look at EURIO ontology first : we need to understand it to query CORDIS knowledge graph.</span></p> <p><span style="font-weight: 400;">As we are told in the guide, the latest version can be downloaded </span><a href="https://op.europa.eu/en/web/eu-vocabularies/dataset/-/resource?uri=http://publications.europa.eu/resource/dataset/eurio"><span style="font-weight: 400;">on EU Vocabularies website</span></a><span style="font-weight: 400;">. When we unzip</span><span style="font-weight: 400;"> the archive we access the whole documentation about EURIO Classes & properties that we need to write our SPARQL queries – and a diagram of </span><span style="font-weight: 400;">main classes and properties</span><span style="font-weight: 400;"> of CORDIS data model : </span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2024/01/EURIO_v2.4.png"><img class="aligncenter size-large wp-image-1669" src="http://blog.sparna.fr/wp-content/uploads/2024/01/EURIO_v2.4-1024x812.png" alt="EURIO_v2.4" width="650" height="515" /></a></p> <p><span style="font-weight: 400;">At first sight we can observe on the schema 3 main groups of entities :</span></p> <ul> <li style="font-weight: 400;"><span style="font-weight: 400;">On the top right, the projects & publications associated, key ressources of CORDIS ;</span></li> <li style="font-weight: 400;"><span style="font-weight: 400;">On the top left, the fundings & grants materials, on « monetary » side of the project ;</span></li> <li style="font-weight: 400;"><span style="font-weight: 400;">On the bottom, the organisations & persons implied, with references & coordinates.</span></li> </ul> <p><span style="font-weight: 400;">Let’s open </span><a href="https://cordis.europa.eu/datalab/sparql-endpoint"><span style="font-weight: 400;">CORDIS SPARQL endpoint</span></a><span style="font-weight: 400;"> – some easy queries can be run to begin exploring CORDIS knowledge graph.</span></p> <p><span style="font-weight: 400;">Nb : the data on SPARQL endpoint is a snapshot, but freshest dumps can be found </span><a href="https://data.europa.eu/data/datasets/named-graphs-from-eurio-knowledge-graph?locale=en"><span style="font-weight: 400;">on European data portal</span></a><span style="font-weight: 400;"> !</span></p> <p><span style="font-weight: 400;">Here a simple one to </span><b>find a list of FundingSchemes with their titles and IDs corresponding to « Horizon 2020 » programme</b><span style="font-weight: 400;"> :</span></p> <table> <tbody> <tr> <td><strong>FundingSchemes with their titles and IDs corresponding to « Horizon 2020 » programme</strong></p> <p>PREFIX xsd: <http://www.w3.org/2001/XMLSchema#><br /> PREFIX eurio: <http://data.europa.eu/s66#><br /> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#><br /> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#><br /> SELECT ?fs ?title ?id<br /> WHERE {<br /> # select all funding schemes …<br /> ?fs a eurio:FundingScheme.<br /> # … with their title …<br /> ?fs eurio:title ?title.<br /> # … and identifier …<br /> ?fs eurio:identifier ?id.<br /> # where the identifier contains the regular expression “H2020”<br /> FILTER (REGEX (?id, ‘H2020′))<br /> } LIMIT 100</td> </tr> </tbody> </table> <p>▶️ <a href="https://cordis.europa.eu/datalab/sparql-endpoint#query=%23%20FundingSchemes%20with%20their%20titles%20and%20IDs%20corresponding%20to%20%C2%AB%20Horizon%202020%20%C2%BB%20programme%0A%0APREFIX%20xsd%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0APREFIX%20eurio%3A%20%3Chttp%3A%2F%2Fdata.europa.eu%2Fs66%23%3E%0APREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT%20%3Ffs%20%3Ftitle%20%3Fid%0AWHERE%20%7B%0A%23%20select%20all%20funding%20schemes%20%E2%80%A6%0A%3Ffs%20a%20eurio%3AFundingScheme.%0A%23%20%E2%80%A6%20with%20their%20title%20%E2%80%A6%0A%3Ffs%20eurio%3Atitle%20%3Ftitle.%0A%23%20%E2%80%A6%20and%20identifier%20%E2%80%A6%0A%3Ffs%20eurio%3Aidentifier%20%3Fid.%0A%23%20where%20the%20identifier%20contains%20the%20regular%20expression%20%E2%80%9CH2020%E2%80%9D%0AFILTER%20(REGEX%20(%3Fid%2C%20'H2020'))%0A%7D%20LIMIT%20100&endpoint=https%3A%2F%2Fcordis.europa.eu%2Fdatalab%2Fsparql&requestMethod=POST&tabTitle=Query&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq&outputFormat=table">See the results</a></p> <p><span style="font-weight: 400;">The FILTER REGEX enables us to display the IDs corresponding to H2020 Funding Schemes.</span></p> <p><span style="font-weight: 400;">We can make another query to get the projects with the Funding Scheme Programme they are related to (note that, in EURIO a eurio:</span><span style="font-weight: 400;">hasFundingSchemeProgramme</span><span style="font-weight: 400;"> is a sub-property of eurio:fundingScheme) :</span></p> <table> <tbody> <tr> <td><strong>Projects with the Funding Scheme Programme they are related to</strong></p> <p><span style="font-weight: 400;">PREFIX eurio: <http://data.europa.eu/s66#></span><br /> <span style="font-weight: 400;">PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#></span><br /> <span style="font-weight: 400;">PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#></span><br /> <span style="font-weight: 400;">SELECT ?project ?acronym ?fundingscheme</span><br /> <span style="font-weight: 400;">WHERE {</span><br /> # select the projects …<br /> <span style="font-weight: 400;">?project a eurio:Project.</span><br /> # … with acronyms …<br /> <span style="font-weight: 400;">?project eurio:hasAcronym/eurio:shortForm ?acronym.</span><br /> # … and corresponding funding scheme programmes<br /> <span style="font-weight: 400;">?project eurio:isFundedBy/eurio:hasFundingSchemeProgramme/eurio:code ?fundingscheme.</span><br /> <span style="font-weight: 400;">} LIMIT 100</span></td> </tr> </tbody> </table> <p>▶️ <a href="https://cordis.europa.eu/datalab/sparql-endpoint#query=%23%20Projects%20with%20the%20Funding%20Scheme%20Programme%20they%20are%20related%20to%0A%0APREFIX%20eurio%3A%20%3Chttp%3A%2F%2Fdata.europa.eu%2Fs66%23%3E%0APREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT%20%3Fproject%20%3Facronym%20%3Ffundingscheme%0AWHERE%20%7B%0A%23%20select%20the%20projects%20...%0A%3Fproject%20a%20eurio%3AProject.%0A%23%20%E2%80%A6%20with%20acronyms%20...%0A%3Fproject%20eurio%3AhasAcronym%2Feurio%3AshortForm%20%3Facronym.%0A%23%20%E2%80%A6%20and%20corresponding%20funding%20scheme%20programmes%0A%3Fproject%20eurio%3AisFundedBy%2Feurio%3AhasFundingSchemeProgramme%2Feurio%3Acode%20%3Ffundingscheme.%0A%7D%20LIMIT%20100&endpoint=https%3A%2F%2Fcordis.europa.eu%2Fdatalab%2Fsparql&requestMethod=POST&tabTitle=Query%201&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq&outputFormat=table">See the results</a></p> <p><span style="font-weight: 400;">(Here we used a property path with a « / » to shorten the query to get the acronyms of projects & Funding Scheme Programmes codes).</span></p> <p><span style="font-weight: 400;">… and combining with the first query we can find the projects depending on H2020 Funding Scheme Programme in particular :</span></p> <table> <tbody> <tr> <td><strong>Projects depending on H2020 Funding Scheme Programme in particular</strong></p> <p><span style="font-weight: 400;">PREFIX eurio: <http://data.europa.eu/s66#></span><br /> <span style="font-weight: 400;">PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#></span><br /> <span style="font-weight: 400;">PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#></span><br /> <span style="font-weight: 400;">SELECT ?project ?acronym ?fundingscheme</span><br /> <span style="font-weight: 400;">WHERE {</span><br /> # select the projects …<br /> <span style="font-weight: 400;">?project a eurio:Project.</span><br /> # … with acronyms …<br /> <span style="font-weight: 400;">?project eurio:hasAcronym/eurio:shortForm ?acronym.</span><br /> # … and corresponding funding scheme programmes codes …<br /> <span style="font-weight: 400;">?project eurio:isFundedBy/eurio:hasFundingSchemeProgramme/eurio:code ?fundingscheme.</span><br /> # … with a filter on funding scheme codes ‘H2020′<br /> <span style="font-weight: 400;">FILTER REGEX (?fundingscheme, ‘H2020′)</span><br /> <span style="font-weight: 400;">} LIMIT 100</span></td> </tr> </tbody> </table> <p>▶️ <a href="https://cordis.europa.eu/datalab/sparql-endpoint#query=%23%20Projects%20depending%20on%20H2020%20Funding%20Scheme%20Programme%20in%20particular%0A%0APREFIX%20eurio%3A%20%3Chttp%3A%2F%2Fdata.europa.eu%2Fs66%23%3E%0APREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT%20%3Fproject%20%3Facronym%20%3Ffundingscheme%0AWHERE%20%7B%0A%23%20select%20the%20projects%20...%0A%3Fproject%20a%20eurio%3AProject.%0A%23%20%E2%80%A6%20with%20acronyms%20...%0A%3Fproject%20eurio%3AhasAcronym%2Feurio%3AshortForm%20%3Facronym.%0A%23%20%E2%80%A6%20and%20corresponding%20funding%20scheme%20programmes%20codes%20...%0A%3Fproject%20eurio%3AisFundedBy%2Feurio%3AhasFundingSchemeProgramme%2Feurio%3Acode%20%3Ffundingscheme.%0A%23%20%E2%80%A6%20with%20a%20filter%20on%20funding%20scheme%20codes%20'H2020'%0AFILTER%20REGEX%20(%3Ffundingscheme%2C%20'H2020')%0A%7D%20LIMIT%20100&endpoint=https%3A%2F%2Fcordis.europa.eu%2Fdatalab%2Fsparql&requestMethod=POST&tabTitle=Query&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq&outputFormat=table">See the results</a></p> <p><span style="font-weight: 400;">It is also possible to get the list of all existing Funding Scheme Programmes CORDIS projects have been funded by – we observe 27 of them here (from the SPARQL endpoint) – while adding a count function to know how many projects per FundingSchemeProgramme :</span></p> <table> <tbody> <tr> <td><strong>All existing Funding Scheme Programmes CORDIS projects have been funded by</strong></p> <p><span style="font-weight: 400;">PREFIX eurio: <http://data.europa.eu/s66#></span><br /> <span style="font-weight: 400;">PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#></span><br /> <span style="font-weight: 400;">PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#></span><br /> # count the number of projects by funding scheme programme …<br /> <span style="font-weight: 400;">SELECT (COUNT (?project) as ?count) ?fundingscheme</span><br /> <span style="font-weight: 400;">WHERE {</span><br /> # select the projects with corresponding funding scheme programmes codes …<br /> <span style="font-weight: 400;">?project eurio:isFundedBy/eurio:hasFundingSchemeProgramme/eurio:code ?fundingscheme.</span><br /> # … counting projects per funding scheme programme<br /> <span style="font-weight: 400;">} GROUP BY ?fundingscheme</span><br /> <span style="font-weight: 400;">LIMIT 100</span></td> </tr> </tbody> </table> <p>▶️ <a href="https://cordis.europa.eu/datalab/sparql-endpoint#query=%23%20All%20existing%20Funding%20Scheme%20Programmes%20CORDIS%20projects%20have%20been%20funded%20by%0A%0APREFIX%20eurio%3A%20%3Chttp%3A%2F%2Fdata.europa.eu%2Fs66%23%3E%0APREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0A%23%20count%20the%20number%20of%20projects%20by%20funding%20scheme%20programme%20...%0ASELECT%20(COUNT%20(%3Fproject)%20as%20%3Fcount)%20%3Ffundingscheme%0AWHERE%20%7B%0A%23%20select%20the%20projects%20with%20corresponding%20funding%20scheme%20programmes%20codes%20...%0A%3Fproject%20eurio%3AisFundedBy%2Feurio%3AhasFundingSchemeProgramme%2Feurio%3Acode%20%3Ffundingscheme.%0A%23%20...%20counting%20projects%20per%20funding%20scheme%20programme%0A%7D%20GROUP%20BY%20%3Ffundingscheme%0ALIMIT%20100&endpoint=https%3A%2F%2Fcordis.europa.eu%2Fdatalab%2Fsparql&requestMethod=POST&tabTitle=Query%201&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq&outputFormat=table">See the results</a></p> <p>Querying the organisations properties will return other kind of useful informations about geographical location of the projects stakeholders. Let’s figure out we want to find the projects whose coordinating organisations have sites located in France :</p> <table> <tbody> <tr> <td><strong>Projects whose coordinating organisations have sites located in France <img src="https://s.w.org/images/core/emoji/72x72/1f413.png" alt="🐓" class="wp-smiley" style="height: 1em; max-height: 1em;" /></strong></p> <p>PREFIX skos: <http://www.w3.org/2004/02/skos/core#><br /> PREFIX eurio: <http://data.europa.eu/s66#><br /> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#><br /> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#><br /> SELECT ?project ?acronym ?role ?organisation ?country<br /> WHERE {<br /> # select the projects with their acronyms …<br /> ?project a eurio:Project.<br /> ?project eurio:hasAcronym/eurio:shortForm ?acronym.<br /> # … and organisations with ‘coordinator’ role and name …<br /> ?project eurio:hasInvolvedParty ?organisationrole.<br /> ?organisationrole eurio:roleLabel ?role.<br /> ?organisationrole eurio:roleLabel « coordinator ».<br /> ?organisationrole eurio:isRoleOf/eurio:legalName ?organisation.<br /> # … with address country for the sites defined at ‘FR’<br /> ?organisationrole eurio:isRoleOf/eurio:hasSite/eurio:hasAddress/eurio:addressCountry ?country.<br /> VALUES ?country { ‘FR’ }<br /> } LIMIT 100</td> </tr> </tbody> </table> <p>▶️ <a href="https://cordis.europa.eu/datalab/sparql-endpoint#query=%23%20Projects%20whose%20coordinating%20organisations%20have%20sites%20located%20in%20France%20%F0%9F%90%93%0A%0APREFIX%20skos%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0APREFIX%20eurio%3A%20%3Chttp%3A%2F%2Fdata.europa.eu%2Fs66%23%3E%0APREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT%20%3Fproject%20%3Facronym%20%3Frole%20%3Forganisation%20%3Fcountry%0AWHERE%20%7B%0A%23%20select%20the%20projects%20with%20their%20acronyms%20...%0A%3Fproject%20a%20eurio%3AProject.%0A%3Fproject%20eurio%3AhasAcronym%2Feurio%3AshortForm%20%3Facronym.%0A%23%20...%20and%20organisations%20with%20'coordinator'%20role%20and%20name%20...%0A%3Fproject%20eurio%3AhasInvolvedParty%20%3Forganisationrole.%0A%3Forganisationrole%20eurio%3AroleLabel%20%3Frole.%0A%3Forganisationrole%20eurio%3AroleLabel%20%22coordinator%22.%0A%3Forganisationrole%20eurio%3AisRoleOf%2Feurio%3AlegalName%20%3Forganisation.%0A%23%20...%20with%20address%20country%20for%20the%20sites%20defined%20at%20'FR'%0A%3Forganisationrole%20eurio%3AisRoleOf%2Feurio%3AhasSite%2Feurio%3AhasAddress%2Feurio%3AaddressCountry%20%3Fcountry.%0AVALUES%20%3Fcountry%20%7B%20'FR'%20%7D%0A%7D%20LIMIT%20100&endpoint=https%3A%2F%2Fcordis.europa.eu%2Fdatalab%2Fsparql&requestMethod=POST&tabTitle=Query&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq&outputFormat=table">See the results</a></p> <p>Depending on available data, you can either query via PostalAddress info (eurio:addressCountry ‘FR’) or AdministrativeArea (eurio:hasGeographicalLocation) … Here we’re lucky as both fields are mandatory ones.</p> <p>Last but not least, we can also play with CORDIS vocabularies : here you’ll have the choice to investigate via plain keywords of Projects or Publications items, querying titles, abstracts or other types of literals…</p> <p>An example of projects with abstracts containing string ❄ ‘winter’ ❄ – the URL giving the exact link to the project online :</p> <table> <tbody> <tr> <td><strong>Looking for ❄ ‘winter’ ❄ in CORDIS projects abstracts (with nice URL to go)</strong></p> <p>PREFIX eurio: <http://data.europa.eu/s66#><br /> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#><br /> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#><br /> SELECT?project ?acronym ?abstract ?url<br /> WHERE {<br /> # select the projects with their acronyms and abstracts …<br /> ?project rdf:type eurio:Project.<br /> ?project eurio:hasAcronym/eurio:shortForm ?acronym.<br /> ?project eurio:abstract ?abstract.<br /> # … with a filter on abstracts containing string ‘winter’ case insensitive …<br /> FILTER (regex(str(?abstract), ‘winter’, ‘i’))<br /> # … generating proper CORDIS website URLs based on RCN project code<br /> ?project eurio:rcn ?rcn.<br /> BIND(IRI(CONCAT(‘https://cordis.europa.eu/project/rcn/’, ?rcn)) AS ?url)<br /> } LIMIT 100</td> </tr> </tbody> </table> <p>▶️ <a href="https://cordis.europa.eu/datalab/sparql-endpoint#query=%23%20Looking%20for%20%E2%9D%84%20'winter'%20%E2%9D%84%20in%20CORDIS%20projects%20abstracts%20(with%20nice%20URL%20to%20go)%0A%0APREFIX%20eurio%3A%20%3Chttp%3A%2F%2Fdata.europa.eu%2Fs66%23%3E%0APREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT%3Fproject%20%3Facronym%20%3Fabstract%20%3Furl%0AWHERE%20%7B%0A%23%20select%20the%20projects%20with%20their%20acronyms%20and%20abstracts%20...%0A%3Fproject%20rdf%3Atype%20eurio%3AProject.%0A%3Fproject%20eurio%3AhasAcronym%2Feurio%3AshortForm%20%3Facronym.%0A%3Fproject%20eurio%3Aabstract%20%3Fabstract.%0A%23%20...%20with%20a%20filter%20on%20abstracts%20containing%20string%20'winter'%20case%20insensitive%20...%0AFILTER%20(regex(str(%3Fabstract)%2C%20'winter'%2C%20'i'))%0A%23%20...%20generating%20proper%20CORDIS%20website%20URLs%20based%20on%20RCN%20project%20code%0A%3Fproject%20eurio%3Arcn%20%3Frcn.%0ABIND(IRI(CONCAT('https%3A%2F%2Fcordis.europa.eu%2Fproject%2Frcn%2F'%2C%20%3Frcn))%20AS%20%3Furl)%0A%7D%20LIMIT%20100&endpoint=https%3A%2F%2Fcordis.europa.eu%2Fdatalab%2Fsparql&requestMethod=POST&tabTitle=Query%201&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq&outputFormat=table">See the results</a></p> <p>But funniest way will be using EuroSciVoc taxonomy (and navigating through thesaurus hierarchy) : to do so we need to navigate through property « eurio:hasEuroSciVocClassification » to get the Concepts skosxl:prefLabel property … to finally obtain the thesaurus labels (don’t forget to choose a prefered language with a FILTER (lang parameter) :</p> <table> <tbody> <tr> <td><strong>Projects with their associated EuroSciVoc keywords (English prefLabels <img src="https://s.w.org/images/core/emoji/72x72/1f482.png" alt="💂" class="wp-smiley" style="height: 1em; max-height: 1em;" />)</strong></p> <p>PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#><br /> PREFIX skos: <http://www.w3.org/2004/02/skos/core#><br /> PREFIX eurio: <http://data.europa.eu/s66#><br /> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#><br /> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#><br /> SELECT ?project ?acronym ?ESV<br /> WHERE {<br /> # select the projects with their acronyms …<br /> ?project eurio:hasAcronym/eurio:shortForm ?acronym.<br /> # … with EuroSciVoc Classification prefLabels …<br /> ?project eurio:hasEuroSciVocClassification/skosxl:prefLabel/skosxl:literalForm ?ESV.<br /> # … only returning ‘English’ prefLabels<br /> FILTER (lang(?ESV) = ‘en’)<br /> } LIMIT 100</td> </tr> </tbody> </table> <p>▶️ <a href="https://cordis.europa.eu/datalab/sparql-endpoint#query=%23%20Projects%20with%20their%20associated%20EuroSciVoc%20keywords%20(English%20prefLabels%20%F0%9F%92%82)%0A%0APREFIX%20skosxl%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2008%2F05%2Fskos-xl%23%3E%0APREFIX%20skos%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0APREFIX%20eurio%3A%20%3Chttp%3A%2F%2Fdata.europa.eu%2Fs66%23%3E%0APREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT%20%3Fproject%20%3Facronym%20%3FESV%0AWHERE%20%7B%0A%23%20select%20the%20projects%20with%20their%20acronyms%20...%0A%3Fproject%20eurio%3AhasAcronym%2Feurio%3AshortForm%20%3Facronym.%0A%23%20...%20with%20EuroSciVoc%20Classification%20prefLabels%20...%0A%3Fproject%20eurio%3AhasEuroSciVocClassification%2Fskosxl%3AprefLabel%2Fskosxl%3AliteralForm%20%3FESV.%0A%23%20...%20only%20returning%20'English'%20prefLabels%0AFILTER%20(lang(%3FESV)%20%3D%20'en')%0A%7D%20LIMIT%20100%0A&endpoint=https%3A%2F%2Fcordis.europa.eu%2Fdatalab%2Fsparql&requestMethod=POST&tabTitle=Query%203&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq&outputFormat=table">See the results</a></p> <p><span style="font-weight: 400;">A bit more complex one using first level of hierarchy of the taxonomy : here we are searching for all skos:broader concepts « with no other broader concept » (the FILTER NOT EXISTS formula), aka the top concepts or root concepts of the vocabulary used to describe the projects. Then counting the projects by each category :</span></p> <table> <tbody> <tr> <td><strong>All root categories of EuroSciVoc used to describe the projects</strong></p> <p>PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#><br /> PREFIX skos: <http://www.w3.org/2004/02/skos/core#><br /> PREFIX eurio: <http://data.europa.eu/s66#><br /> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#><br /> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#><br /> # count the number of projects by EuroSciVoc top categories …<br /> SELECT (COUNT(?project) AS ?nbProject) ?ESV_root_label<br /> WHERE {<br /> # … the top categories are Concepts …<br /> ?ESV_root a skos:Concept .<br /> # … with no broader Concept …<br /> FILTER NOT EXISTS { ?ESV_root skos:broader ?anything }<br /> # … list with corresponding projects …<br /> ?ESV_root ^skos:broader*/^eurio:hasEuroSciVocClassification ?project .<br /> # … and EuroSciVoc corresponding skos-xl prefLabels …<br /> ?ESV_root skosxl:prefLabel/skosxl:literalForm ?ESV_root_label.<br /> # … sorting by EuroSciVoc category, with English prefLabels<br /> FILTER (lang(?ESV_root_label) = ‘en’)<br /> } GROUP BY ?ESV_root_label<br /> LIMIT 100</td> </tr> </tbody> </table> <p>▶️ <a href="https://cordis.europa.eu/datalab/sparql-endpoint#query=%23%20All%20root%20categories%20of%20EuroSciVoc%20used%20to%20describe%20the%20projects%0A%0APREFIX%20skosxl%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2008%2F05%2Fskos-xl%23%3E%0APREFIX%20skos%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0APREFIX%20eurio%3A%20%3Chttp%3A%2F%2Fdata.europa.eu%2Fs66%23%3E%0APREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0A%23%20count%20the%20number%20of%20projects%20by%20EuroSciVoc%20top%20categories%20...%0ASELECT%20(COUNT(%3Fproject)%20AS%20%3FnbProject)%20%3FESV_root_label%0AWHERE%20%7B%0A%23%20...%20the%20top%20categories%20are%20Concepts%20...%0A%3FESV_root%20a%20skos%3AConcept%20.%0A%23%20...%20with%20no%20broader%20Concept%20...%0AFILTER%20NOT%20EXISTS%20%7B%20%3FESV_root%20skos%3Abroader%20%3Fanything%20%7D%0A%23%20...%20list%20with%20corresponding%20projects%20...%0A%3FESV_root%20%5Eskos%3Abroader*%2F%5Eeurio%3AhasEuroSciVocClassification%20%3Fproject%20.%0A%23%20...%20and%20EuroSciVoc%20corresponding%20skos-xl%20prefLabels%20...%0A%3FESV_root%20skosxl%3AprefLabel%2Fskosxl%3AliteralForm%20%3FESV_root_label.%0A%23%20...%20sorting%20by%20EuroSciVoc%20category%2C%20with%20English%20prefLabels%0AFILTER%20(lang(%3FESV_root_label)%20%3D%20'en')%0A%7D%20GROUP%20BY%20%3FESV_root_label%0ALIMIT%20100&endpoint=https%3A%2F%2Fcordis.europa.eu%2Fdatalab%2Fsparql&requestMethod=POST&tabTitle=Query%201&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq&outputFormat=table">See the results</a></p> <p>… and maybe again more explicit results if refined to level 2 of hierarchy <img src="https://s.w.org/images/core/emoji/72x72/1f440.png" alt="👀" class="wp-smiley" style="height: 1em; max-height: 1em;" /> :</p> <table> <tbody> <tr> <td><strong>All ‘level 2′ root categories of EuroSciVoc used to describe the projects</strong></p> <p>PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#><br /> PREFIX skos: <http://www.w3.org/2004/02/skos/core#><br /> PREFIX eurio: <http://data.europa.eu/s66#><br /> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#><br /> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#><br /> # count the number of projects by EuroSciVoc level 2 top categories …<br /> SELECT (COUNT(?project) AS ?nbProject) ?ESV_root_label ?ESV_level2_label<br /> WHERE {<br /> # … the top categories are Concepts …<br /> ?ESV_root a skos:Concept .<br /> # … with no broader Concept …<br /> FILTER NOT EXISTS { ?ESV_root skos:broader ?anything }<br /> # … list level 2 category below level 1 with corresponding projects …<br /> ?ESV_root ^skos:broader ?ESV_level2 .<br /> ?ESV_level2 ^skos:broader*/^eurio:hasEuroSciVocClassification ?project .<br /> # … and EuroSciVoc corresponding skos-xl prefLabels …<br /> ?ESV_root skosxl:prefLabel/skosxl:literalForm ?ESV_root_label.<br /> ?ESV_level2 skosxl:prefLabel/skosxl:literalForm ?ESV_level2_label.<br /> # … sorting by EuroSciVoc category, with English prefLabels<br /> FILTER (lang(?ESV_root_label) = ‘en’)<br /> FILTER (lang(?ESV_level2_label) = ‘en’)<br /> } GROUP BY ?ESV_root_label ?ESV_level2_label<br /> ORDER BY ?ESV_root_label<br /> LIMIT 100</td> </tr> </tbody> </table> <p>▶️ <a href="https://cordis.europa.eu/datalab/sparql-endpoint#query=%23%20All%20'level%202'%20root%20categories%20of%20EuroSciVoc%20used%20to%20describe%20the%20projects%0A%0APREFIX%20skosxl%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2008%2F05%2Fskos-xl%23%3E%0APREFIX%20skos%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0APREFIX%20eurio%3A%20%3Chttp%3A%2F%2Fdata.europa.eu%2Fs66%23%3E%0APREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0A%23%20count%20the%20number%20of%20projects%20by%20EuroSciVoc%20level%202%20top%20categories%20...%0ASELECT%20(COUNT(%3Fproject)%20AS%20%3FnbProject)%20%3FESV_root_label%20%3FESV_level2_label%0AWHERE%20%7B%0A%23%20...%20the%20top%20categories%20are%20Concepts%20...%0A%3FESV_root%20a%20skos%3AConcept%20.%0A%23%20...%20with%20no%20broader%20Concept%20...%0AFILTER%20NOT%20EXISTS%20%7B%20%3FESV_root%20skos%3Abroader%20%3Fanything%20%7D%0A%23%20...%20list%20level%202%20category%20below%20level%201%20with%20corresponding%20projects%20...%0A%3FESV_root%20%5Eskos%3Abroader%20%3FESV_level2%20.%0A%3FESV_level2%20%5Eskos%3Abroader*%2F%5Eeurio%3AhasEuroSciVocClassification%20%3Fproject%20.%0A%23%20...%20and%20EuroSciVoc%20corresponding%20skos-xl%20prefLabels%20...%0A%3FESV_root%20skosxl%3AprefLabel%2Fskosxl%3AliteralForm%20%3FESV_root_label.%0A%3FESV_level2%20skosxl%3AprefLabel%2Fskosxl%3AliteralForm%20%3FESV_level2_label.%0A%23%20...%20sorting%20by%20EuroSciVoc%20category%2C%20with%20English%20prefLabels%0AFILTER%20(lang(%3FESV_root_label)%20%3D%20'en')%0AFILTER%20(lang(%3FESV_level2_label)%20%3D%20'en')%0A%7D%20GROUP%20BY%20%3FESV_root_label%20%3FESV_level2_label%0AORDER%20BY%20%3FESV_root_label%0ALIMIT%20100&endpoint=https%3A%2F%2Fcordis.europa.eu%2Fdatalab%2Fsparql&requestMethod=POST&tabTitle=Query&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq&outputFormat=table">See the results</a></p> <p>And a little last one with a count, to enumerate most used EuroSciVoc Concepts for indexing projects :</p> <table> <tbody> <tr> <td><strong>Most used EuroSciVoc Concepts for indexing projects</strong></p> <p>PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#><br /> PREFIX skos: <http://www.w3.org/2004/02/skos/core#><br /> PREFIX eurio: <http://data.europa.eu/s66#><br /> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#><br /> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#><br /> # count the number of projects by EuroSciVoc Concept …<br /> SELECT (COUNT (?project) as ?count) ?ESV<br /> WHERE {<br /> # … select the projects with their acronyms …<br /> ?project eurio:hasAcronym/eurio:shortForm ?acronym.<br /> # … with EuroSciVoc Classification prefLabels …<br /> ?project eurio:hasEuroSciVocClassification/skosxl:prefLabel/skosxl:literalForm ?ESV.<br /> # … sorting by EuroSciVoc Concept, with English prefLabels<br /> FILTER (lang(?ESV) = ‘en’)<br /> } GROUP BY ?ESV<br /> ORDER BY DESC(?count)<br /> LIMIT 3000</td> </tr> </tbody> </table> <p>▶️ <a href="https://cordis.europa.eu/datalab/sparql-endpoint#query=%23%20Most%20used%20EuroSciVoc%20Concepts%20for%20indexing%20projects%0A%0APREFIX%20skosxl%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2008%2F05%2Fskos-xl%23%3E%0APREFIX%20skos%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0APREFIX%20eurio%3A%20%3Chttp%3A%2F%2Fdata.europa.eu%2Fs66%23%3E%0APREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0A%23%20count%20the%20number%20of%20projects%20by%20EuroSciVoc%20Concept%20...%0ASELECT%20(COUNT%20(%3Fproject)%20as%20%3Fcount)%20%3FESV%0AWHERE%20%7B%0A%23%20%20...%20select%20the%20projects%20with%20their%20acronyms%20...%0A%3Fproject%20eurio%3AhasAcronym%2Feurio%3AshortForm%20%3Facronym.%0A%23%20...%20with%20EuroSciVoc%20Classification%20prefLabels%20...%0A%3Fproject%20eurio%3AhasEuroSciVocClassification%2Fskosxl%3AprefLabel%2Fskosxl%3AliteralForm%20%3FESV.%0A%23%20...%20sorting%20by%20EuroSciVoc%20Concept%2C%20with%20English%20prefLabels%0AFILTER%20(lang(%3FESV)%20%3D%20'en')%0A%7D%20GROUP%20BY%20%3FESV%0AORDER%20BY%20DESC(%3Fcount)%0ALIMIT%203000&endpoint=https%3A%2F%2Fcordis.europa.eu%2Fdatalab%2Fsparql&requestMethod=POST&tabTitle=Query%201&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq&outputFormat=table">See the results</a></p> <p><img src="https://s.w.org/images/core/emoji/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" />This one an ideal one to generate a word cloud maybe ?</p> <p>What if we send the CSV data to <a href="https://wordart.com/create">some nice online word cloud generator</a> then ?</p> <p><a href="https://wordart.com/r8zsokkk7ghu/untitled"><img class="aligncenter size-full wp-image-1710" src="http://blog.sparna.fr/wp-content/uploads/2024/01/Cordis-Taxo-Cloud.png" alt="Cordis Taxo Cloud" width="660" height="757" /></a></p> <p>(OMG <a href="https://wordart.com/create">they also have a shooting star shape</a> <img src="https://s.w.org/images/core/emoji/72x72/1f320.png" alt="🌠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> in there 🤩)</p> <p><strong>As a conclusion…</strong></p> <p><span style="font-weight: 400;">According to Science (CORDIS saying !), <a href="https://europa.eu/!vYVHXD">New Year’s resolutions appear difficult to be held</a></span><span style="font-weight: 400;">… because most of time too ambitious, restrictive or unprecisely formulated : indeed, « </span><span style="font-weight: 400;">the </span><a href="https://cordis.europa.eu/article/id/428767-trending-science-do-this-one-thing-to-keep-your-new-year-s-resolutions-research-says"><span style="font-weight: 400;">effectiveness of resolutions depends on how they are </span><b>framed</b></a><span style="font-weight: 400;">.</span><span style="font-weight: 400;"> »</span></p> <p><span style="font-weight: 400;">Horizon 2024, let’s suggest a(n RDF ?) well-framed one : may CORDIS SPARQL endpoint initiative be an example for other structures who want to share Linked Open Data !</span></p> <p><span style="font-weight: 400;"><strong>Wishing you Best Interoperability and a Very Merry ✨ Sparqling New Year !</strong> ✨</span></p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2024/01/15/cordis-a-sparql-endpoint-is-born/">CORDIS : a SPARQL endpoint is born !</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></content:encoded> </item> <item rdf:about="https://blog.sparna.fr/2023/03/13/2013-2023-tis-skosplays-birthday/"> <title>2013-2023 : ‘Tis SKOSPlay!’s Birthday !</title> <link>https://blog.sparna.fr/2023/03/13/2013-2023-tis-skosplays-birthday/</link> <dc:date>2023-03-13T14:28:53Z</dc:date> <dc:creator><![CDATA[Marie Muller]]></dc:creator> <dc:subject><![CDATA[Linked Data]]></dc:subject> <dc:subject><![CDATA[Ontologies]]></dc:subject> <dc:subject><![CDATA[OWL]]></dc:subject> <dc:subject><![CDATA[RDF]]></dc:subject> <dc:subject><![CDATA[SHACL]]></dc:subject> <dc:subject><![CDATA[SHACL Play]]></dc:subject> <dc:subject><![CDATA[SKOS]]></dc:subject> <dc:subject><![CDATA[SKOS Play]]></dc:subject> <dc:subject><![CDATA[Thesaurus]]></dc:subject> <dc:subject><![CDATA[Visualisation de données]]></dc:subject> <dc:subject><![CDATA[ontologie]]></dc:subject> <dc:subject><![CDATA[skos play]]></dc:subject> <dc:subject><![CDATA[thesaurus]]></dc:subject> <dc:subject><![CDATA[web sémantique]]></dc:subject> <description><![CDATA[<p>Hi, it’s Marie (aka chutjetweet here). To be short I’m a documentalist, terminologist, old (linked – open) data maniac & lil’ onto-Padawan and… just came to join Sparna’s team this early January ! To inaugurate my first article on Sparna’s blog, let’s share a little feedback of mine today about Sparna’s well-known SKOSPlay! whose 10 years’ birthday…</p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2023/03/13/2013-2023-tis-skosplays-birthday/">2013-2023 : ‘Tis SKOSPlay!’s Birthday !</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></description> <content:encoded><![CDATA[<p><span style="font-weight: 400;">Hi, it’s Marie (aka chutjetweet </span><a href="https://twitter.com/chutjetweet"><span style="font-weight: 400;">here</span></a><span style="font-weight: 400;">). To be short I’m a documentalist, terminologist, old (linked – open) data maniac & lil’ onto-Padawan and… just came to join Sparna’s team this early January !</span></p> <p><span style="font-weight: 400;">To inaugurate my first article on Sparna’s blog, let’s share a little feedback of mine today about Sparna’s well-known </span><a href="https://skos-play.sparna.fr/play/"><span style="font-weight: 400;">SKOSPlay!</span></a><span style="font-weight: 400;"> whose 10 years’ birthday is to celebrate this year !</span></p> <p><span style="font-weight: 400;">10 yo, quite a historic tool ! but more than ever actual in a context where the semantic technologies get front of the scene anew due to growing interest shown by the digital humanities movement to data interoperability projects via the standardized knowledge structuration (Wikipedia-Wikidata projects e.g., as semantic wiki devices), and also due to the last progress of artificial intelligence, now able to processing large amount of data and </span><a href="https://www.epimorphics.com/writing-ontologies-with-chatgpt/"><span style="font-weight: 400;">soon fully leveraging the potential of ontologies and knowledge graphs</span></a><span style="font-weight: 400;">.</span></p> <table> <tbody> <tr> <td><i><span style="font-weight: 400;"><a href="https://twitter.com/taxobob/status/1615594349512851456"><img class="alignnone wp-image-1561 size-full" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image5.png" alt="image5" width="878" height="321" /></a></span></i><em><span style="font-weight: 400;">From asking for a taxonomy </span><a href="https://twitter.com/mommi84/status/1631027355987656706"><span style="font-weight: 400;">to querying RDF files with an API</span></a><span style="font-weight: 400;">…</span></em></td> </tr> </tbody> </table> <p><span style="font-weight: 400;">This said, in a more practical way, semantic web standards are not always easy to manipulate as a professional – if non-initiate to SPARQL and nor confirmed data scientist, and even when you have got to deal with a simple structured list of terms !</span></p> <p><span style="font-weight: 400;">Either your data is already SKOS-standardized (great !), there sometimes come to have a gap between normalization step and visualization step that requires a bit more technical IT skills. Either – most of time – the common muggle-born is to start with a plain Excel spreadsheet, create a list, add some hierarchy, maybe other scope notes or definitions and… end far puzzled wondering how to </span><span style="font-weight: 400;">get </span><a href="https://www.w3.org/DesignIssues/diagrams/lod/597992118v2_350x350_Back.jpg"><span style="font-weight: 400;">a 5-star data vocabulary</span></a><span style="font-weight: 400;"> ⭐ !</span></p> <p> </p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2023/03/image14.gif"><img class="alignnone size-full wp-image-1577" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image14.gif" alt="image14" width="500" height="208" /></a></p> <p> </p> <p><strong>A SKOSPlay!-within-a-SKOSPlay!</strong></p> <table> <tbody> <tr> <td><a href="https://twitter.com/belett/status/1583128873877008384"><img class="alignnone wp-image-1565 size-full" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image3.png" alt="image3" width="886" height="359" /></a><em><span style="font-weight: 400;">Wink to <a href="https://twitter.com/belett">@belett</a>, anything possible now with SKOSPlay!</span></em></td> </tr> </tbody> </table> <p><span style="font-weight: 400;">Aiming at visualizing (and printing !) SKOS thesauri, taxonomies and vocabularies at the very beginning, SKOSPlay! is a full online free and open source tool leveraging semantic technologies (RDF, SPARQL, inference, Linked Data) to generate downloadable HTML or PDF documents. More and more new features have been added since then : alignments display, OWL and SKOS-XL files processing, autocomplete fields and permuted indexes generating …</span></p> <table> <tbody> <tr> <td><a href="https://twitter.com/veronikaheim/status/1612375648948846592"><img class="alignnone size-full wp-image-1566" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image7.png" alt="image7" width="884" height="237" /></a><em><span style="font-weight: 400;">Hello <a href="https://twitter.com/veronikaheim">@veronikaheim</a>, maybe SKOSPlay! could match your need ?</span></em></td> </tr> </tbody> </table> <p><span style="font-weight: 400;">… among other nice and useful developments.</span></p> <p><span style="font-weight: 400;">But as an Excel aficionada, the one that I prefer is </span><a href="https://skos-play.sparna.fr/play/convert?lang=en"><span style="font-weight: 400;">the Excel-to-RDF converter tool</span></a><span style="font-weight: 400;">.</span></p> <p><span style="font-weight: 400;">One sheet. One import. One result. Easy-peasy, happy terminologist :))</span></p> <p><span style="font-weight: 400;">(And you can even keep your custom colors templates and formats !!! </span><span style="font-weight: 400;">🦄</span><span style="font-weight: 400;"> )</span></p> <p> </p> <p><strong>Come on & let’s SKOSPlay!</strong></p> <p><span style="font-weight: 400;">Let’s figure out you want to display or construct a small vocabulary you could quickly visualize in a standardized SKOS-structured way :</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2023/03/image10-2.png"><img class="alignnone size-full wp-image-1607" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image10-2.png" alt="image10-2" width="1657" height="1079" /></a></p> <p><span style="font-weight: 400;">Now to fit in the SKOS model your data has to follow </span><a href="https://skos-play.sparna.fr/play/excel_test/excel2skos-exemple-1.xlsx"><span style="font-weight: 400;">a particular template</span></a><span style="font-weight: 400;"> you can fullfill by downloading on SKOSPlay! website.</span></p> <p><span style="font-weight: 400;">First you have to define </span><a href="https://skos-play.sparna.fr/play/convert#excel-file-structure"><span style="font-weight: 400;">the header of the template</span></a><span style="font-weight: 400;"> : the global scheme of your vocabulary, its URI, title and description :</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2023/03/image12.png"><img class="alignnone size-full wp-image-1575" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image12.png" alt="image12" width="1347" height="189" /></a></p> <p><span style="font-weight: 400;">Adding the terms of your list (with the URIs)… Here with the “@en” language indication on top of the column </span><a href="https://skos-play.sparna.fr/play/convert#languages"><span style="font-weight: 400;">as I am to create an English-French multilingual vocabulary</span></a><span style="font-weight: 400;"> :</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2023/03/image15.png"><img class="alignnone size-full wp-image-1578" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image15.png" alt="image15" width="1509" height="1021" /></a></p> <p><span style="font-weight: 400;">Recreating the arborescent structure through the Excel template (don’t mind my color palette, I always like colouring my Excel sheets to better visualize the info at a glance !).</span></p> <p><span style="font-weight: 400;">The hierarchical broader-narrower structure is to be recreated </span><a href="https://skos-play.sparna.fr/play/convert#sheet-body"><span style="font-weight: 400;">by adding a “skos:narrower” column</span></a><span style="font-weight: 400;"> (or skos:broader, as you want, with only 1 broader value per line) where you will list the different specific values front of the more generic one (separated by comas). Here I used a PREFIX too in order to shorten my http:// URIs, SKOSPlay! can process them anyway !</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2023/03/image9.png"><img class="alignnone size-full wp-image-1572" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image9.png" alt="image9" width="1943" height="1431" /></a></p> <p><span style="font-weight: 400;">Then adding a few notes and other information (multilingual values, skos:notation, any other default properties known in the converter (</span><a href="https://skos-play.sparna.fr/play/convert#prefixes"><span style="font-weight: 400;">see the documentation</span></a><span style="font-weight: 400;">) or different custom elements of yours by adding other PREFIXes :</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2023/03/image4.png"><img class="alignnone size-full wp-image-1569" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image4.png" alt="image4" width="1999" height="1269" /></a></p> <p><span style="font-weight: 400;">Your Excel template is ready to go ! quite an easy configuration in my demo here, but SKOSPlay! can also deal with skos:Collections, SKOS-XL and other </span><a href="https://skos-play.sparna.fr/play/convert#advanced-features"><span style="font-weight: 400;">advanced RDF structures</span></a><span style="font-weight: 400;"> : blank nodes, RDF lists, named graphs. And now possible to generate OWL and SHACL files with the converter too !</span></p> <p><span style="font-weight: 400;">Now it’s time to turn your (finally-not-so-dirty-<img src="https://s.w.org/images/core/emoji/72x72/1f438.png" alt="🐸" class="wp-smiley" style="height: 1em; max-height: 1em;" />) data into a SKOS-charming file. Take your favorite </span><del><span style="font-weight: 400;">magic wand</span></del><span style="font-weight: 400;"> SKOSPlay! </span><a href="https://skos-play.sparna.fr/play/convert"><span style="font-weight: 400;">Excel-to-RDF converter tool</span></a><span style="font-weight: 400;"> and load your Excel file in it (adding some optional parameters if needed).</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2023/03/image8.png"><img class="alignnone size-full wp-image-1571" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image8.png" alt="image8" width="1601" height="885" /></a></p> <p><span style="font-weight: 400;">Well done, it’s a wonderful RDF-ized vocabulary file (here in a Turtle format but you have also RDF/XML, N-Triples, N-Quads, N3 and TriG available) :</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2023/03/image1.png"><img class="alignnone size-full wp-image-1567" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image1.png" alt="image1" width="1617" height="1029" /></a></p> <p> </p> <p><strong>Wingardium Visualiza !</strong></p> <p>We’re almost done. <span style="font-weight: 400;">Go back to the website, </span><a href="https://skos-play.sparna.fr/play/upload"><span style="font-weight: 400;">tab “Play!”</span></a><span style="font-weight: 400;">, load your last RDF-serialized file and go to the next step to chose the kind of display you want to get, endly press (SKOS)Play! and … abracadataaaaaaa !</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2023/03/image2.png"><img class="alignnone size-full wp-image-1568" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image2.png" alt="image2" width="1657" height="1197" /></a></p> <p><span style="font-weight: 400;">Many different options to visualize your arborescent data. Tree, static and dynamic, but also more « professional » and printable sorts of displays like alphabetical, hierarchical or permuted views :</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2023/03/image6.png"><img class="alignnone size-full wp-image-1570" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image6.png" alt="image6" width="1999" height="1361" /></a></p> <p><span style="font-weight: 400;">And KWIC (as for « </span><span style="font-weight: 400;">KeyWord In Context ») :</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2023/03/image13.png"><img class="alignnone size-full wp-image-1576" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image13.png" alt="image13" width="1999" height="937" /></a></p> <p> </p> <p><span style="font-weight: 400;">Even possible to load an online Google spreadsheet (</span><a href="https://docs.google.com/spreadsheets/d/1MpN4tzd7S7m7Dnr7IFOz43YoWcSYqUG1/edit?usp=share_link&ouid=118425122592371390359&rtpof=true&sd=true"><span style="font-weight: 400;">mine is shared here</span></a><span style="font-weight: 400;">), just by adapting a little its URL for the converter’s need. Interesting feature in a collaborative purpose when you are team-building a vocabulary !</span></p> <p><span style="font-weight: 400;">The whole pack </span><a href="https://skos-play.sparna.fr/play/convert#documentation"><span style="font-weight: 400;">fully documented</span></a><span style="font-weight: 400;"> and findable on Sparna’s </span><a href="https://skos-play.sparna.fr/play/"><span style="font-weight: 400;">website</span></a><span style="font-weight: 400;"> & </span><a href="https://github.com/sparna-git/skos-play"><span style="font-weight: 400;">Git</span></a><span style="font-weight: 400;">. Some recent users even produced a </span><a href="http://blog.sparna.fr/2021/06/30/fair-data-collective-is-doing-cool-things-with-skos-play-and-xls2rdf/"><span style="font-weight: 400;">short video tutorial</span></a><span style="font-weight: 400;"> to show what they managed to do with different SKOSPlay! visualization tools.</span></p> <p><span style="font-weight: 400;">Already knew about SKOSPlay! ? go see his little brother, </span><a href="https://shacl-play.sparna.fr/play/home;jsessionid=40BBB04DA1F3DCC1EBFB084A08EE2924?lang=en"><span style="font-weight: 400;">SHACLPlay!</span></a><span style="font-weight: 400;"> and feel free to give us some feedback in the comments <img src="https://blog.sparna.fr/wp-includes/images/smilies/simple-smile.png" alt=":)" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span></p> <p><span style="font-weight: 400;">Happy Birthday SKOSPlay! & Long live Semantic Web !</span></p> <p><span style="font-weight: 400;">A bit more Vouvray with your nougat de Tours ?</span></p> <p><a href="https://www.my-loire-valley.com/2018/06/top-10-des-specialites-gourmandes-de-touraine/"><img class="alignnone size-full wp-image-1574" src="http://blog.sparna.fr/wp-content/uploads/2023/03/image11.png" alt="image11" width="1280" height="939" /></a></p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2023/03/13/2013-2023-tis-skosplays-birthday/">2013-2023 : ‘Tis SKOSPlay!’s Birthday !</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></content:encoded> </item> <item rdf:about="https://blog.sparna.fr/2022/10/18/dashboards-from-sparql-knowledge-graphs-using-looker-studio-google-data-studio/"> <title>Dashboards from SPARQL knowledge graphs using Looker Studio (Google Data Studio)</title> <link>https://blog.sparna.fr/2022/10/18/dashboards-from-sparql-knowledge-graphs-using-looker-studio-google-data-studio/</link> <dc:date>2022-10-18T13:02:38Z</dc:date> <dc:creator><![CDATA[Thomas Francart]]></dc:creator> <dc:subject><![CDATA[02-Outils]]></dc:subject> <dc:subject><![CDATA[SPARQL]]></dc:subject> <dc:subject><![CDATA[dashboards]]></dc:subject> <dc:subject><![CDATA[RDF]]></dc:subject> <description><![CDATA[<p>You want to demonstrate the content of your knowledge graph accessible in SPARQL ? You can easily use dashboard tools, such as Looker studio (formerly Google Data Studio) which require no development and is free to use. Of course, Sparnatural is another possible solution ! This guide will describe every step you need to know…</p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2022/10/18/dashboards-from-sparql-knowledge-graphs-using-looker-studio-google-data-studio/">Dashboards from SPARQL knowledge graphs using Looker Studio (Google Data Studio)</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></description> <content:encoded><![CDATA[<p><span style="font-weight: 400;">You want to demonstrate the content of your <strong>knowledge graph accessible in SPARQL</strong> ? You can easily use <strong>dashboard</strong> tools, such as <a href="https://datastudio.google.com" target="_blank">Looker studio</a> (formerly </span><span style="font-weight: 400;">Google Data Studio</span><span style="font-weight: 400;">) which require no development and is free to use. Of course, </span><a href="https://sparnatural.eu" target="_blank"><span style="font-weight: 400;">Sparnatural</span></a><span style="font-weight: 400;"> is another possible solution !</span></p> <p><span style="font-weight: 400;">This guide will describe every step you need to know in order to create a Looker Studio Dashboard from SPARQL queries. All along, an example will be shown to illustrate all the steps with screenshots, code text and quotes</span><span style="font-weight: 400;">.</span></p> <h1><span style="font-weight: 400;">Step 1 : Getting the SPARQL Connector </span></h1> <p><span style="font-weight: 400;">Looker Studio does not provide any native connector for SPARQL. But a community connector exists, called SPARQL Connector, made by Datafabrics LLC, that can be used to create the data source. You can find it by searching for community connectors, or use </span><a href="https://datastudio.google.com/datasources/create?connectorId=AKfycbzDHEBN9qHXPni4xO4P2cIZtyQ3rnYmzkCnVsnh9oEJrnhGe4MntBF-t1zAu2Lm-Vjc" target="_blank"><span style="font-weight: 400;">this link</span></a><span style="font-weight: 400;">. The code is available in </span><a href="https://github.com/DataFabricRus/datastudio-sparql-connector" target="_blank"><span style="font-weight: 400;">this Github repository</span></a><span style="font-weight: 400;">.</span></p> <p><span style="font-weight: 400;">You have to grant access to your Google account for SPARQL Connector before using it. You will be able to find it in the connectors panel, in the Partner Connectors section, for your next queries.</span></p> <h1><span style="font-weight: 400;">Step 2 : Connect your knowledge graph</span></h1> <p><span style="font-weight: 400;">From your report, click on “Add Data” on the bottom right of the screen to open the connector panel. Select the SPARQL Connector in the connector panel (you can also search for it by entering “sparql” in the research field).</span><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/1-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1491" src="http://blog.sparna.fr/wp-content/uploads/2022/10/1-article-Dashboard-300x150.jpg" alt="1 - article Dashboard" width="300" height="150" /></a></p> <p><span style="font-weight: 400;">Then, follow the steps to create your own data source:</span></p> <ul> <li style="font-weight: 400;"><span style="font-weight: 400;">Enter the URL of the SPARQL endpoint (the endpoint must be publicly accessible, without authentication)</span>, for example, with DBPedia:</li> </ul> <pre><span style="font-size: 10pt;"><code><span style="font-weight: 400;">https://dbpedia.org/sparql</span></code></span></pre> <ul> <li style="font-weight: 400;"><span style="font-weight: 400;">Then enter the SPARQL query, for example the following selects countries, their capital city label and their total population:<br /> </span></li> </ul> <pre><span style="font-size: 10pt;"><code><span style="font-weight: 400;">PREFIX rdfs: <</span><span style="font-weight: 400;">http://www.w3.org/2000/01/rdf-schema#</span><span style="font-weight: 400;">></span> <span style="font-weight: 400;">PREFIX dbr: <</span><span style="font-weight: 400;">http://dbpedia.org/resource/</span><span style="font-weight: 400;">></span> <span style="font-weight: 400;">PREFIX dbo: <http://dbpedia.org/ontology/></span> <span style="font-weight: 400;">SELECT ?capital_city_label ?country_label ?population</span> <span style="font-weight: 400;">WHERE {</span> <span style="font-weight: 400;">?capital_city dbo:type dbr:Capital_city.</span> <span style="font-weight: 400;">?capital_city rdfs:label ?capital_city_label.</span> <span style="font-weight: 400;">?capital_city dbo:country ?country.</span> <span style="font-weight: 400;">?country rdfs:label ?country_label.</span> <span style="font-weight: 400;">OPTIONAL {?capital_city dbo:populationMetro ?population.}</span> <span style="font-weight: 400;">FILTER (lang(?capital_city_label) = 'en')</span> <span style="font-weight: 400;">FILTER (lang(?country_label) = 'en')</span> <span style="font-weight: 400;">}</span></code></span></pre> <ul> <li style="font-weight: 400;"><span style="font-weight: 400;">For each field on your query, you have to create one field on your data source and select its type. To do so, you have to build a schema like this one:<br /> </span></li> </ul> <pre><span style="font-size: 10pt;"><code><span style="font-weight: 400;">[{"name": "capital_city_label", "dataType": "STRING"},</span> <span style="font-weight: 400;"> {"name": "country_label", "dataType": "STRING"},</span> <span style="font-weight: 400;"> {"name": "population", "dataType": "NUMBER"}]</span></code></span></pre> <p><span style="font-weight: 400;">Be sure your “name” fields match the fields you have on your query in the same order. You have to select the “dataType” you want for each of your fields, but you can change it later within Google Data Studio. Click </span><a href="https://support.google.com/looker-studio/answer/9514333?hl=en" target="_blank"><span style="font-weight: 400;">here</span></a><span style="font-weight: 400;"> to learn more about data types.</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/2-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1492" src="http://blog.sparna.fr/wp-content/uploads/2022/10/2-article-Dashboard-300x173.jpg" alt="2 - article Dashboard" width="300" height="173" /></a></p> <p><span style="font-weight: 400;">Once every field is completed, you have to click twice on “Add”. If everything goes well, the connector panel will disappear and your new data source will appear on the right of the window and is ready to use. It is defaultly named as “SPARQL Connector”.</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/3-article-Dashboard.jpg"><img class="aligncenter size-full wp-image-1493" src="http://blog.sparna.fr/wp-content/uploads/2022/10/3-article-Dashboard.jpg" alt="3 - article Dashboard" width="229" height="183" /></a></p> <p><span style="font-weight: 400;">If you made a mistake while creating your data source, the SPARQL Connector panel can :</span></p> <ul> <li style="font-weight: 400;"><span style="font-weight: 400;">Show an error message, that will indicate you the error type (endpoint, for example)</span></li> </ul> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/4-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1494" src="http://blog.sparna.fr/wp-content/uploads/2022/10/4-article-Dashboard-300x212.jpg" alt="4 - article Dashboard" width="300" height="212" /></a></p> <ul> <li style="font-weight: 400;"><span style="font-weight: 400;">Do nothing and you will have to check on your schema to be sure everything is correct.</span></li> </ul> <ul> <li style="font-weight: 400;"><span style="font-weight: 400;">Create a data source as it should do, but Google Data Studio can’t use your data source, and show you this message on your chart :</span></li> </ul> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/5-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1495" src="http://blog.sparna.fr/wp-content/uploads/2022/10/5-article-Dashboard-300x177.jpg" alt="5 - article Dashboard" width="300" height="177" /></a></p> <p><span style="font-weight: 400;">If you click on “See details” Google Data Studio will show you the error type from the connector :</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/6-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1496" src="http://blog.sparna.fr/wp-content/uploads/2022/10/6-article-Dashboard-300x210.jpg" alt="6 - article Dashboard" width="300" height="210" /></a></p> <h1><span style="font-weight: 400;">Step 3 : Transform your data</span><span style="font-weight: 400;"> </span></h1> <p><span style="font-weight: 400;">First, you can change the name of your data source by clicking on the icon on the left of the data source on Google Data Studio (the icon will change into a pencil) to open the data source edition panel.</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/7-article-Dashboard.jpg"><img class="aligncenter size-full wp-image-1497" src="http://blog.sparna.fr/wp-content/uploads/2022/10/7-article-Dashboard.jpg" alt="7 - article Dashboard" width="235" height="184" /></a></p> <p><span style="font-weight: 400;">Then, click on the top left of the new panel where the name of your data source is to modify it.</span></p> <blockquote><p><span style="font-weight: 400; font-size: 12pt;">Change name of the example data source to “Capital city Data (DBpedia)”</span></p></blockquote> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/8-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1498" src="http://blog.sparna.fr/wp-content/uploads/2022/10/8-article-Dashboard-300x171.jpg" alt="8 - article Dashboard" width="300" height="171" /></a></p> <p><span style="font-weight: 400;">You can also change your data source by modifying your parameters in SPARQL Connector. To do so, click on “EDIT CONNECTION”. The SPARQL Connector panel will open with your current parameters and you can modify them.</span></p> <p><span style="font-weight: 400;">In the data source edition panel, you can also change the type of your fields so it fits your needs (numbers can be changed as currency, text can be changed as geographic data, etc.).</span></p> <p><span style="font-weight: 400;">Be careful of your fields format, you may not be able to use your data anymore. For example, if you have a “,” as a decimal separator, you can change your data type but you won’t be able to use this field as Google Data Studio uses “.” as a decimal separator.</span></p> <p><span style="font-weight: 400;">The connector will also apply default values in query results which don’t have a value for a requested field. The default values are 0 for numbers, “” for strings and false for booleans.</span></p> <blockquote><p><span style="font-weight: 400; font-size: 12pt;">The population field on DBpedia has some null values, but the connector transformed all these values into default values (0 for numbers).</span></p></blockquote> <p><span style="font-weight: 400;">You may need to use calculated fields in order to obtain new fields or to transform data. To create one, click on “ADD A FIELD” on the right side of the same panel. Check the </span><a href="https://support.google.com/datastudio/answer/6299685?hl=en#zippy=%2Cin-this-article" target="_blank"><span style="font-weight: 400;">following page from the documentation</span></a><span style="font-weight: 400;"> to learn more about calculated fields.</span></p> <p><span style="font-weight: 400;">By using a calculated field, the population data can be switched back to the original values.</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/9-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1499" src="http://blog.sparna.fr/wp-content/uploads/2022/10/9-article-Dashboard-300x47.jpg" alt="9 - article Dashboard" width="300" height="47" /></a></p> <p><span style="font-weight: 400;">In the new panel, choose the name of your new field, enter the formula. To ensure your formula is correct, a green check appears at the bottom of the panel. If not, it will turn into a red cross.</span></p> <blockquote><p><span style="font-weight: 400; font-size: 12pt;">Enter the new field name: « population_recalculated ». Then enter the formula of the field : « NULLIF(population,0) ». In this case, if any population value is equal to 0 in the population field, it will turn into a null value in the calculated field. </span></p></blockquote> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/10-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1500" src="http://blog.sparna.fr/wp-content/uploads/2022/10/10-article-Dashboard-300x222.jpg" alt="10 - article Dashboard" width="300" height="222" /></a></p> <h1><span style="font-weight: 400;">Step 4 : Improve performance with data extraction</span></h1> <p><span style="font-weight: 400;">Once you manage to create all your calculated fields, you may have some useless fields in your data source. Those fields may decrease the speed of your dashboard. You can use the “Extract Data” to keep the fields you need in another data source that you will use to make your report.</span></p> <p><span style="font-weight: 400;">To use it, click on “Add Data” on the bottom right of the screen and select “Extract Data”.</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/20-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1510" src="http://blog.sparna.fr/wp-content/uploads/2022/10/20-article-Dashboard-300x125.jpg" alt="20 - article Dashboard" width="300" height="125" /></a></p> <p><span style="font-weight: 400;">Then, select your data source and the fields you want to keep in your report. You can make many extractions from one data source if you need. </span></p> <blockquote><p><span style="font-weight: 400; font-size: 12pt;">Choose the data source and keep only 3 fields : “capital_city_label”, “country_label” and “population_recalculated”.</span></p></blockquote> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/11-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1501" src="http://blog.sparna.fr/wp-content/uploads/2022/10/11-article-Dashboard-273x300.jpg" alt="11 - article Dashboard" width="273" height="300" /></a></p> <p><span style="font-weight: 400;">You can also configure the auto-update tool to make sure your extracted data are up to date with the latest version of your data source from SPARQL Connector. In the bottom right of the panel, switch the auto-update button then choose the occurrence of the update (between daily, weekly and monthly).</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/12-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1502" src="http://blog.sparna.fr/wp-content/uploads/2022/10/12-article-Dashboard-300x266.jpg" alt="12 - article Dashboard" width="300" height="266" /></a></p> <p><span style="font-weight: 400;">A data source defaultly named “Extract Data” appears with the fields you selected from the previous data source.</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/13-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1503" src="http://blog.sparna.fr/wp-content/uploads/2022/10/13-article-Dashboard-205x300.jpg" alt="13 - article Dashboard" width="205" height="300" /></a></p> <p><span style="font-weight: 400;">This method only works for data sources, you won’t be able to use it on blended data. Make sure to do the extraction before blending to improve your performance. To learn more about blending, see </span><a href="https://support.google.com/datastudio/answer/9061420?hl=en" target="_blank"><span style="font-weight: 400;">this page</span></a><span style="font-weight: 400;"> from the Looker Studio documentation</span><span style="font-weight: 400;">.</span></p> <h1><span style="font-weight: 400;">Step 5 : Create your dashboard </span></h1> <p><span style="font-weight: 400;">Here is a quick guide on how to create a chart in Google Data Studio. Check the </span><a href="https://support.google.com/datastudio/topic/7059081" target="_blank"><span style="font-weight: 400;">chart reference documentation</span></a><span style="font-weight: 400;"> for more information about charts available by default.</span></p> <p><span style="font-weight: 400;">To build a dashboard, you will need to select a widget first (pie chart, table, histograms, etc.). Click on “Add a chart” on the top of the screen and select the one you need.</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/14-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1504" src="http://blog.sparna.fr/wp-content/uploads/2022/10/14-article-Dashboard-300x42.jpg" alt="14 - article Dashboard" width="300" height="42" /></a></p> <blockquote><p><span style="font-weight: 400; font-size: 12pt;">Click on “Add a chart” and select a pie chart.</span></p></blockquote> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/15-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1505" src="http://blog.sparna.fr/wp-content/uploads/2022/10/15-article-Dashboard-281x300.jpg" alt="15 - article Dashboard" width="281" height="300" /></a></p> <p><span style="font-weight: 400;">Select your chart on the report, it will open a panel on the right side of the screen where you can see the chart type and modify it. You can select the data to display in the “SETUP” panel. You can also customize the chart with the “STYLE” panel.</span></p> <p><span style="font-weight: 400;">Place the chart on your dashboard anywhere you want to see it. Google Data Studio will automatically choose the data source and some fields which fit the charts, but you can choose to modify them in the “SETUP” panel on the right.</span></p> <blockquote><p><span style="font-weight: 400; font-size: 12pt;">Choose “capital_city_label” as dimension and “population recalculated” as metric.</span></p></blockquote> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/16-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1506" src="http://blog.sparna.fr/wp-content/uploads/2022/10/16-article-Dashboard-153x300.jpg" alt="16 - article Dashboard" width="153" height="300" /></a></p> <blockquote><p><span style="font-weight: 400; font-size: 12pt;">Here is the result of this configuration :</span></p></blockquote> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/17-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1507" src="http://blog.sparna.fr/wp-content/uploads/2022/10/17-article-Dashboard-300x224.jpg" alt="17 - article Dashboard" width="300" height="224" /></a></p> <p><span style="font-weight: 400;">In the “STYLE” panel, you can choose to modify some options in the chart to customize it.</span></p> <blockquote><p><span style="font-weight: 400; font-size: 12pt;">Change the number of slices from 10 to 6 to see the 5 top values + others value.</span></p></blockquote> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/18-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1508" src="http://blog.sparna.fr/wp-content/uploads/2022/10/18-article-Dashboard-172x300.jpg" alt="18 - article Dashboard" width="172" height="300" /></a></p> <p><span style="font-weight: 400;">The chart will change automatically with your new parameters as you change them.</span></p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/10/19-article-Dashboard.jpg"><img class="aligncenter size-medium wp-image-1509" src="http://blog.sparna.fr/wp-content/uploads/2022/10/19-article-Dashboard-300x238.jpg" alt="19 - article Dashboard" width="300" height="238" /></a></p> <p><span style="font-weight: 400;">Congratulations, you have successfully made your first chart!Try to get your own data sources with SPARQL Connector, make your own dashboards with Looker Studio, and send us the links !</span></p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2022/10/18/dashboards-from-sparql-knowledge-graphs-using-looker-studio-google-data-studio/">Dashboards from SPARQL knowledge graphs using Looker Studio (Google Data Studio)</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></content:encoded> </item> <item rdf:about="https://blog.sparna.fr/2022/07/20/clean-json-ld-from-rdf-using-framing/"> <title>Clean JSON(-LD) from RDF using Framing</title> <link>https://blog.sparna.fr/2022/07/20/clean-json-ld-from-rdf-using-framing/</link> <dc:date>2022-07-20T06:56:36Z</dc:date> <dc:creator><![CDATA[Thomas Francart]]></dc:creator> <dc:subject><![CDATA[Linked Data]]></dc:subject> <dc:subject><![CDATA[RDF]]></dc:subject> <dc:subject><![CDATA[SHACL Play]]></dc:subject> <dc:subject><![CDATA[Framing]]></dc:subject> <dc:subject><![CDATA[json-ld]]></dc:subject> <description><![CDATA[<p>Say you have a nice RDF knowledge graph based on an ontology, or maybe reusing ontologies, and maybe you have specified the structure of the knowledge graph with SHACL. And now you would like to expose your RDF in JSON in an API, for the average developer (or maybe you would like to produce a…</p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2022/07/20/clean-json-ld-from-rdf-using-framing/">Clean JSON(-LD) from RDF using Framing</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></description> <content:encoded><![CDATA[<p>Say you have a nice RDF knowledge graph based on an ontology, or maybe reusing ontologies, and maybe you have specified the structure of the knowledge graph with SHACL. And now you would like to <strong>expose your RDF in JSON</strong> in an API, for the average developer (or maybe you would like to produce a clean JSON to be indexed by Elastic). And the average developer (or Elastic) does not care about RDF and does not care about the “-LD” in “JSON-LD”, he just cares about JSON; and he is right ! we are here to care about the “-LD” part for him.</p> <p>So what you need is to produce a clean JSON structure from your raw RDF triples. And when I mean “clean”, I mean :</p> <ul> <li><strong>no URIs</strong>. Nowhere. No URIs in JSON keys, No URIs in types of entities, no URIs in the value of properties controlled by a closed list; the only places where it is acceptable to see a URI are : to give the id of the entities, and when making a reference to such an id of entity within the graph; even in these cases the URIs can be shortened.</li> <li><strong>no fancy JSON-LD keys</strong> like @type, @value, @datatype, @id, etc.</li> <li><strong>indented</strong>.</li> </ul> <p>You have 2 possibilities to do that :</p> <ol> <li>You develop a custom script, to either generate a JSON export of your data, or to implement the API that will query the knowledge graph, parse the triples, and generate that clean JSON output.</li> <li>You use <strong><a href="https://www.w3.org/TR/json-ld11-framing/">JSON-LD framing</a> to automate the production of a clean JSON(-LD) from RDF</strong>.</li> </ol> <p>There are 2 nice things about the solution with JSON-LD framing :</p> <ol> <li>it can be automated</li> <li>you automatically retain the RDF compatibility – because your JSON will necessarily be JSON-LD. This means you can import your nice JSON directly in a triplestore.</li> </ol> <p>The principle of JSON-LD framing is that you provide a <a href="https://www.w3.org/TR/json-ld/#the-context">JSON-LD @context </a>with an additionnal <a href="https://www.w3.org/TR/json-ld11-framing/#framing">frame specification</a> that defines how the JSON should be structured (indented), which entity to include at each level (entities can be filtered based on some criteria), and also which properties to include in each entity.</p> <p>To start with JSON-LD framing, what you need is JSON-LD. Any JSON-LD. Typically the raw JSON-LD serialization that any RDF library or triplestore will produce; that kind of ugly, messy, full-of-URIs-and-@language kind of JSON. So something like:</p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/07/Capture-d’écran-du-2022-07-19-17-30-45.png"><img class="aligncenter size-large wp-image-1465" src="http://blog.sparna.fr/wp-content/uploads/2022/07/Capture-d’écran-du-2022-07-19-17-30-45-1024x658.png" alt="Capture d’écran du 2022-07-19 17-30-45" width="650" height="418" /></a></p> <p><em>(Brrr, scary, no ?)</em></p> <p>And then what you need is the <a href="https://json-ld.org/playground/">JSON-LD playground</a> with the “Framed” tab. This will allow you to test your context and frame specification.</p> <p>And when deployed in production, what you will need is a JSON-LD library that is capable of implementing the JSON-LD framing algorithm. Implementations are listed <a href="https://json-ld.org/#developers">here</a>, and you need an implementation compatible with JSON-LD 1.1.</p> <h2>Example files</h2> <p>As an example, I use a JSON-LD file from the French National Library, the one from Les Misérables here : <a href="https://data.bnf.fr/fr/13516296/victor_hugo_les_miserables/">https://data.bnf.fr/fr/13516296/victor_hugo_les_miserables/</a> (download link at the bottom of the page).</p> <p><strong>You can download <a href="http://blog.sparna.fr/wp-content/uploads/2022/07/les_miserables_jsonld_framing_example.zip">the initial JSON example, the frame specification, and the result in a zip</a>.</strong> The zip also contains intermediate frame specifications.</p> <h2>The @context</h2> <p>We’ll start by specifying the JSON-LD context part.</p> <h3><b>Map @type to type and @id to id</b></h3> <p>Average developer will wonder what are those @type and @id keys. Re-map them straight away to type and id:</p> <blockquote><p><code>"type" : "@type",<br /> "id" : "@id",<br /> </code></p></blockquote> <p>Schema.org and lot of other specifications do that.</p> <h3><b>What about @graph ?<br /> </b></h3> <p>If you have a named graph at the top, introduced by @graph, my suggestion would be to simply remap it to a fixed key, like « data », or « entities » :</p> <blockquote><p><code>"data" : "@graph",<br /> </code></p></blockquote> <h3><b>Map RDF properties URIs to JSON keys</b></h3> <p>Get rid of any trace of URI or short URIs in JSON keys. Declare a term for every property in your graph. The simplest way to do this is to use the local part of the URI (after last “#” or “/”) as the term. Order the context by the alphabetical order of the terms. Terms for properties will usually start with a lowercase letter.</p> <p>In corner cases you may end up with the same term (such as in the example bnf-onto:subject and dcterms:subject), so in that case you need a different key, I chose “bnf-subject” here for bnf-onto:subject and kept “subject” for dcterms:subject.</p> <blockquote><p><code>"creator" : "dcterms:creator",<br /> "date" : "dcterms:date",<br /> "dateOfWork" : "rdagroup1elements:dateOfWork",<br /> "depiction" : "foaf:depiction",<br /> "description" : "dcterms:description",<br /> </code></p></blockquote> <h3><b>Map classes URIs to JSON terms</b></h3> <p>Now you want to do the same thing to get rid of any trace of URIs in the “type” of entities. Declare a term for every class in your ontology/application profile. List the classes in a different section than the properties. Terms for classes will usually start with an uppercase.</p> <blockquote><p><code>"Concept" : "skos:Concept",<br /> "Document" : "foaf:Document",<br /> "ExpositionVirtuelle" : "bnf-onto:ExpositionVirtuelle",<br /> </code></p></blockquote> <h3> <b>Declare object properties with “@type”: “@id”</b></h3> <p>Now you want to get rid of all those ugly “id”, we are only interested in listing the values. To do that, modify the mapping of the property (here “depiction”) to state its values are URIs. You need to change the mapping from</p> <blockquote><p><code>"depiction" : "foaf:depiction",</code></p></blockquote> <p>to</p> <blockquote><p><code>"depiction" : { "@value" : "foaf:depiction", "@type":"@id" },</code></p></blockquote> <p>And so parts like this :</p> <blockquote><p><code>"depiction": [<br /> {<br /> "id": "https://gallica.bnf.fr/ark:/12148/btv1b8438568p.thumbnail"<br /> },<br /> {<br /> "id": "https://gallica.bnf.fr/ark:/12148/btv1b9004781d.thumbnail"<br /> },<br /> {<br /> "id": "https://gallica.bnf.fr/ark:/12148/bpt6k5545348q.thumbnail"<br /> }<br /> ]</code></p></blockquote> <p>Will be turned into</p> <blockquote><p><code> "depiction": [<br /> "https://gallica.bnf.fr/ark:/12148/btv1b8438568p.thumbnail",<br /> "https://gallica.bnf.fr/ark:/12148/btv1b9004781d.thumbnail",<br /> "https://gallica.bnf.fr/ark:/12148/bpt6k5545348q.thumbnail",<br /> "https://gallica.bnf.fr/ark:/12148/btv1b8438570r.thumbnail"<br /> ]</code></p></blockquote> <h3><b>Map datatypes</b></h3> <p>Now you want to get rid of the @datatype information for literals. If the value of a property always uses the same datatype, which is the case 99,9% of the time, then you can change the mapping from</p> <blockquote><p><code>"property" : "http://myproperty",</code></p></blockquote> <p>to</p> <blockquote><p><code>"property" : { “@id”: "http://myproperty", “@type”:”xsd:date” }</code></p></blockquote> <p>(The example used does not have datatype properties.)</p> <h3><b>Map languages, with fixed language or when multilingual</b></h3> <p>Now let’s get rid of the @language. For this you have 2 choices : when the language is always the same for the value, you can indicate it in the context, the same way that you would do for the datatype but with the @language key. So you change from</p> <blockquote><p><code>"description" : "dcterms:description",</code></p></blockquote> <p>to</p> <blockquote><p><code>"description" : { “@id” : "dcterms:description", “@language” : “fr” }</code></p></blockquote> <p>You could even have different terms for different languages, such as :</p> <blockquote><p><code>"title_fr" : { "@id" : "dcterms:title", "@language" : "fr" },<br /> "title_en" : { "@id" : "dcterms:title", "@language" : "en" },<br /> "title" : { "@id" : "dcterms:title" },</code></p></blockquote> <p>or when you have multilingual multiple values, you can make the property a language map by declaring it this way:</p> <blockquote><p><code>"editorialNote" : { "@id" : "skos:editorialNote", "@container" : "@language" },</code></p></blockquote> <p>Which will turn the language code as a key in the JSON output:</p> <blockquote><p><code>"editorialNote": {<br /> "fr": [<br /> "BN Cat. gén. (sous : Hugo, comte Victor-Marie) : Les misérables. - . - BN Cat. gén. 1960-1969 (sous : Hugo, Victor) : idem. - . -",<br /> "Laffont-Bompiani, Oeuvres, 1994. - . - GDEL. - . -"<br /> ] },</code></p></blockquote> <p>In that case, watch out for cases where there is a value without language, it will generate a @none key.</p> <h3><b>Map controlled list values to JSON terms</b></h3> <p>By now you already get a much cleaner JSON and almost all “unnecessary” URIs have disappeared. But we still have some URI references that we can clean up : the ones that are references to controlled lists with a finite number of values.</p> <p>We can declare term mappings for those values just like we did to map properties and classes. BUT – and this is the trick, <strong>we need to change the property declaration from “@id” to “@vocab” for the replacement to happen</strong>. This is documented in the <a href="https://www.w3.org/TR/json-ld/#type-coercion">« Type coercion » section of the spec</a>.</p> <p>In our example, the mapping to languages and subjects are good candidates to be mapped to JSON terms. So we change</p> <blockquote><p><code>"language" : { "@id" : "dcterms:language", "@type":"@id" },<br /> "subject" : { "@id" : "dcterms:subject", "@type":"@id" },<br /> </code></p></blockquote> <p>to</p> <blockquote><p><code>"language" : { "@id" : "dcterms:language", "@type":"@vocab" },<br /> "subject" : { "@id" : "dcterms:subject", "@type":"@vocab" },<br /> “fre” : “http://id.loc.gov/vocabulary/iso639-2/fre”,<br /> “eng” : “http://id.loc.gov/vocabulary/iso639-2/eng”,</code></p></blockquote> <h3><b>Shorten remaining URI references<br /> </b></h3> <p>Now the only URIs left are the ids of the main entities in our graph, and references to those ids. Reference to controlled vocabularies with a limited number of values have been mapped to JSON terms. Although we cannot turn all the remaining URIs to JSON terms (because we can’t declare all possible entity URIs in the context), we can shorten them by adding a prefix mapping in the context, in our case:</p> <blockquote><p><code>"ark-https": "https://data.bnf.fr/ark:/12148/",<br /> </code></p></blockquote> <p>(I note that there are http:// and https:// URIs in the data, I don’t know why)</p> <p> </p> <h2>The frame specification</h2> <p>So now we have clean values, no URIs, no fancy JSON-LD keys. But we still don’t have a structure indented the way the average developer would expect it; and this is where the frame specification comes into play.</p> <h3><b>Define indentation and filters (and reverse properties if needed)<br /> </b></h3> <p>The frame specification acts as both a filter/selection mechanism and as a structure definition. At each level you indicate the criterias for the object to be included. In our example we have a skos:Concept (the entry in the library catalog) that is foaf:focus a Work (the Book « in the real world »), and that skos:Concept is the subject of many virtual exhibits. We want to have the Concept and the Work at first level, and under the concept the exhibits. But there is a trick : it is the virtual exhibits that points to the concept with a dcterms:subject, and we want it the other direction : Concept is_subject_of Exhibit, so we need a @reverse property.</p> <p>To do that, add the following reverse mapping declaration: (don’t modify the existing one):</p> <blockquote><p><code>"subject_of" : { "@reverse" : "dcterms:subject" },</code></p></blockquote> <p>Note the use of « @reverse » to indicate that JSON key is to be interpreted from object to subject when turned into triples.</p> <p>With that in place, we can write our frame specification, which goes right after the @context we have designed before:</p> <blockquote><p><code>"type" : ["Concept", "Work"],<br /> "subject_of" : {<br /> "type" : "ExpositionVirtuelle"<br /> }</code></p></blockquote> <p>Note how we use the terms defined in the context previously. This is to be understood the following way : <em>« at the first level, take any entity with a type of either Concept or Work, then insert a subject_of key and put inside any value that has a type ExpositionVirtuelle »</em>. This garantees the virtual exhibits objects will go under the Concept, and not above or at the same level. But this is not sufficient, as you will notice if you apply that framing that the Work is <strong>repeated</strong> under the « focus » property of the Concept, and at the root level. This is because of the default behavior of the JSON-LD playground regarding <a href="https://www.w3.org/TR/json-ld11-framing/#object-embed-flag">object embedding</a> (objects are always embeded when they are referenced)</p> <h3><b>Avoid embedding</b></h3> <p>To avoid embedding when it is undesired, we can set the « @embed » option to « @never » on the « focus » property, like so :</p> <blockquote><p><code>"type" : ["Concept", "Work"],<br /> "subject_of" : {<br /> "type" : "ExpositionVirtuelle"<br /> },<br /> "focus" : {<br /> "@embed" : "@never",<br /> "@omitDefault": true<br /> }<br /> </code></p></blockquote> <p>This tells the framing algorithm to never embed the complete entity inside the focus property, just reference the URI instead.</p> <p>Also, you will notice the use of « @omitDefault » to true; this tells the framing algorithm to omit the focus property when it has no value. Otherwise, since the Work does not have a foaf:focus property (only the Concept), then it will get a « focus » key set to null.</p> <h3><b>What about order of keys in the JSON ?</b></h3> <p>Well, I am sure this can be controlled, either by specifying explicitely all the keys you want, in the order you want them, in the frame specification, or by using an « ordered » parameter to the JSON-LD API, but that is not available in the playground.</p> <p>If you list all keys explicitely in the frame specification, don’t forget to use wildcards so that any value will match; wildcards are empty objects with « {} »:</p> <blockquote><p><code>"myProperty" : {}</code></p></blockquote> <h2>The result</h2> <p><a href="http://blog.sparna.fr/wp-content/uploads/2022/07/Capture-d’écran-du-2022-07-20-08-01-19.png"><img class="aligncenter size-full wp-image-1475" src="http://blog.sparna.fr/wp-content/uploads/2022/07/Capture-d’écran-du-2022-07-20-08-01-19.png" alt="Capture d’écran du 2022-07-20 08-01-19" width="806" height="360" /></a></p> <p>Much nicer no ? This is something you can put into the hand of an average developer.</p> <h2>Automate context generation from SHACL</h2> <p>Do you have a SHACL specification of the structure of your graph ? wouldn’t it be nice to automate the generation of the JSON-LD context from SHACL ? Maybe we could do that in <a href="https://shacl-play.sparna.fr/play/">SHACL-Play</a> ? stay tuned !</p> <p>Probably what we can automate is the context part, which can be global and unique for all your graph, but the framing specification should probably be different for each different API you need; each framing specification will then reference the same context by its URL.</p> <p><em>Image : <a href="https://gallica.bnf.fr/ark:/12148/btv1b53230250h/f1.item.r=encadrement.zoom#"><span class="title">[Encadrement ornemental] ([1er état]) / .Io. MIGon 1544. [Jean Mignon] ; [d’après Le Primatice]</span></a> <a href="https://gallica.bnf.fr/ark:/12148/btv1b53230250h">https://gallica.bnf.fr/ark:/12148/btv1b53230250h</a></em></p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2022/07/20/clean-json-ld-from-rdf-using-framing/">Clean JSON(-LD) from RDF using Framing</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></content:encoded> </item> <item rdf:about="https://blog.sparna.fr/2022/04/19/supports-de-formation-sparql-cc-by-sa/"> <title>Supports de formation SPARQL CC-BY-SA</title> <link>https://blog.sparna.fr/2022/04/19/supports-de-formation-sparql-cc-by-sa/</link> <dc:date>2022-04-19T20:55:13Z</dc:date> <dc:creator><![CDATA[Thomas Francart]]></dc:creator> <dc:subject><![CDATA[SPARQL]]></dc:subject> <description><![CDATA[<p> </p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2022/04/19/supports-de-formation-sparql-cc-by-sa/">Supports de formation SPARQL CC-BY-SA</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></description> <content:encoded><![CDATA[<p> </p> <iframe src='https://www.slideshare.net/slideshow/embed_code/251619316' width='650' height='533' allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2022/04/19/supports-de-formation-sparql-cc-by-sa/">Supports de formation SPARQL CC-BY-SA</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></content:encoded> </item> <item rdf:about="https://blog.sparna.fr/2021/06/30/fair-data-collective-is-doing-cool-things-with-skos-play-and-xls2rdf/"> <title>Fair Data Collective is doing cool things with SKOS Play and xls2rdf</title> <link>https://blog.sparna.fr/2021/06/30/fair-data-collective-is-doing-cool-things-with-skos-play-and-xls2rdf/</link> <dc:date>2021-06-30T08:34:52Z</dc:date> <dc:creator><![CDATA[Thomas Francart]]></dc:creator> <dc:subject><![CDATA[FAIR]]></dc:subject> <dc:subject><![CDATA[SKOS]]></dc:subject> <dc:subject><![CDATA[SKOS Play]]></dc:subject> <dc:subject><![CDATA[dataviz]]></dc:subject> <dc:subject><![CDATA[skos play]]></dc:subject> <dc:subject><![CDATA[xls2rdf]]></dc:subject> <description><![CDATA[<p>The FAIR Data Collective is doing cool things to enable researchers to easily publish their vocabularies as SKOS linked data while easily editing the vocabulary content in Excel spreadsheets, converted using the xls2rdf library in SKOS Play from Sparna. They turned the converter in a Github actions pipeline, so that you push your Excel spreadsheet…</p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2021/06/30/fair-data-collective-is-doing-cool-things-with-skos-play-and-xls2rdf/">Fair Data Collective is doing cool things with SKOS Play and xls2rdf</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></description> <content:encoded><![CDATA[<p>The <strong><a href="https://github.com/fair-data-collective">FAIR Data Collective</a></strong> is doing cool things to enable researchers to <a href="https://excel2rdf.readthedocs.io/en/latest/">easily publish their vocabularies as SKOS linked data</a> while easily editing the vocabulary content in Excel spreadsheets, converted using the <a href="https://github.com/sparna-git/xls2rdf">xls2rdf library</a> in <a href="https://skos-play.sparna.fr/play/">SKOS Play</a> from Sparna. They turned the converter in a Github actions pipeline, so that you push your Excel spreadsheet based on a <a href="https://github.com/fair-data-collective/excel2rdf-template/blob/main/vocabulary.xlsx">provided Excel template</a> to your Github repo, and <em>abracadabra !</em> you get a SKOS RDF file that can be loaded in a Fuseki instance and visible in Skosmos, and even submitted to BioPortal or OntoPortal.</p> <p>Here is also <a href="https://www.youtube.com/watch?v=NkgC3yXKgVU"><strong>nice video</strong> showing how to visualize such a SKOS vocabulary in SKOS Play visualization tools</a>.</p> <p>Thanks to <a href="https://www.linkedin.com/in/niva83">Nikola Vasiljevic</a> and <a href="https://www.linkedin.com/in/johngraybeal">John Graybeal</a> from FAIR Data Collective for this nice integration !</p> <p>You can check out the <a href="https://www.linkedin.com/company/fair-data-collective/">Fair Data Collective page on LinkedIn</a> : <em>« Making practical and easy-to-use FAIR data solutions »</em>.</p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2021/06/30/fair-data-collective-is-doing-cool-things-with-skos-play-and-xls2rdf/">Fair Data Collective is doing cool things with SKOS Play and xls2rdf</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></content:encoded> </item> <item rdf:about="https://blog.sparna.fr/2021/03/24/alimenter-talend-avec-sparql-sur-wikidata/"> <title>Alimenter Talend avec SPARQL (sur Wikidata)</title> <link>https://blog.sparna.fr/2021/03/24/alimenter-talend-avec-sparql-sur-wikidata/</link> <dc:date>2021-03-24T09:40:55Z</dc:date> <dc:creator><![CDATA[Thomas Francart]]></dc:creator> <dc:subject><![CDATA[RDF]]></dc:subject> <dc:subject><![CDATA[Talend]]></dc:subject> <dc:subject><![CDATA[ETL]]></dc:subject> <dc:subject><![CDATA[SPARQL]]></dc:subject> <dc:subject><![CDATA[talend]]></dc:subject> <dc:subject><![CDATA[wikidata]]></dc:subject> <description><![CDATA[<p>Dans le billet précédent nous avons vu comment Talend pouvait être utilisé pour convertir des données existantes vers du RDF/XML pour alimenter un graphe de connaissances. Ici nous allons voir… exactement l’inverse ! Comment alimenter Talend avec une requête SPARQL ? En d’autres termes comment votre graphe de connaissances RDF pourra servir d’entrée à un…</p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2021/03/24/alimenter-talend-avec-sparql-sur-wikidata/">Alimenter Talend avec SPARQL (sur Wikidata)</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></description> <content:encoded><![CDATA[<p>Dans le billet précédent nous avons vu <a href="http://blog.sparna.fr/2021/03/17/rdf-talend-tutorial/">comment Talend pouvait être utilisé pour convertir des données existantes vers du RDF/XML</a> pour alimenter un graphe de connaissances. Ici nous allons voir… exactement l’inverse ! <strong>Comment alimenter Talend avec une requête SPARQL</strong> ? En d’autres termes <em>comment votre graphe de connaissances RDF pourra servir d’entrée à un traitement de conversion de données pour exporter des données tabulaires, alimenter d’autres bases, ou se combiner avec d’autres flux.</em></p> <p>Le principe est simple : arriver à <strong>exécuter une requête SPARQL puis traiter les résultats correspondants pour en faire un tableau de données</strong>. Ce tableau de données pourra ensuite être exporté, combiné, enregistré, comme vous le souhaitez.</p> <p>Pour illustrer cela nous allons interroger <a href="http://wikidata.org"><strong>Wikidata</strong></a> au travers de son <a href="https://query.wikidata.org">service d’interrogation SPARQL</a> en utilisant sa première requête d’exemple qui récupère… les chats !</p> <p>La requête est la suivante, et voici le <a href="https://query.wikidata.org/#%23Chats%0ASELECT%20%3Fitem%20%3FitemLabel%20%0AWHERE%20%0A%7B%0A%20%20%3Fitem%20wdt%3AP31%20wd%3AQ146.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D">lien direct pour l’exécuter dans Wikidata</a> :</p> <pre><span style="font-size: 10pt;">SELECT ?item ?itemLabel</span> <span style="font-size: 10pt;">WHERE {</span> <span style="font-size: 10pt;"> ?item wdt:P31 wd:Q146.</span> <span style="font-size: 10pt;"> SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }</span> <span style="font-size: 10pt;">}</span> <span style="font-size: 10pt;">LIMIT 10</span></pre> <p>Vous pouvez télécharger le job présenté ici dans <a href="https://github.com/sparna-git/talend-rdf-components/tree/main/SPARQL_CSV_test/BUILDERRDF">ce repository Github d’exemple</a>, et l’importer directement dans Talend.</p> <p>Nous allons utiliser les composants Talend suivant :</p> <ul> <li><a href="https://help.talend.com/r/4~rC6oITH8avsLVct2LPSA/9XSS~cm5dHaZcH2mrWSR1w"><strong>tRESTClient</strong></a> envoie des requêtes HTTP à un service REST et retourne les réponses; en effet, un service SPARQL n’est ni plus ni moins qu’une URL où on passe un paramètre “query”, comme spécifié par le <a href="https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/">protocole SPARQL</a>.</li> <li><a href="https://help.talend.com/r/AsV4_TX51DXfRElBkPQ4Qw/Pc9RZi6IiWw1Kb~Jf0bE0Q"><strong>tExtractXMLField</strong></a> pour traiter le format XML de réponse SPARQL; en effet, le <a href="https://www.w3.org/TR/2013/REC-rdf-sparql-XMLres-20130321/">format de réponse d’un service SPARQL</a> est lui-aussi standardisé, en XML ou en JSON;</li> <li><a href="https://help.talend.com/r/atTvdntoupqchAynyb03~Q/cGhZ8PINK8GErF~qZbpprA"><strong>tFileOutputDelimited</strong></a> pour simplement écrire le résultat dans un fichier de sortie.</li> </ul> <p style="text-align: left;"><a href="http://blog.sparna.fr/wp-content/uploads/2021/03/1_Flow.png"><img class="size-full wp-image-1410 aligncenter" src="http://blog.sparna.fr/wp-content/uploads/2021/03/1_Flow.png" alt="1_Flow" width="605" height="76" /></a></p> <h2>Création d’un Job</h2> <p>Pour commencer, vous devez créer un nouveau job.</p> <ul> <li>Faite un clic droit sur <strong>Jobs</strong> dans le panneau de gauche<strong>. </strong>choisissez l’option <strong>Créer un Job</strong>.</li> </ul> <p><a href="http://blog.sparna.fr/wp-content/uploads/2021/03/2_CréerJob.png"><img class="aligncenter size-medium wp-image-1411" src="http://blog.sparna.fr/wp-content/uploads/2021/03/2_CréerJob-300x195.png" alt="2_CréerJob" width="300" height="195" /></a></p> <ul> <li> Remplissez les champs nécessaires de la fenêtre <strong>Nouveau Job</strong> et cliquez sur le bouton finish.</li> </ul> <p><a href="http://blog.sparna.fr/wp-content/uploads/2021/03/3_ParametrerJob.png"><img class="aligncenter size-medium wp-image-1412" src="http://blog.sparna.fr/wp-content/uploads/2021/03/3_ParametrerJob-300x184.png" alt="3_ParametrerJob" width="300" height="184" /></a></p> <h2> Appel SPARQL avec tRESTClient</h2> <ul> <li>Ajoutez au job le composant <strong>tRESTClient</strong>.</li> <li>Cliquez deux fois sur le composant <strong>tRESTClient</strong>, allez à la propriété <strong>Paramètres simple</strong> et remplissez les paramètres suivants:</li> </ul> <ol> <ol> <li><strong>URL</strong>: L’URL du service SPARQL de Wikidata est <strong><a href="https://query.wikidata.org/sparql">https://query.wikidata.org/sparql</a></strong> .</li> <li><strong>Méthode HTTP</strong>: Choisissez la méthode HTTP <strong>GET</strong></li> <li><strong>Paramètre de la Requête</strong>: Nous devons ajouter le paramètre “query”, cliquez sur le bouton plus [+], et dans la colonne Nom entrez “query”. Dans la <strong>colonne Valeur</strong> vous allez saisir la requête SPARQL.</li> </ol> </ol> <p><span style="color: #ff0000;"><strong>Attention!</strong></span> La requête SPARQL est une chaîne de caractères Java, vous devez donc : 1/ L’entourer avec des guillemets doubles 2/ ajouter le caractère d’échappement <strong>\</strong> avant les guillemets dans la requête et 3/ écrire la requête sur une seule ligne. Voici la chaîne de caractères correspondante :</p> <pre><span style="font-size: 10pt;"><span style="font-weight: 400;">“SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q146. SERVICE wikibase:label { bd:serviceParam wikibase:language </span><b>\</b><span style="font-weight: 400;">"[AUTO_LANGUAGE],en</span><b>\</b><span style="font-weight: 400;">". } } LIMIT 10”</span></span></pre> <p> </p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2021/03/4_ParametrerComponentSource.png"><img class="aligncenter size-large wp-image-1413" src="http://blog.sparna.fr/wp-content/uploads/2021/03/4_ParametrerComponentSource-1024x430.png" alt="4_ParametrerComponentSource" width="650" height="273" /></a><a href="http://blog.sparna.fr/wp-content/uploads/2021/03/4_ParametrerComponentSource.png"><br /> </a></p> <h2>Transformation des résultats SPARQL avec tExtractXMLField</h2> <ul> <li>Ajoutez dans le projet un composant <strong>tExtractXMLField</strong>.</li> <li>Connectez le composant tRESTClient au tExtractXMLField.</li> </ul> <p>Nous allons paramétrer le tExtractXMLField :</p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2021/03/5_tExtractXMLField_Colonne.png"><img class="aligncenter size-large wp-image-1414" src="http://blog.sparna.fr/wp-content/uploads/2021/03/5_tExtractXMLField_Colonne-1024x408.png" alt="5_tExtractXMLField_Colonne" width="650" height="259" /></a></p> <ol> <li style="font-weight: 400;"><span style="font-weight: 400;">Cliquez sur le bouton <strong>Modifier le schéma</strong> pour ouvrir la fenêtre des colonnes d’entrée et sortie du composant <strong>tExtractXMLField</strong>. </span></li> <li style="font-weight: 400;"><span style="font-weight: 400;">Ajoutez deux nouvelles colonnes <strong>Uri </strong>et <strong>Label </strong>de <strong>type String</strong> avec le bouton <strong>plus [+] </strong>et cliquez sur le bouton Ok. <a href="http://blog.sparna.fr/wp-content/uploads/2021/03/6_tExtractXMLField_Colonne_sortie.png"><img class="aligncenter size-large wp-image-1415" src="http://blog.sparna.fr/wp-content/uploads/2021/03/6_tExtractXMLField_Colonne_sortie-1024x408.png" alt="6_tExtractXMLField_Colonne_sortie" width="650" height="259" /></a></span></li> <li style="font-weight: 400;">Allez à <strong>Paramètres simple</strong> et modifiez les options suivantes:</li> </ol> <ul> <li><strong>Champ XML</strong>: Choisissez le champs “<strong>body”</strong>, qui est le champ qui contient la réponse à l’appel SPARQL du composant précédent;</li> <li><strong>Requête XPath boucle</strong>: Saisissez « /sparql/results/result » qui est d’après la spec du format de résultat SPARQL le chemin vers chaque <strong>ligne de résultats</strong> dans la réponse.</li> <li>La table <strong>Mapping</strong> : <em>c’est ici que tout se joue !!! ce mapping va vous permettre d’associer les colonnes de votre résultat SPARQL au champs de sortie du composant, par le biais de chemins XPath</em>: <ol> <li>Pour la colonne <strong>Uri</strong> la valeur de la colonne Requête Xpath sera <strong>« binding[@name=’item’]/uri »</strong></li> <li>pour la colonne <strong>Label</strong> la valeur de la colonne Requête Xpath sera <strong>« binding[@name=’itemLabel’]/literal »</strong>.</li> <li>Si la requête SPARQL retournait plus de colonnes, il faudrait ajouter ici les mappings correspondants pour alimenter les autres colonnes du résultat.</li> </ol> </li> </ul> <p><a href="http://blog.sparna.fr/wp-content/uploads/2021/03/7_tExtractXMLField_Component.png"><img class="aligncenter size-large wp-image-1416" src="http://blog.sparna.fr/wp-content/uploads/2021/03/7_tExtractXMLField_Component-1024x297.png" alt="7_tExtractXMLField_Component" width="650" height="189" /></a></p> <h2> Génération du fichier de sortie</h2> <ul> <li>Ajoutez le composant de sortie <strong>tFileOutputDelimited</strong>.</li> <li>Connectez le composant <strong>tExtractXMLField </strong>au composant <strong>tFileOutputDelimited</strong>.</li> <li>Paramétrez le composant dans la section de <strong>Paramètres simple</strong> → <strong>Nom de fichier</strong>: le chemin dans lequel vous souhaitez sauvegarder le fichier de sortie.</li> </ul> <p><a href="http://blog.sparna.fr/wp-content/uploads/2021/03/8_tFileOutputDelimited.png"><img class="aligncenter size-large wp-image-1417" src="http://blog.sparna.fr/wp-content/uploads/2021/03/8_tFileOutputDelimited-1024x175.png" alt="8_tFileOutputDelimited" width="650" height="111" /></a></p> <h2> Lancer le Job</h2> <ul> <li>Allez à la section <strong>Exécuter</strong>.</li> <li>Cliquez sur le bouton <strong>Exécuter.</strong></li> </ul> <p><a href="http://blog.sparna.fr/wp-content/uploads/2021/03/9_LancerJob.png"><img class="aligncenter size-large wp-image-1418" src="http://blog.sparna.fr/wp-content/uploads/2021/03/9_LancerJob-1024x222.png" alt="9_LancerJob" width="650" height="141" /></a></p> <h2> Profitez !</h2> <p>Naviguez vers l’emplacement du fichier pour le récupérer.</p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2021/03/10_RouteFile.png"><img class="aligncenter size-large wp-image-1419" src="http://blog.sparna.fr/wp-content/uploads/2021/03/10_RouteFile-1024x439.png" alt="10_RouteFile" width="650" height="279" /></a></p> <p><strong>Et voilà le résultat :</strong></p> <p> </p> <pre><span style="font-size: 10pt;">Uri;Label</span> <span style="font-size: 10pt;"> http://www.wikidata.org/entity/Q378619;CC</span> <span style="font-size: 10pt;"> http://www.wikidata.org/entity/Q498787;Muezza</span> <span style="font-size: 10pt;"> http://www.wikidata.org/entity/Q677525;Orangey</span> <span style="font-size: 10pt;"> http://www.wikidata.org/entity/Q851190;Mrs. Chippy</span> <span style="font-size: 10pt;"> http://www.wikidata.org/entity/Q1050083;Catmando</span> <span style="font-size: 10pt;"> http://www.wikidata.org/entity/Q1201902;Tama</span> <span style="font-size: 10pt;"> http://www.wikidata.org/entity/Q1207136;Dewey Readmore Books</span> <span style="font-size: 10pt;"> http://www.wikidata.org/entity/Q1371145;Socks</span> <span style="font-size: 10pt;"> http://www.wikidata.org/entity/Q1386318;F. D. C. Willard</span> <span style="font-size: 10pt;"> http://www.wikidata.org/entity/Q1413628;Nora</span></pre> <p>Vous savez donc maintenant <strong>comment alimenter Talend à partir d’une base accessible en SPARQL, en quelques clics et sans code</strong> ! Cela permet de valoriser votre graphe de connaissances pour l’intégrer dans le reste du système d’information.</p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2021/03/24/alimenter-talend-avec-sparql-sur-wikidata/">Alimenter Talend avec SPARQL (sur Wikidata)</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></content:encoded> </item> <item rdf:about="https://blog.sparna.fr/2020/03/11/shacl-play-online-shacl-rdf-validator/"> <title>SHACL Play! free online SHACL validator for RDF data</title> <link>https://blog.sparna.fr/2020/03/11/shacl-play-online-shacl-rdf-validator/</link> <dc:date>2020-03-11T14:00:37Z</dc:date> <dc:creator><![CDATA[Thomas Francart]]></dc:creator> <dc:subject><![CDATA[SHACL]]></dc:subject> <dc:subject><![CDATA[SHACL Play]]></dc:subject> <dc:subject><![CDATA[RDF]]></dc:subject> <dc:subject><![CDATA[validation]]></dc:subject> <description><![CDATA[<p>SHACL Play! at http://shacl-play.sparna.fr/ is a free online RDF validator based on SHACL. It encapsulates TopQuadrant’s Java SHACL implementation as the actual validation engine. The code of SHACL Play is available on Github. Give the input RDF data to be validated, by uploading an RDF file, pointing to a URL, or copy/pasting inline data; Give the…</p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2020/03/11/shacl-play-online-shacl-rdf-validator/">SHACL Play! free online SHACL validator for RDF data</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></description> <content:encoded><![CDATA[<p><strong>SHACL Play!</strong> at <strong><a href="http://shacl-play.sparna.fr/">http://shacl-play.sparna.fr/</a></strong> is a free online RDF validator based on <a href="https://www.w3.org/TR/shacl/">SHACL</a>. It encapsulates <a href="https://github.com/TopQuadrant/shacl">TopQuadrant’s Java SHACL implementation</a> as the actual validation engine. The code of SHACL Play is <a href="https://github.com/sparna-git/shacl-play">available on Github</a>.</p> <ol> <li>Give the input RDF data to be validated, by uploading an RDF file, pointing to a URL, or copy/pasting inline data;</li> <li>Give the SHACL rules to use for validation, by uploading a file, pointing to a URL, copy/pasting inline data, or selecting the shapes from the catalog (see below);</li> <li>Validate, and get a human-readable report generated from the <a href="https://www.w3.org/TR/shacl/#validation-report">SHACL raw validation report</a>;</li> <li>Access to the report in its RDF or CSV variant;</li> </ol> <p>Here is a screenshot of how the validation report looks like :</p> <p><a href="http://blog.sparna.fr/wp-content/uploads/2020/03/shacl-play-validation-report.png"><img class="aligncenter size-large wp-image-1305" src="http://blog.sparna.fr/wp-content/uploads/2020/03/shacl-play-validation-report-1024x603.png" alt="shacl-play-validation-report" width="650" height="383" /></a></p> <p><strong>SHACL Play!</strong> features :</p> <ol> <li><strong>Free, no registration required, no limit</strong>;</li> <li>Easy-to-use <strong>input form</strong>;</li> <li><strong>Multiple RDF serialisations</strong> supported (Turtle, RDF/XML, n3, TriG);</li> <li><strong>Versatile input methods</strong> for both RDF data and SHACL rules (upload, URL, copy/paste, catalog);</li> <li><strong>Human-readable validation report</strong>, for quick analysis of the issues to be fixed in the data (or adjusted in the shapes);</li> <li><strong>Downloadable validation reports</strong> in CSV or raw RDF;</li> <li><strong>Asynchronous validation</strong> to avoid timeouts, for large datasets (greater than 100000 triples);</li> <li><strong>Permalinks</strong> to validation reports when both RDF dataset and SHACL rules are online;</li> <li><strong>Catalog of online public shapes</strong> for documentation and quick validation (see below);</li> </ol> <p>SHACL Play also features a command-line variant (see the <a href="https://github.com/sparna-git/shacl-play/wiki">documentation on the Github wiki</a>).</p> <p>Future features could include :</p> <ol> <li>Improved display of validation report, with possibly different styles of report (depending on the « styles » of the Shapes):</li> <li>Human-readable display of a SHACL graph;</li> <li>Online data transformation engine based on <a href="https://www.w3.org/TR/shacl-af/">SHACL Rules</a>, with a first focus on converting an OWL ontology to SHACL constraints (see this <a href="https://www.topquadrant.com/from-owl-to-shacl-in-an-automated-way/">excellent description of one possible set of rules to derive SHACL shapes from an OWL ontology</a>, by Irene Polikoff from TopQuadrant);</li> </ol> <p> </p> <h3>The Shapes Catalog</h3> <p>SHACL Play includes a <a href="http://shacl-play.sparna.fr/catalog">catalog of online Shapes</a>. The catalog is collaboratively editable by modifying the <a href="https://github.com/sparna-git/SHACL-Catalog/blob/master/shacl-catalog.ttl">Shapes Catalog source file on Github</a>, through pull requests.</p> <p>Adding an entry to the catalog allows to:</p> <ul> <li>See the shapes listed in the catalog page;</li> <li>Get a form to directly validate data against these Shapes, e.g. if you want to validate your Shapes against « SHACL for SHACL » you can go to <a href="http://shacl-play.sparna.fr/validate?shapes=shsh">http://shacl-play.sparna.fr/validate?shapes=shsh</a>;</li> <li>Get a direct permaling to the validation report if the validated RDF data is also online, so there even no need to submit anything through a form to get a validation report. e.g. <a href="http://shacl-play.sparna.fr/validate?shapes=shaclplay-catalog&url=https://raw.githubusercontent.com/sparna-git/SHACL-Catalog/master/shacl-catalog.ttl">http://shacl-play.sparna.fr/validate?shapes=shaclplay-catalog&url=https://raw.githubusercontent.com/sparna-git/SHACL-Catalog/master/shacl-catalog.ttl</a> is the direct link for the validation of the <a href="https://github.com/sparna-git/SHACL-Catalog/blob/master/shacl-catalog.ttl">Shapes Catalog source file</a> against the <a href="http://shacl-play.sparna.fr/resources/shapes/shacl-play-shapes-catalog.ttl">Shapes Catalog SHACL file</a>;</li> </ul> <h3>Another SHACL Validator</h3> <p>Another SHACL validator is the SHACL playground is at <a href="https://shacl.org/playground/">https://shacl.org/playground/</a>. However the UI is too technical for newcomers, and it relies on a Javascript validator in the browser, thus I am not sure it would be capable of validating large Datasets.</p> <h3>How to edit/create SHACL rules ?</h3> <p>You need to create your own set of SHACL rules ? You don’t have a tool to do that and you don’t want to write Turtle file by hand ? One technique I use is to edit them in an Excel spreadsheet that is converted in RDF using <a href="http://labs.sparna.fr/skos-play/convert">SKOS Play Excel 2 RDF converter</a>. Here are 1 example of such a file : <a href="http://openarchaeo.huma-num.fr/federation/resources/shapes/OpenArchaeo-Shapes.xlsx">OpenArchaeo shapes</a> in Excel.</p> <p>You could start from this template and modify it to create your own Shapes Graph.</p> <p><strong>Now let’s SHACL Play!</strong></p> <p> </p> <p><em>Post illustration : « Calculateur » Bulletin des sciences mathématiques 1922, found from https://www.bnf.fr/fr/mathematiques-informatique-et-sciences-du-numerique, from Gallica at <a href="https://gallica.bnf.fr/ark:/12148/bpt6k9620547z/f123.item">https://gallica.bnf.fr/ark:/12148/bpt6k9620547z/f123.item</a><br /> </em></p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2020/03/11/shacl-play-online-shacl-rdf-validator/">SHACL Play! free online SHACL validator for RDF data</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></content:encoded> </item> <item rdf:about="https://blog.sparna.fr/2020/02/20/semantic-markdown/"> <title>Semantic Markdown Specifications</title> <link>https://blog.sparna.fr/2020/02/20/semantic-markdown/</link> <dc:date>2020-02-20T14:46:34Z</dc:date> <dc:creator><![CDATA[Thomas Francart]]></dc:creator> <dc:subject><![CDATA[RDF]]></dc:subject> <dc:subject><![CDATA[Schema.org]]></dc:subject> <dc:subject><![CDATA[json-ld]]></dc:subject> <dc:subject><![CDATA[markdown]]></dc:subject> <dc:subject><![CDATA[rdfa]]></dc:subject> <dc:subject><![CDATA[schema.org]]></dc:subject> <description><![CDATA[<p>Markdown (MD) has become the de facto standard syntax for writing on the web, pushed by Github and StackOverflow. It is heavily used everytime one need to enter a comment, or write a simple (document-style) HTML page. What if we could embed semantic annotations in a markdown document ? We would get Semantic Markdown !…</p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2020/02/20/semantic-markdown/">Semantic Markdown Specifications</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></description> <content:encoded><![CDATA[<p>Markdown (MD) has become the de facto standard syntax for writing on the web, pushed by <a href="http://github.com">Github</a> and <a href="http://stackoverflow.com">StackOverflow</a>. It is heavily used everytime one need to enter a comment, or write a simple (document-style) HTML page. What if we could embed semantic annotations in a markdown document ? We would get <strong>Semantic Markdown</strong> ! imagine the best of both worlds between <em>human readable/writable documents and machine-readable/writable (RDF) structured data</em>. We could feed an RDF knowledge graph that is coupled with our set of MD documents, and we would have an <em>easy way to put structure in content</em>.</p> <p>I see a lot of potential in this, and already see some use-cases. Unfortunately I don’t have the bandwith, nor the full skills to make this happens. So I am just writing this in the hope that the idea is implemented by someone, or that someone tells me it is totally nonsense…</p> <p>Here are the semantic annotations use-cases I see with such a Semantic Markdown :</p> <ol> <li>Annotate a span or title that corresponds to an entity ;</li> <li>Annotate a piece of text with an existing URI for an entity;</li> <li>Create some statements on an entity;</li> </ol> <p>Note that I am not necessarily looking for a way to produce RDFa annotations on the generated HTML, although that would be nice for a schema.org use-case. Any conversion route from the original semantically annotated markdown to a set of triples would be fine.</p> <p>My source of inspiration is essentially <a href="https://kramdown.gettalong.org/syntax.html#span-ials">Span Inline Attribute Lists » from the Kramdown syntax</a>.</p> <h2>Annotate a span that corresponds to an entity</h2> <p>This piece of Semantic Markdown :</p> <pre>Tomorrow I am travelling to _Berlin_ {.schema:Place}</pre> <p>When interprered by a Semantic Markdown parser would produce this set of triples :</p> <pre>_:1 a <http://schema.org/Place> . _:1 rdfs:label “Berlin” .</pre> <p>The span immediately preceding the « {.xxxx} » annotation is taken as the label of the entity. The use of rdfs:label to store the label of the entity could be subject to a parser configuration option.</p> <p>One could imagine that a semantic markdown parser relies on the same <a href="https://www.w3.org/2011/rdfa-context/rdfa-1.1">RDFa Initial Context</a> to interpret the « schema: » prefix without further declaration. But what about other ontologies ? we would need some kind of prefixes / vocab declaration somewhere in the document, just like in RDFa.</p> <p>Note also that Markdown parser supporting the « {.xxxxx} » syntax will also insert this value as a CSS class on the corresponding span, so we win both on the CSS level and the semantic level.</p> <h2>Annotate a title</h2> <p>Similarly, we could annotate a title</p> <pre>### European Semantic Web Conference {.schema:Event} Lorem ipsum...</pre> <p>In that case, the full content of the title is interpreted as the label of the entity :</p> <pre>_:1 a <http://schema.org/Event> . _:1 rdfs:label “European Semantic Web Conference” .</pre> <h2>Annotate with a known URI</h2> <pre>Tomorrow I am travelling to [Berlin](https://www.wikidata.org/wiki/Q64) {.schema:Place}</pre> <p>Would yield</p> <pre><https://www.wikidata.org/wiki/Q64> a <http://schema.org/Place> . <https://www.wikidata.org/wiki/Q64> rdfs:label “Berlin” .</pre> <h2>Describe an entity</h2> <p>If a list follows an annotated entity, then it should be interpreted as a set of predicates with this entity as subject :</p> <pre>### Specifications Meeting {.schema:Event} * Date : _11/10_{.schema:startDate} * Place {.schema:location} : Our office, Street name, 75014 Paris * Meeting participants : {.schema:attendee} * Thomas Francart{.schema:Person} * [Someone else](https://www.wikidata.org/wiki/Q80) * Tim Foo * Description : Some information not annotated ### titre suivant Lorem ipsum... </pre> <p>Should yield :</p> <pre>_:1 a <http://schema.org/Event> . _:1 rdfs:label “Specifications Meeting” . _:1 <http://schema.org/startDate> "11/10" . _:1 <http://schema.org/location> "Our office, Street name, 75014 Paris" . _:1 <http://schema.org/attendee> _:2 , <https://www.wikidata.org/wiki/Q80>, _:3 . # attendee that is annotated : we know a type and a name _:2 a <http://schema.org/Person> _:2 rdfs:label “Thomas Francart” . # attendee that is annotated with a URI : we keep the URI and add a label to it (?) <https://www.wikidata.org/wiki/Q80> rdfs:label "Someone else" . # attendee that is not annotated - but we know he was an attendee _:3 rdfs:label "Tim Foo" . </pre> <ol> <li>If a list follows a title or a paragraph that contains an annotated entity…</li> <li>Then items in this list correspond to a property of this entity…</li> <li>And can be annotated with a property</li> <li>The property annotation can be placed on an inline text, or right before or after a `:` or `=` character</li> <li>If the property annotation immediatly precedes a list, then all items in this list would be considered values for that property, and in that case could be either : entities annotated with a type, or entities identified by a URI, or entites not annotated (and in that case we would consider them as blank nodes with only a label</li> </ol> <h2>Related works</h2> <p><a href="https://blogs.pjjk.net/phil/metadata-for-markdown-mkdocs/">Metadata for Markdown</a>, a Python extension to generated JSON-LD from YAML section in a Markdown document.</p> <p><strong>EDIT</strong> : PanDoc divs and spans : <a href="https://pandoc.org/MANUAL.html#divs-and-spans">https://pandoc.org/MANUAL.html#divs-and-spans</a></p> <p>I like the <span> syntax :</p> <p><code>[This is *some text*]{.class key="val"}</code></p> <p>This is close ! but still would not produce triples, unless one writes explicitely RDFa :</p> <p><code>My name is [Thomas Francart]{typeof="schema:Person"}</code></p> <p>Cet article <a rel="nofollow" href="https://blog.sparna.fr/2020/02/20/semantic-markdown/">Semantic Markdown Specifications</a> est apparu en premier sur <a rel="nofollow" href="https://blog.sparna.fr">Sparna Blog</a>.</p> ]]></content:encoded> </item> </rdf:RDF>