<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>OUseful.Info, the blog... &#187; Dashboard Views as Data Source Directories: Open Data Communities</title>
	<atom:link href="http://blog.ouseful.info/2012/05/29/dashboard-views-as-data-source-directories-open-data-communities/feed/?withoutcomments=1" rel="self" type="application/rss+xml" />
	<link>http://blog.ouseful.info</link>
	<description>Trying to find useful things to do with emerging technologies in open education</description>
	<lastBuildDate>Sat, 25 May 2013 00:12:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.ouseful.info' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>OUseful.Info, the blog... &#187; Dashboard Views as Data Source Directories: Open Data Communities</title>
		<link>http://blog.ouseful.info</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.ouseful.info/osd.xml" title="OUseful.Info, the blog..." />
	<atom:link rel='hub' href='http://blog.ouseful.info/?pushpress=hub'/>
		<item>
		<title>Dashboard Views as Data Source Directories: Open Data Communities</title>
		<link>http://blog.ouseful.info/2012/05/29/dashboard-views-as-data-source-directories-open-data-communities/</link>
		<comments>http://blog.ouseful.info/2012/05/29/dashboard-views-as-data-source-directories-open-data-communities/#comments</comments>
		<pubDate>Tue, 29 May 2012 10:13:20 +0000</pubDate>
		<dc:creator>Tony Hirst</dc:creator>
				<category><![CDATA[Data]]></category>

		<guid isPermaLink="false">http://blog.ouseful.info/?p=7943</guid>
		<description><![CDATA[Publishing open data is one thing, reusing it quite another. Firstly, you&#8217;re faced with a discovery problem &#8211; finding a reliable source of the data you need. Secondly, you need to actually find a way of getting a copy of the data you need into the application or tool you want to use it with. [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ouseful.info&#038;blog=325417&#038;post=7943&#038;subd=ouseful&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Publishing open data is one thing, reusing it quite another. Firstly, you&#8217;re faced with a discovery problem &#8211; finding a reliable source of the data you need. Secondly, you need to actually find a way of getting a copy of the data you need into the application or tool you want to use it with. Whilst playing around with the Open Data Communities <a href="http://opendatacommunities.org/dashboard/local_authorities/unitary-authority/isle-of-wight">Local Authority Dashboard</a>, a recently launched user facing view over a wealth of Linked Data published by the Department for Communities and Local Government (DCLG) on the <a href="http://opendatacommunities.org/">OpenDataCommunities</a> website (<a href="http://blog.swirrl.com/articles/new-publishmydata-feature-named-queries">New PublishMyData Features: Parameterised and Named Queries</a>), I noticed that they provide a link to the data source for each &#8220;fact&#8221; on the dashboard:</p>
<p><a href="http://ouseful.files.wordpress.com/2012/05/opendatacommunities-dashboard.png"><img src="http://ouseful.files.wordpress.com/2012/05/opendatacommunities-dashboard.png?w=700&#038;h=475" alt="" title="opendatacommunities dashboard" width="700" height="475" class="alignnone size-full wp-image-7944" /></a></p>
<p>One of the ideas I keep returning to is that it should be possible to &#8220;View Source&#8221; on a chart or data report to see the route back, via a query, to the dataset from whence it came:</p>
<p><img alt="" src="http://ouseful.files.wordpress.com/2011/03/whitebox-opendata-query.png?w=580&#038;h=288" title="Query Path" class="alignnone" width="580" height="288" /></p>
<p>So it&#8217;s great to see the Local Authority Dashboard doing just this by exposing the SPARQL query used to return the data from the Open Data Communities datastore:</p>
<p><a href="http://ouseful.files.wordpress.com/2012/05/opendatacommunity-query.png"><img src="http://ouseful.files.wordpress.com/2012/05/opendatacommunity-query.png?w=700&#038;h=514" alt="" title="opendatacommunity query" width="700" height="514" class="alignnone size-full wp-image-7945" /></a></p>
<p>You can also run the query to preview its output:</p>
<p><a href="http://ouseful.files.wordpress.com/2012/05/opndatacommunity-running-a-query.png"><img src="http://ouseful.files.wordpress.com/2012/05/opndatacommunity-running-a-query.png?w=700&#038;h=247" alt="" title="opndatacommunity - running a query" width="700" height="247" class="alignnone size-full wp-image-7946" /></a></p>
<p>Conveniently, a permalink is also provided to the query:</p>
<p><tt><a href="http://opendatacommunities.org/sparql/spend-per-category-per-household?authority=http%3A%2F%2Fopendatacommunities.org%2Fid%2Funitary-authority%2F" rel="nofollow">http://opendatacommunities.org/sparql/spend-per-category-per-household?authority=http%3A%2F%2Fopendatacommunities.org%2Fid%2Funitary-authority%2F</a><strong>isle-of-wight</strong>&amp;service_code=<strong>490</strong></tt></p>
<p>This is actually an example of a &#8220;Named Query&#8221; that the platform provides in the form of a parameterisd &#8216;shortcut&#8217; URL &#8211; changing the authority name and/or service code allows you to use the same base URL pattern to get back finance data in this case relating to other authorities and/or service codes as required.</p>
<p>The query view is also editable, which means you can use exposed query as a basis for writing your own queries. Once customised, queries can be called programmatcially via a GET request of the form</p>
<p><tt><a href="http://opendatacommunities.org/sparql.format" rel="nofollow">http://opendatacommunities.org/sparql.format</a>?<strong>query=URL-encoded-SPARQL-query</strong></tt></p>
<p>Custom queries can also support user defined parameter values by including %{tokens} in the original SPQARQL queries, and providing values for the tokens on the url query string:</p>
<p><tt><a href="http://opendatacommunities.org/sparql.format" rel="nofollow">http://opendatacommunities.org/sparql.format</a>?<strong>query=URL-encoded-SPARQL-query</strong>?<strong>token1</strong>=<em>value-for-token1</em>&amp;<strong>token2</strong>=<em>value-for-token2</em></tt></p>
<p>As well as previewing the output of a query, we can generate a variety of output formats from a tweak to the URL (add <em>.suffix</em> before the <em>?</em>), including JSON:</p>
<pre class="brush: jscript; title: ; notranslate">{
  &quot;head&quot;: {
    &quot;vars&quot;: [ &quot;spend_per_household&quot; ]
  } ,
  &quot;results&quot;: {
    &quot;bindings&quot;: [
      {
        &quot;spend_per_household&quot;: { &quot;datatype&quot;: &quot;http://www.w3.org/2001/XMLSchema#decimal&quot; , &quot;type&quot;: &quot;typed-literal&quot; , &quot;value&quot;: &quot;115.838709677419354838709677&quot; }
      }
    ]
  }
}</pre>
<p>XML:</p>
<pre class="brush: xml; title: ; notranslate">&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;sparql xmlns=&quot;http://www.w3.org/2005/sparql-results#&quot;&gt;
  &lt;head&gt;
    &lt;variable name=&quot;spend_per_household&quot;/&gt;
  &lt;/head&gt;
  &lt;results&gt;
    &lt;result&gt;
      &lt;binding name=&quot;spend_per_household&quot;&gt;
        &lt;literal datatype=&quot;http://www.w3.org/2001/XMLSchema#decimal&quot;&gt;115.838709677419354838709677&lt;/literal&gt;
      &lt;/binding&gt;
    &lt;/result&gt;
  &lt;/results&gt;
&lt;/sparql&gt;</pre>
<p>and CSV:</p>
<pre>spend_per_household
115.838709677419354838709677</pre>
<p>Having access to the data in this form means we can then pull it into something like a Google Spreadsheets. For example, we can use the <tt>=importData(URL)</tt> formual to pull in CSV data from the linked query URL:</p>
<p><a href="http://ouseful.files.wordpress.com/2012/05/google-spreadsheeet-import-data.png"><img src="http://ouseful.files.wordpress.com/2012/05/google-spreadsheeet-import-data.png?w=700&#038;h=171" alt="" title="google spreadsheeet - import data" width="700" height="171" class="alignnone size-full wp-image-7949" /></a></p>
<p>And here&#8217;s the result:</p>
<p><a href="http://ouseful.files.wordpress.com/2012/05/googl-spreadshet-imported-data.png"><img src="http://ouseful.files.wordpress.com/2012/05/googl-spreadshet-imported-data.png?w=700" alt="" title="googl spreadshet - imported data"   class="alignnone size-full wp-image-7950" /></a></p>
<p>Note: it might be quite handy to be able to suppress the header in the returned CSV so that we could directly use <em>=importData()</em> formula to pull actual values into particular cells, as for example described in <a href="http://blog.ouseful.info/2009/11/26/viewing-sparqled-data-gov-uk-data-in-a-google-spreadsheet/">Viewing SPARQLed data.gov.uk Data in a Google Spreadsheet</a> and <a href="http://blog.ouseful.info/2010/02/17/using-data-from-linked-data-datastores-the-easy-way/">Using Data From Linked Data Datastores the Easy Way (i.e. in a spreadsheet, via a formula)</a>. This loss of metadata in the query response is potentially risky, although I would argue the loss of context about what the data relates to is mitigated by seeing the &#8220;unpacked&#8221; named query (i.e. the SPARQL query it aliases) and the returned data as a system/atom.</p>
<p>This ability to <em>see the data, then get the data</em> (or &#8220;See the data in context &#8211; then get the data you need&#8221;) is really powerful I think, and offers a way of providing direct access to data via a contextualised view fed from a trusted source.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ouseful.wordpress.com/7943/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ouseful.wordpress.com/7943/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ouseful.info&#038;blog=325417&#038;post=7943&#038;subd=ouseful&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ouseful.info/2012/05/29/dashboard-views-as-data-source-directories-open-data-communities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/abbd9f90565ce9ae4d065d93a81d8c03?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Tony Hirst</media:title>
		</media:content>

		<media:content url="http://ouseful.files.wordpress.com/2012/05/opendatacommunities-dashboard.png" medium="image">
			<media:title type="html">opendatacommunities dashboard</media:title>
		</media:content>

		<media:content url="http://ouseful.files.wordpress.com/2011/03/whitebox-opendata-query.png?w=700" medium="image">
			<media:title type="html">Query Path</media:title>
		</media:content>

		<media:content url="http://ouseful.files.wordpress.com/2012/05/opendatacommunity-query.png" medium="image">
			<media:title type="html">opendatacommunity query</media:title>
		</media:content>

		<media:content url="http://ouseful.files.wordpress.com/2012/05/opndatacommunity-running-a-query.png" medium="image">
			<media:title type="html">opndatacommunity - running a query</media:title>
		</media:content>

		<media:content url="http://ouseful.files.wordpress.com/2012/05/google-spreadsheeet-import-data.png" medium="image">
			<media:title type="html">google spreadsheeet - import data</media:title>
		</media:content>

		<media:content url="http://ouseful.files.wordpress.com/2012/05/googl-spreadshet-imported-data.png" medium="image">
			<media:title type="html">googl spreadshet - imported data</media:title>
		</media:content>
	</item>
	</channel>
</rss>
