<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sparna Blog &#187; dashboards</title>
	<atom:link href="https://blog.sparna.fr/tag/dashboards/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.sparna.fr</link>
	<description>Web de données &#124; Architecture de l&#039;information &#124; Accès aux connaissances</description>
	<lastBuildDate>Tue, 03 Jun 2025 10:30:27 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<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>
		<comments>https://blog.sparna.fr/2022/10/18/dashboards-from-sparql-knowledge-graphs-using-looker-studio-google-data-studio/#comments</comments>
		<pubDate>Tue, 18 Oct 2022 13:02:38 +0000</pubDate>
		<dc:creator><![CDATA[Thomas Francart]]></dc:creator>
				<category><![CDATA[02-Outils]]></category>
		<category><![CDATA[SPARQL]]></category>
		<category><![CDATA[dashboards]]></category>
		<category><![CDATA[RDF]]></category>

		<guid isPermaLink="false">http://blog.sparna.fr/?p=1481</guid>
		<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&#8230;</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: &lt;</span><span style="font-weight: 400;">http://www.w3.org/2000/01/rdf-schema#</span><span style="font-weight: 400;">&gt;</span>
<span style="font-weight: 400;">PREFIX dbr: &lt;</span><span style="font-weight: 400;">http://dbpedia.org/resource/</span><span style="font-weight: 400;">&gt;</span>
<span style="font-weight: 400;">PREFIX dbo: &lt;http://dbpedia.org/ontology/&gt;</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&rsquo;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: &laquo;&nbsp;population_recalculated&nbsp;&raquo;. Then enter the formula of the field : &laquo;&nbsp;NULLIF(population,0)&nbsp;&raquo;. 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>
			<wfw:commentRss>https://blog.sparna.fr/2022/10/18/dashboards-from-sparql-knowledge-graphs-using-looker-studio-google-data-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
