<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>learnlinkeddata</title>
    <description>Articles from learnlinkeddata.com</description>
    <link>http://learnlinkeddata.com</link>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/learnlinkeddata" /><feedburner:info uri="learnlinkeddata" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license><feedburner:emailServiceId>learnlinkeddata</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
      <title>Understanding RDF serialisation formats</title>
      <description>&lt;p&gt;A couple of weeks ago, I wrote an &lt;a href="http://learnlinkeddata.com/articles/introduction-to-rdf"&gt;Introduction To &lt;span class="caps"&gt;RDF&lt;/span&gt;&lt;/a&gt;. In that article, we discussed expressing a &lt;span class="caps"&gt;RDF&lt;/span&gt; single triple (which defined the location of my blog) as a &lt;em&gt;blob and line&lt;/em&gt; diagram.  But what if we want to describe more than one aspect of a resource?&amp;#8230; or if we want to model the relationships between many resources? It probably wouldn&amp;#8217;t come as a surprise that to do that, you&amp;#8217;d need to create multiple triples. As I mentioned in that previous post, &lt;em&gt;blob and line&lt;/em&gt; diagrams only work well for small numbers of triples, and they&amp;#8217;re only really good for humans.&lt;/p&gt;
&lt;p&gt;To communicate &lt;span class="caps"&gt;RDF&lt;/span&gt; between computer systems, we need something different. In this article, we&amp;#8217;ll see how to serialise a &lt;a href="http://www.w3.org/TR/rdf-mt/#graphdefs"&gt;graph&lt;/a&gt; (i.e. a &lt;em&gt;collection&lt;/em&gt;, or &lt;em&gt;set&lt;/em&gt;) of &lt;span class="caps"&gt;RDF&lt;/span&gt; triples in different ways, and explore the advantages and disadvantages of each.&lt;/p&gt;
&lt;p&gt;In order to avoid me having to make up a contrived example, I&amp;#8217;m going to use some data from the &lt;a href="http://opendatacommunities.org"&gt;OpenDataCommunities&lt;/a&gt; site&lt;a href="#disclosure"&gt;*&lt;/a&gt;, which contains a bunch of open data about English Local Authorities.  The &lt;span class="caps"&gt;URI&lt;/span&gt; &lt;a href="http://opendatacommunities.org/id/metropolitan-district-council/manchester"&gt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&lt;/a&gt; identifies the Manchester Metropolitan District Council. If you click on that link, you&amp;#8217;ll get an &lt;span class="caps"&gt;HTML&lt;/span&gt; representation of the data that the site holds about that authority.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://learnlinkeddata.s3.amazonaws.com/manchester-rdf.png
" style="border: 1px solid #ddd; box-shadow: 3px 3px #eee;" /&gt;&lt;/p&gt;
&lt;p&gt;But the site also offers the data in other formats via links at the bottom of the page. Let&amp;#8217;s discuss each of those formats in turn.&lt;/p&gt;
&lt;h3&gt;&lt;span class="caps"&gt;RDF&lt;/span&gt;/&lt;span class="caps"&gt;XML&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span class="caps"&gt;RDF&lt;/span&gt; is most commonly expressed in an &lt;span class="caps"&gt;XML&lt;/span&gt; format: &lt;em&gt;&lt;span class="caps"&gt;RDF&lt;/span&gt;/&lt;span class="caps"&gt;XML&lt;/span&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;h4&gt;A Single Resource as &lt;span class="caps"&gt;RDF&lt;/span&gt;/&lt;span class="caps"&gt;XML&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;The &lt;span class="caps"&gt;RDF&lt;/span&gt;/&lt;span class="caps"&gt;XML&lt;/span&gt; for what we know about the Manchester authority looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns0="http://opendatacommunities.org/def/local-government/" xmlns:ns1="http://data.ordnancesurvey.co.uk/ontology/admingeo/" xmlns:ns2="http://statistics.data.gov.uk/def/administrative-geography/" xmlns:ns3="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns4="http://www.w3.org/2000/01/rdf-schema#" xmlns:ns5="http://www.w3.org/2002/07/owl#" xmlns:ns6="http://xmlns.com/foaf/0.1/"&amp;gt;
  &amp;lt;ns0:MetropolitanDistrictCouncil rdf:about="http://opendatacommunities.org/id/metropolitan-district-council/manchester"&amp;gt;
    &amp;lt;ns1:gssCode&amp;gt;E08000003&amp;lt;/ns1:gssCode&amp;gt;
    &amp;lt;ns1:hasCensusCode&amp;gt;00BN&amp;lt;/ns1:hasCensusCode&amp;gt;
    &amp;lt;ns0:billingAuthorityCode&amp;gt;E4203&amp;lt;/ns0:billingAuthorityCode&amp;gt;
    &amp;lt;ns0:governs rdf:resource="http://data.ordnancesurvey.co.uk/id/7000000000018821"/&amp;gt;
    &amp;lt;ns0:openlyLocalUrl rdf:resource="http://openlylocal.com/councils/157-Manchester-City-Council"/&amp;gt;
    &amp;lt;ns2:region rdf:resource="http://statistics.data.gov.uk/id/government-office-region/B"/&amp;gt;
    &amp;lt;ns3:type rdf:resource="http://opendatacommunities.org/def/local-government/CivilAdministrativeAuthority"/&amp;gt;
    &amp;lt;ns3:type rdf:resource="http://opendatacommunities.org/def/local-government/LocalAuthority"/&amp;gt;
    &amp;lt;ns4:label&amp;gt;Manchester&amp;lt;/ns4:label&amp;gt;
    &amp;lt;ns5:sameAs rdf:resource="http://statistics.data.gov.uk/id/local-authority/00BN"/&amp;gt;
    &amp;lt;ns6:page rdf:resource="http://www.manchester.gov.uk/"/&amp;gt;
  &amp;lt;/ns0:MetropolitanDistrictCouncil&amp;gt;
&amp;lt;/rdf:RDF&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Multiple Resources as &lt;span class="caps"&gt;RDF&lt;/span&gt;/&lt;span class="caps"&gt;XML&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;A couple of local authorities serialised as &lt;span class="caps"&gt;RDF&lt;/span&gt;/&lt;span class="caps"&gt;XML&lt;/span&gt; look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;rdf:RDF
    xmlns:j.0="http://data.ordnancesurvey.co.uk/ontology/admingeo/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:j.1="http://xmlns.com/foaf/0.1/"
    xmlns:j.2="http://opendatacommunities.org/def/local-government/"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:j.3="http://statistics.data.gov.uk/def/administrative-geography/"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" &amp;gt; 
  &amp;lt;rdf:Description rdf:about="http://opendatacommunities.org/id/district-council/babergh"&amp;gt;
    &amp;lt;j.2:governs rdf:resource="http://data.ordnancesurvey.co.uk/id/7000000000015692"/&amp;gt;
    &amp;lt;j.0:hasCensusCode&amp;gt;42UB&amp;lt;/j.0:hasCensusCode&amp;gt;
    &amp;lt;j.2:billingAuthorityCode&amp;gt;E3531&amp;lt;/j.2:billingAuthorityCode&amp;gt;
    &amp;lt;rdfs:label&amp;gt;Babergh&amp;lt;/rdfs:label&amp;gt;
    &amp;lt;j.1:page rdf:resource="http://www.babergh.gov.uk"/&amp;gt;
    &amp;lt;rdf:type rdf:resource="http://opendatacommunities.org/def/local-government/LocalAuthority"/&amp;gt;
    &amp;lt;rdf:type rdf:resource="http://opendatacommunities.org/def/local-government/DistrictCouncil"/&amp;gt;
    &amp;lt;j.0:gssCode&amp;gt;E07000200&amp;lt;/j.0:gssCode&amp;gt;
    &amp;lt;owl:sameAs rdf:resource="http://statistics.data.gov.uk/id/local-authority/42UB"/&amp;gt;
    &amp;lt;j.3:region rdf:resource="http://statistics.data.gov.uk/id/government-office-region/G"/&amp;gt;
    &amp;lt;rdf:type rdf:resource="http://opendatacommunities.org/def/local-government/CivilAdministrativeAuthority"/&amp;gt;
  &amp;lt;/rdf:Description&amp;gt;
  &amp;lt;rdf:Description rdf:about="http://opendatacommunities.org/id/london-borough-council/barking-and-dagenham"&amp;gt;
    &amp;lt;owl:sameAs rdf:resource="http://statistics.data.gov.uk/id/local-authority/00AB"/&amp;gt;
    &amp;lt;j.0:gssCode&amp;gt;E09000002&amp;lt;/j.0:gssCode&amp;gt;
    &amp;lt;rdf:type rdf:resource="http://opendatacommunities.org/def/local-government/CivilAdministrativeAuthority"/&amp;gt;
    &amp;lt;j.2:openlyLocalUrl rdf:resource="http://openlylocal.com/councils/19-London-Borough-of-Barking-Dagenham"/&amp;gt;
    &amp;lt;rdf:type rdf:resource="http://opendatacommunities.org/def/local-government/LondonBoroughCouncil"/&amp;gt;
    &amp;lt;j.2:governs rdf:resource="http://data.ordnancesurvey.co.uk/id/7000000000010949"/&amp;gt;
    &amp;lt;rdf:type rdf:resource="http://opendatacommunities.org/def/local-government/LocalAuthority"/&amp;gt;
    &amp;lt;j.0:hasCensusCode&amp;gt;00AB&amp;lt;/j.0:hasCensusCode&amp;gt;
    &amp;lt;j.3:region rdf:resource="http://statistics.data.gov.uk/id/government-office-region/H"/&amp;gt;
    &amp;lt;j.1:page rdf:resource="http://www.lbbd.gov.uk/"/&amp;gt;
    &amp;lt;j.2:billingAuthorityCode&amp;gt;E5030&amp;lt;/j.2:billingAuthorityCode&amp;gt;
    &amp;lt;rdfs:label&amp;gt;Barking and Dagenham&amp;lt;/rdfs:label&amp;gt;
  &amp;lt;/rdf:Description&amp;gt;
&amp;lt;/rdf:RDF&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Mime Type&lt;/h4&gt;
&lt;p&gt;&lt;span class="caps"&gt;RDF&lt;/span&gt;/&lt;span class="caps"&gt;XML&lt;/span&gt; is typically requested and sent over the Web using a &lt;span class="caps"&gt;MIME&lt;/span&gt; type of &lt;code&gt;application/rdf+xml&lt;/code&gt;.&lt;/p&gt;
&lt;h4&gt;&lt;span class="caps"&gt;RDF&lt;/span&gt;/&lt;span class="caps"&gt;XML&lt;/span&gt; Summary&lt;/h4&gt;
&lt;p&gt;In &lt;span class="caps"&gt;RDF&lt;/span&gt;/&lt;span class="caps"&gt;XML&lt;/span&gt;, the triples for each resource, are contained within &lt;code&gt;&amp;lt;rdf:Description&amp;gt;&lt;/code&gt; nodes, with a sub-node for each property and its value (&lt;a href="http://www.w3.org/TR/rdf-syntax-grammar/"&gt;full spec here&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;This format has the advantage that most programming languages have support for &lt;span class="caps"&gt;XML&lt;/span&gt;, and you can make use of &lt;span class="caps"&gt;XML&lt;/span&gt; namespaces to avoid having to use full URIs everywhere, which keeps the size down. On the other hand, I don&amp;#8217;t find it that easy to read manually.&lt;/p&gt;
&lt;h3&gt;Turtle&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Turtle&lt;/em&gt; (Terse &lt;span class="caps"&gt;RDF&lt;/span&gt; Triple Language) is an &lt;span class="caps"&gt;RDF&lt;/span&gt;-specific subset of Tim Berners-Lee&amp;#8217;s &lt;em&gt;Notation3&lt;/em&gt; language.&lt;/p&gt;
&lt;h4&gt;A Single Resource as Turtle&lt;/h4&gt;
&lt;p&gt;The &lt;span class="caps"&gt;RDF&lt;/span&gt; triples about that single Manchester authority could be represented in Turtle like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@prefix gov: &amp;lt;http://opendatacommunities.org/def/local-government/&amp;gt; .
@prefix admingeo: &amp;lt;http://data.ordnancesurvey.co.uk/ontology/admingeo/&amp;gt; .
@prefix statsgeo: &amp;lt;http://statistics.data.gov.uk/def/administrative-geography/&amp;gt; .
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .
@prefix owl: &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt; .
@prefix foaf: &amp;lt;http://xmlns.com/foaf/0.1/&amp;gt; .

&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt;
   a gov:MetropolitanDistrictCouncil, gov:LocalAuthority, gov:CivilAdministrativeAuthority;
   rdfs:label "Manchester";
   admingeo:gssCode "E08000003";
   admingeo:hasCensusCode "00BN";
   gov:billingAuthorityCode "E4203";
   gov:governs &amp;lt;http://data.ordnancesurvey.co.uk/id/7000000000018821&amp;gt;;
   gov:openlyLocalUrl &amp;lt;http://openlylocal.com/councils/157-Manchester-City-Council&amp;gt;;
   statsgeo:region &amp;lt;http://statistics.data.gov.uk/id/government-office-region/B&amp;gt;;
   owl:sameAs &amp;lt;http://statistics.data.gov.uk/id/local-authority/00BN&amp;gt;;
   foaf:page &amp;lt;http://www.manchester.gov.uk/&amp;gt; .
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Multiple Resources as Turtle&lt;/h4&gt;
&lt;p&gt;Multiple local authorities could be serialised in Turtle like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@prefix gov: &amp;lt;http://opendatacommunities.org/def/local-government/&amp;gt; .
@prefix admingeo: &amp;lt;http://data.ordnancesurvey.co.uk/ontology/admingeo/&amp;gt; .
@prefix statsgeo: &amp;lt;http://statistics.data.gov.uk/def/administrative-geography/&amp;gt; .
@prefix rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt; .
@prefix owl: &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt; .
@prefix foaf: &amp;lt;http://xmlns.com/foaf/0.1/&amp;gt; .

&amp;lt;http://opendatacommunities.org/id/district-council/babergh&amp;gt;
    a gov:LocalAuthority, gov:DistrictCouncil, gov:CivilAdministrativeAuthority ;
    rdfs:label "Babergh" ;
    admingeo:gssCode "E07000200" ;
    admingeo:hasCensusCode "42UB" ;
    admingeo:billingAuthorityCode "E3531" ;
    gov:governs &amp;lt;http://data.ordnancesurvey.co.uk/id/7000000000015692&amp;gt; ;
    statsgeo:region  &amp;lt;http://statistics.data.gov.uk/id/government-office-region/G&amp;gt; ;
    owl:sameAs &amp;lt;http://statistics.data.gov.uk/id/local-authority/42UB&amp;gt; ;
    foaf:page &amp;lt;http://www.babergh.gov.uk&amp;gt; .

&amp;lt;http://opendatacommunities.org/id/london-borough-council/barking-and-dagenham&amp;gt;
    a gov:LocalAuthority, gov:LondonBoroughCouncil, gov:CivilAdministrativeAuthority ;
    rdfs:label "Barking and Dagenham" ;
    admingeo:gssCode "E09000002" ;
    admingeo:hasCensusCode "00AB" ;
    gov:billingAuthorityCode "E5030" ;
    gov:governs &amp;lt;http://data.ordnancesurvey.co.uk/id/7000000000010949&amp;gt; ;
    gov:openlyLocalUrl &amp;lt;http://openlylocal.com/councils/19-London-Borough-of-Barking-Dagenham&amp;gt; ;
    statsgeo:region &amp;lt;http://statistics.data.gov.uk/id/government-office-region/H&amp;gt; ;
    owl:sameAs &amp;lt;http://statistics.data.gov.uk/id/local-authority/00AB&amp;gt; ;
    foaf:page &amp;lt;http://www.lbbd.gov.uk/&amp;gt; .&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Mime Type&lt;/h4&gt;
&lt;p&gt;Turtle is typically requested and sent over the Web using a &lt;span class="caps"&gt;MIME&lt;/span&gt; type of &lt;code&gt;text/turtle&lt;/code&gt;.&lt;/p&gt;
&lt;h4&gt;Turtle Summary&lt;/h4&gt;
&lt;p&gt;The &lt;span class="caps"&gt;URI&lt;/span&gt; for the each resource is followed by the predicates and objects of the triples about it (essentially, as key-value pairs). Each pair is separated by a semi-colon, and the information about a resource is closed off by a dot. Note that the whitespace is not important here, but for readability, the predicates and objects are often indented and appear on separate lines.&lt;/p&gt;
&lt;p&gt;Turtle is my favourite &lt;span class="caps"&gt;RDF&lt;/span&gt; serialisation format: It&amp;#8217;s fairly easy to read for humans due to the lack of punctuation noise, it groups together the triples about each resource, and it allows you to define common &lt;code&gt;@prefixes&lt;/code&gt;. Its terseness also helps keep the amount of bandwidth required to communicate &lt;span class="caps"&gt;RDF&lt;/span&gt; down to a minimum, and it&amp;#8217;s well supported by &lt;span class="caps"&gt;RDF&lt;/span&gt; toolkits and libraries.&lt;/p&gt;
&lt;p&gt;Note that the standard encoding of Turtle is &lt;span class="caps"&gt;UTF&lt;/span&gt;-8 (though escaped Unicode is allowed in Turtle as well). Turtle literals can contain line breaks, using the &lt;code&gt;"""long literal"""&lt;/code&gt; approach. For more information, see the &lt;a href="http://www.w3.org/TeamSubmission/turtle/"&gt;Turtle W3C submission&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;N-Triples&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;N-Triples&lt;/em&gt; is a simplified version of Turtle.&lt;/p&gt;
&lt;h4&gt;A Single Resource as N-Triples&lt;/h4&gt;
&lt;p&gt;Here&amp;#8217;s the &lt;span class="caps"&gt;RDF&lt;/span&gt; for the Manchester authority again, this time as N-triples.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt; &amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt; "Manchester" .
&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/openlyLocalUrl&amp;gt; &amp;lt;http://openlylocal.com/councils/157-Manchester-City-Council&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt; &amp;lt;http://xmlns.com/foaf/0.1/page&amp;gt; &amp;lt;http://www.manchester.gov.uk/&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt; &amp;lt;http://www.w3.org/2002/07/owl#sameAs&amp;gt; &amp;lt;http://statistics.data.gov.uk/id/local-authority/00BN&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt; &amp;lt;http://data.ordnancesurvey.co.uk/ontology/admingeo/hasCensusCode&amp;gt; "00BN" .
&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/billingAuthorityCode&amp;gt; "E4203" .
&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt; &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/MetropolitanDistrictCouncil&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt; &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/LocalAuthority&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt; &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/CivilAdministrativeAuthority&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/governs&amp;gt; &amp;lt;http://data.ordnancesurvey.co.uk/id/7000000000018821&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt; &amp;lt;http://statistics.data.gov.uk/def/administrative-geography/region&amp;gt; &amp;lt;http://statistics.data.gov.uk/id/government-office-region/B&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/metropolitan-district-council/manchester&amp;gt; &amp;lt;http://data.ordnancesurvey.co.uk/ontology/admingeo/gssCode&amp;gt; "E08000003" .&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Multiple Resources as N-Triples&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;http://opendatacommunities.org/id/district-council/allerdale&amp;gt; &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/CivilAdministrativeAuthority&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/allerdale&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/billingAuthorityCode&amp;gt; "E0931" .
&amp;lt;http://opendatacommunities.org/id/district-council/allerdale&amp;gt; &amp;lt;http://www.w3.org/2002/07/owl#sameAs&amp;gt; &amp;lt;http://statistics.data.gov.uk/id/local-authority/16UB&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/allerdale&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/openlyLocalUrl&amp;gt; &amp;lt;http://openlylocal.com/councils/38-Allerdale-Borough-Council&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/allerdale&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/governs&amp;gt; &amp;lt;http://data.ordnancesurvey.co.uk/id/7000000000013065&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/allerdale&amp;gt; &amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt; "Allerdale" .
&amp;lt;http://opendatacommunities.org/id/district-council/allerdale&amp;gt; &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/DistrictCouncil&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/allerdale&amp;gt; &amp;lt;http://xmlns.com/foaf/0.1/page&amp;gt; &amp;lt;http://www.allerdale.gov.uk&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/allerdale&amp;gt; &amp;lt;http://statistics.data.gov.uk/def/administrative-geography/region&amp;gt; &amp;lt;http://statistics.data.gov.uk/id/government-office-region/B&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/allerdale&amp;gt; &amp;lt;http://data.ordnancesurvey.co.uk/ontology/admingeo/gssCode&amp;gt; "E07000026" .
&amp;lt;http://opendatacommunities.org/id/district-council/allerdale&amp;gt; &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/LocalAuthority&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/allerdale&amp;gt; &amp;lt;http://data.ordnancesurvey.co.uk/ontology/admingeo/hasCensusCode&amp;gt; "16UB" .
&amp;lt;http://opendatacommunities.org/id/district-council/barrow-in-furness&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/governs&amp;gt; &amp;lt;http://data.ordnancesurvey.co.uk/id/7000000000012941&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/barrow-in-furness&amp;gt; &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/CivilAdministrativeAuthority&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/barrow-in-furness&amp;gt; &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/LocalAuthority&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/barrow-in-furness&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/billingAuthorityCode&amp;gt; "E0932" .
&amp;lt;http://opendatacommunities.org/id/district-council/barrow-in-furness&amp;gt; &amp;lt;http://www.w3.org/2002/07/owl#sameAs&amp;gt; &amp;lt;http://statistics.data.gov.uk/id/local-authority/16UC&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/barrow-in-furness&amp;gt; &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&amp;gt; &amp;lt;http://opendatacommunities.org/def/local-government/DistrictCouncil&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/barrow-in-furness&amp;gt; &amp;lt;http://xmlns.com/foaf/0.1/page&amp;gt; &amp;lt;http://www.barrowbc.gov.uk/&amp;gt; .
&amp;lt;http://opendatacommunities.org/id/district-council/barrow-in-furness&amp;gt; &amp;lt;http://data.ordnancesurvey.co.uk/ontology/admingeo/gssCode&amp;gt; "E07000027" .
&amp;lt;http://opendatacommunities.org/id/district-council/barrow-in-furness&amp;gt; &amp;lt;http://data.ordnancesurvey.co.uk/ontology/admingeo/hasCensusCode&amp;gt; "16UC" .
&amp;lt;http://opendatacommunities.org/id/district-council/barrow-in-furness&amp;gt; &amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt; "Barrow-in-Furness" .
&amp;lt;http://opendatacommunities.org/id/district-council/barrow-in-furness&amp;gt; &amp;lt;http://statistics.data.gov.uk/def/administrative-geography/region&amp;gt; &amp;lt;http://statistics.data.gov.uk/id/government-office-region/B&amp;gt; .&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Mime Type&lt;/h4&gt;
&lt;p&gt;N-triples are typically requested and sent over the Web using a &lt;span class="caps"&gt;MIME&lt;/span&gt; type of &lt;code&gt;text/plain&lt;/code&gt; or &lt;code&gt;application/n-triples&lt;/code&gt;.&lt;/p&gt;
&lt;h4&gt;N-Triples summary&lt;/h4&gt;
&lt;p&gt;With N-triples, each triple appears on its own line, separated by a dot.&lt;/p&gt;
&lt;p&gt;N-triples&amp;#8217; simplicity makes it easy for software to parse and generate, but it lacks some of the features of &lt;span class="caps"&gt;RDF&lt;/span&gt;/&lt;span class="caps"&gt;XML&lt;/span&gt; and Turtle (such as support for nested resources).  Due to the repetition of the resource URIs, it&amp;#8217;s not as compact as Turtle, and the triples for each resource aren&amp;#8217;t necessarily grouped together which makes it harder to read by eye.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s also worth mentioning here that as N-triples is a &lt;code&gt;text/plain&lt;/code&gt;  literals are only allowed to contain US &lt;span class="caps"&gt;ASCII&lt;/span&gt; characters: non-&lt;span class="caps"&gt;ASCII&lt;/span&gt; Unicode characters need to be escaped (in contrast to Turtle whose standard encoding is &lt;span class="caps"&gt;UTF&lt;/span&gt;-8). Also, in N-triples, line-breaks always need to be escaped.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.w3.org/TeamSubmission/turtle/#sec-diff-ntriples"&gt;This section of the W3C Turtle submission&lt;/a&gt; gives a useful comparison between Turtle and N-Triples. You can also find more details about N-Triples &lt;a href="http://www.w3.org/TR/rdf-testcases/#ntriples"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;span class="caps"&gt;JSON&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span class="caps"&gt;RDF&lt;/span&gt; can also be expressed in JavaScript Object Notation (&lt;span class="caps"&gt;JSON&lt;/span&gt;).&lt;/p&gt;
&lt;h4&gt;A Single Resource as &lt;span class="caps"&gt;JSON&lt;/span&gt;&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;{"http://opendatacommunities.org/id/metropolitan-district-council/manchester":{"http://www.w3.org/2000/01/rdf-schema#label":[{"type":"literal","value":"Manchester"}],"http://opendatacommunities.org/def/local-government/openlyLocalUrl":[{"type":"uri","value":"http://openlylocal.com/councils/157-Manchester-City-Council"}],"http://xmlns.com/foaf/0.1/page":[{"type":"uri","value":"http://www.manchester.gov.uk/"}],"http://www.w3.org/2002/07/owl#sameAs":[{"type":"uri","value":"http://statistics.data.gov.uk/id/local-authority/00BN"}],"http://data.ordnancesurvey.co.uk/ontology/admingeo/hasCensusCode":[{"type":"literal","value":"00BN"}],"http://opendatacommunities.org/def/local-government/billingAuthorityCode":[{"type":"literal","value":"E4203"}],"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":[{"type":"uri","value":"http://opendatacommunities.org/def/local-government/MetropolitanDistrictCouncil"},{"type":"uri","value":"http://opendatacommunities.org/def/local-government/LocalAuthority"},{"type":"uri","value":"http://opendatacommunities.org/def/local-government/CivilAdministrativeAuthority"}],"http://opendatacommunities.org/def/local-government/governs":[{"type":"uri","value":"http://data.ordnancesurvey.co.uk/id/7000000000018821"}],"http://statistics.data.gov.uk/def/administrative-geography/region":[{"type":"uri","value":"http://statistics.data.gov.uk/id/government-office-region/B"}],"http://data.ordnancesurvey.co.uk/ontology/admingeo/gssCode":[{"type":"literal","value":"E08000003"}]}}&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Multiple Resources as &lt;span class="caps"&gt;JSON&lt;/span&gt;&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;{"http://opendatacommunities.org/id/district-council/allerdale":{"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":[{"type":"uri","value":"http://opendatacommunities.org/def/local-government/CivilAdministrativeAuthority"},{"type":"uri","value":"http://opendatacommunities.org/def/local-government/DistrictCouncil"},{"type":"uri","value":"http://opendatacommunities.org/def/local-government/LocalAuthority"}],"http://opendatacommunities.org/def/local-government/billingAuthorityCode":[{"type":"literal","value":"E0931"}],"http://www.w3.org/2002/07/owl#sameAs":[{"type":"uri","value":"http://statistics.data.gov.uk/id/local-authority/16UB"}],"http://opendatacommunities.org/def/local-government/openlyLocalUrl":[{"type":"uri","value":"http://openlylocal.com/councils/38-Allerdale-Borough-Council"}],"http://opendatacommunities.org/def/local-government/governs":[{"type":"uri","value":"http://data.ordnancesurvey.co.uk/id/7000000000013065"}],"http://www.w3.org/2000/01/rdf-schema#label":[{"type":"literal","value":"Allerdale"}],"http://xmlns.com/foaf/0.1/page":[{"type":"uri","value":"http://www.allerdale.gov.uk"}],"http://statistics.data.gov.uk/def/administrative-geography/region":[{"type":"uri","value":"http://statistics.data.gov.uk/id/government-office-region/B"}],"http://data.ordnancesurvey.co.uk/ontology/admingeo/gssCode":[{"type":"literal","value":"E07000026"}],"http://data.ordnancesurvey.co.uk/ontology/admingeo/hasCensusCode":[{"type":"literal","value":"16UB"}]},"http://opendatacommunities.org/id/district-council/barrow-in-furness":{"http://opendatacommunities.org/def/local-government/governs":[{"type":"uri","value":"http://data.ordnancesurvey.co.uk/id/7000000000012941"}],"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":[{"type":"uri","value":"http://opendatacommunities.org/def/local-government/CivilAdministrativeAuthority"},{"type":"uri","value":"http://opendatacommunities.org/def/local-government/LocalAuthority"},{"type":"uri","value":"http://opendatacommunities.org/def/local-government/DistrictCouncil"}],"http://opendatacommunities.org/def/local-government/billingAuthorityCode":[{"type":"literal","value":"E0932"}],"http://www.w3.org/2002/07/owl#sameAs":[{"type":"uri","value":"http://statistics.data.gov.uk/id/local-authority/16UC"}],"http://xmlns.com/foaf/0.1/page":[{"type":"uri","value":"http://www.barrowbc.gov.uk/"}],"http://data.ordnancesurvey.co.uk/ontology/admingeo/gssCode":[{"type":"literal","value":"E07000027"}],"http://data.ordnancesurvey.co.uk/ontology/admingeo/hasCensusCode":[{"type":"literal","value":"16UC"}],"http://www.w3.org/2000/01/rdf-schema#label":[{"type":"literal","value":"Barrow-in-Furness"}],"http://statistics.data.gov.uk/def/administrative-geography/region":[{"type":"uri","value":"http://statistics.data.gov.uk/id/government-office-region/B"}]}}&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;Mime Type&lt;/h4&gt;
&lt;p&gt;&lt;span class="caps"&gt;JSON&lt;/span&gt; is typically requested and sent over the Web using a &lt;span class="caps"&gt;MIME&lt;/span&gt; type of &lt;code&gt;application/json&lt;/code&gt;.&lt;/p&gt;
&lt;h4&gt;&lt;span class="caps"&gt;JSON&lt;/span&gt; Summary&lt;/h4&gt;
&lt;p&gt;This format serialises the triples by defining JavaScript objects, the identifier for each being the &lt;span class="caps"&gt;URI&lt;/span&gt; for the resource. Sub-objects are created for each predicate, the values being an array of the triples for that predicate. For each object of the triple, there is a JavaScript object with properties for its &lt;em&gt;type&lt;/em&gt; (i.e. &lt;span class="caps"&gt;URI&lt;/span&gt; or literal), and actual &lt;em&gt;value&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s not an official standard (the example above is an output from the &lt;a href="http://rdf.rubyforge.org/json/"&gt;rdf.rb ruby library&lt;/a&gt;, which is based on Talis&amp;#8217;s &lt;a href="http://docs.api.talis.com/platform-api/output-types/rdf-json"&gt;&lt;span class="caps"&gt;RDF&lt;/span&gt; &lt;span class="caps"&gt;JSON&lt;/span&gt; spec&lt;/a&gt;), but many Linked Data sites are now supporting &lt;span class="caps"&gt;JSON&lt;/span&gt; as a serialisation format. It&amp;#8217;s becoming popular due to the ease with which this kind of data can be consumed in JavaScript web applications. It&amp;#8217;s not as easy to read by eye as Turtle (to me, at least), but it&amp;#8217;s still not too bad in that respect. The limited punctuation also helps to keep the size down.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;In this article, we&amp;#8217;ve covered the most common serialisation formats for &lt;span class="caps"&gt;RDF&lt;/span&gt; triples. Hopefully it has helped you to understand the benefits and pitfalls of each, so that you can make an informed decision about which to choose for publishing or consuming your Linked Data.&lt;/p&gt;
&lt;p&gt;If you’d be interested in more articles like this, please subscribe to our &lt;a href="http://feeds.feedburner.com/learnlinkeddata"&gt;&lt;span class="caps"&gt;RSS&lt;/span&gt; feed&lt;/a&gt;, &lt;a href="http://twitter.com/learnlinkeddata"&gt;Twitter updates&lt;/a&gt;, or &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=learnlinkeddata&amp;amp;loc=en_US"&gt;email alerts&lt;/a&gt;. We’ll try to keep the articles coming fairly regularly.&lt;/p&gt;
&lt;blockquote id="disclosure"&gt;
&lt;p&gt;*In the interest of full disclosure: I should probably mention that my company worked on the OpenDataCommunities site.&lt;/p&gt;
&lt;/blockquote&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=clXKI5ykkPk:TdHgRW50uag:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=clXKI5ykkPk:TdHgRW50uag:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=clXKI5ykkPk:TdHgRW50uag:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?i=clXKI5ykkPk:TdHgRW50uag:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/learnlinkeddata/~4/clXKI5ykkPk" height="1" width="1"/&gt;</description>
      <pubDate>Mon, 07 May 2012 13:12:06 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/learnlinkeddata/~3/clXKI5ykkPk/rdf-serialisation-formats</link>
      <guid isPermaLink="false">http://learnlinkeddata.com/articles/rdf-serialisation-formats?updated_at=2012-05-08T12:55:36</guid>
    <feedburner:origLink>http://learnlinkeddata.com/articles/rdf-serialisation-formats?updated_at=2012-05-08T12:55:36</feedburner:origLink></item>
    <item>
      <title>Simple namespace lookup</title>
      <description>&lt;p&gt;&lt;a href="http://prefix.cc"&gt;prefix.cc&lt;/a&gt; is a very handy little service that I use a lot.&lt;/p&gt;
&lt;p&gt;If you work with &lt;span class="caps"&gt;RDF&lt;/span&gt; a bit, you get to know the commonly used prefixes for ontology terms, such as rdfs:label, foaf:Person, owl:sameAs etc.&lt;/p&gt;
&lt;p&gt;While I can remember the most important predicates and classes from these ontologies, it&amp;#8217;s rare for me to be able to remember accurately what the full namespace is.&lt;/p&gt;
&lt;p&gt;prefix.cc, created by &lt;a href="http://richard.cyganiak.de"&gt;Richard Cyganiak&lt;/a&gt; from &lt;span class="caps"&gt;DERI&lt;/span&gt;, lets you type in the prefix, e.g. &lt;em&gt;owl&lt;/em&gt; and returns the full namespace (e.g. &lt;em&gt;http://www.w3.org/2002/07/owl#&lt;/em&gt;) that you can use in a &lt;span class="caps"&gt;PREFIX&lt;/span&gt; definition in your &lt;span class="caps"&gt;SPARQL&lt;/span&gt; query.&lt;/p&gt;
&lt;p&gt;It also has a &lt;a href="http://prefix.cc/about/api"&gt;simple &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=my4AKUwBdd4:VfkUrPVCl-c:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=my4AKUwBdd4:VfkUrPVCl-c:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=my4AKUwBdd4:VfkUrPVCl-c:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?i=my4AKUwBdd4:VfkUrPVCl-c:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/learnlinkeddata/~4/my4AKUwBdd4" height="1" width="1"/&gt;</description>
      <pubDate>Tue, 24 Apr 2012 16:33:41 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/learnlinkeddata/~3/my4AKUwBdd4/simple-namespace-lookup</link>
      <guid isPermaLink="false">http://learnlinkeddata.com/articles/simple-namespace-lookup?updated_at=2012-04-24T16:33:41</guid>
    <feedburner:origLink>http://learnlinkeddata.com/articles/simple-namespace-lookup?updated_at=2012-04-24T16:33:41</feedburner:origLink></item>
    <item>
      <title>An Introduction to RDF</title>
      <description>&lt;h3&gt;What is &lt;span class="caps"&gt;RDF&lt;/span&gt;?&lt;/h3&gt;
&lt;p&gt;Linked Data is based around describing real world things using &lt;span class="caps"&gt;RDF&lt;/span&gt;. A lot of articles about Linked Data assume you already know what &lt;span class="caps"&gt;RDF&lt;/span&gt; is all about: if you are coming to it for the first time, this article explains the basics.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;RDF&lt;/span&gt;&lt;/strong&gt; stands for &lt;em&gt;Resource Description Framework&lt;/em&gt;. It’s a W3C standard for modeling information.&lt;/p&gt;
&lt;h3&gt;&lt;span class="caps"&gt;RDF&lt;/span&gt; Triples&lt;/h3&gt;
&lt;p&gt;&lt;span class="caps"&gt;RDF&lt;/span&gt; allows you to define &lt;em&gt;statements&lt;/em&gt; about things (or &lt;em&gt;resources&lt;/em&gt;), in the form of &lt;em&gt;subject-predicate-object&lt;/em&gt; expressions (known as &lt;span class="caps"&gt;RDF&lt;/span&gt;-triples due to the 3 constituent parts).&lt;/p&gt;
&lt;p&gt;This might sound very technical, but the meanings of &lt;em&gt;subject&lt;/em&gt;, &lt;em&gt;predicate&lt;/em&gt;, and &lt;em&gt;object&lt;/em&gt; are essentially the same as in English grammar. i.e.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;subject&lt;/strong&gt;: The thing we’re talking about. In &lt;span class="caps"&gt;RDF&lt;/span&gt;, this is the resource in question.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;predicate&lt;/strong&gt;: A term used to describe or modify some aspect of the &lt;em&gt;subject&lt;/em&gt;. In &lt;span class="caps"&gt;RDF&lt;/span&gt;, the predicate is used to denote relationships between the subject and the object.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;object&lt;/strong&gt;: In English the object of a sentence is the thing that the verb is acting upon. In &lt;span class="caps"&gt;RDF&lt;/span&gt;, it&amp;#8217;s the &amp;#8220;target&amp;#8221; or &amp;#8220;value&amp;#8221; of the triple. It can be another resource, or just a literal value such as a number or word.&lt;/p&gt;
&lt;h3&gt;An example&lt;/h3&gt;
&lt;p&gt;That was all a bit hand-wavey, so let&amp;#8217;s use an example to make it a bit clearer. Take the sentence:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Ric&amp;#8217;s blog can be found at ricroberts.com&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In this sentence, &amp;#8220;Ric&amp;#8221; is the subject, &amp;#8220;blog&amp;#8221; is the predicate and &amp;#8220;ricroberts.com&amp;#8221; is the object. (I know that this is probably not exactly grammatically correct, but bear with me&amp;#8230;).&lt;/p&gt;
&lt;h4&gt;Our first &lt;span class="caps"&gt;RDF&lt;/span&gt; triple&lt;/h4&gt;
&lt;p&gt;Let&amp;#8217;s deconstruct this a bit, and express it as &lt;span class="caps"&gt;RDF&lt;/span&gt;&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;subject:&lt;/strong&gt;&lt;br /&gt;
The resource in question is a person (me). In &lt;span class="caps"&gt;RDF&lt;/span&gt;, we use &lt;a href="https://en.wikipedia.org/wiki/Uniform_Resource_Identifier"&gt;&lt;span class="caps"&gt;URI&lt;/span&gt;&lt;/a&gt;s to uniquely identify resources.  Let&amp;#8217;s use &lt;a href="http://swirrl.com/ric.rdf#me"&gt;http://swirrl.com/ric.rdf#me&lt;/a&gt; as the &lt;span class="caps"&gt;URI&lt;/span&gt; to identify me. I&amp;#8217;m fairly confident that no-one else will use that &lt;span class="caps"&gt;URI&lt;/span&gt; to identify themselves as I control the swirrl.com domain, so I can control what is returned when it&amp;#8217;s dereferenced (looked up).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Aside: You may well have clicked on that link above. If you did, it will, depending on your browser, render or download an &lt;span class="caps"&gt;RDF&lt;/span&gt; graph (a collection of rdf triples) that describe some facts about me. Don&amp;#8217;t worry about the contents of that for now: the point here is that looking up a &lt;span class="caps"&gt;URI&lt;/span&gt; can sometimes return useful information about the resource. For more about dereferencing URIs, see &lt;a href="http://learnlinkeddata.com/articles/what-is-linked-data"&gt;What is Linked Data?&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;predicate:&lt;/strong&gt;&lt;br /&gt;
We need to find a term which we can use to mean &amp;#8220;blog&amp;#8221;. For this example I&amp;#8217;m going to use a term from the &lt;a href="http://xmlns.com/foaf/spec"&gt;&lt;span class="caps"&gt;FOAF&lt;/span&gt;&lt;/a&gt; (Friend-of-a-Friend) vocabulary. Predicates are also identified by URIs: FOAF&amp;#8217;s &lt;span class="caps"&gt;URI&lt;/span&gt; for the &lt;em&gt;weblog&lt;/em&gt; predicate is &lt;a href="http://xmlns.com/foaf/0.1/weblog"&gt;http://xmlns.com/foaf/0.1/weblog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;object:&lt;/strong&gt;&lt;br /&gt;
The object of this triple is just a &lt;span class="caps"&gt;URL&lt;/span&gt; which identifies the home page of my blog &lt;a href="http://ricroberts.com"&gt;http://ricroberts.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;the triple:&lt;/strong&gt;&lt;br /&gt;
Putting it all together, we have:&lt;br /&gt;
subject: http://swirrl.com/ric.rdf#me&lt;br /&gt;
predicate: http://xmlns.com/foaf/0.1/weblog&lt;br /&gt;
object: http://ricroberts.com&lt;/p&gt;
&lt;h4&gt;Serializing our triple&lt;/h4&gt;
&lt;p&gt;There are various ways to express our &lt;span class="caps"&gt;RDF&lt;/span&gt; triple:&lt;/p&gt;
&lt;h5&gt;Blob and Line&lt;/h5&gt;
&lt;p&gt;One of the simplest ways to express &lt;span class="caps"&gt;RDF&lt;/span&gt; is via what I call &lt;em&gt;blob and line&lt;/em&gt; diagrams (someone correct me if there&amp;#8217;s an official term for them). URIs are expressed as blobs, and predicates are lines. Literal values (numbers, words etc.) would be in rectangles, but we don&amp;#8217;t have any in our triple.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://learnlinkeddata.s3.amazonaws.com/circle-line.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Blob and line diagrams are easy for humans to understand at a glance, at least where you only have a small number of triples, but aren&amp;#8217;t (easily) machine readable.&lt;/p&gt;
&lt;h5&gt;Machine readable formats&lt;/h5&gt;
&lt;p&gt;There are various ways of expressing &lt;span class="caps"&gt;RDF&lt;/span&gt; triples in more machine-friendly ways, including &lt;span class="caps"&gt;RDF&lt;/span&gt;/&lt;span class="caps"&gt;XML&lt;/span&gt;, Turtle and N-triples, which we&amp;#8217;ll discuss in a future article.&lt;/p&gt;
&lt;h3&gt;What have we learnt here?&lt;/h3&gt;
&lt;p&gt;To summarise, we&amp;#8217;ve learnt that you can use &lt;span class="caps"&gt;RDF&lt;/span&gt; to express facts as triples, where URIs are used to identify resources (things) and concepts.  Dereferencing (looking up) resources by their URIs can yield more information about them.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=1NUyQTG1KBg:dhU8AWdFysI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=1NUyQTG1KBg:dhU8AWdFysI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=1NUyQTG1KBg:dhU8AWdFysI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?i=1NUyQTG1KBg:dhU8AWdFysI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/learnlinkeddata/~4/1NUyQTG1KBg" height="1" width="1"/&gt;</description>
      <pubDate>Fri, 13 Apr 2012 14:04:58 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/learnlinkeddata/~3/1NUyQTG1KBg/introduction-to-rdf</link>
      <guid isPermaLink="false">http://learnlinkeddata.com/articles/introduction-to-rdf?updated_at=2012-04-13T14:14:49</guid>
    <feedburner:origLink>http://learnlinkeddata.com/articles/introduction-to-rdf?updated_at=2012-04-13T14:14:49</feedburner:origLink></item>
    <item>
      <title>Mapping the English Deprivation Stats: Part 3 - Using JavaScript to build and execute the query</title>
      <description>&lt;p&gt;&lt;em&gt;It&amp;#8217;s been a while coming, but (finally), I&amp;#8217;d like to present this 3rd article in the series. Together, we&amp;#8217;re building a Linked Data &lt;a href="http://opendatacommunities.org/imd_mapper/map.html"&gt;application&lt;/a&gt; to map the English Indices of Multiple Deprivation Stats. The final source code for the app can be found &lt;a href="http://github.com/swirrl/imd_mapper"&gt;on github&lt;/a&gt;. If you missed the last blog post in the series, you can find it &lt;a href="http://learnlinkeddata.com/articles/mapping-the-english-deprivation-stats-part-2-querying-data"&gt;here&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: These articles use Github gists for showing code-snippets, and if you’re viewing this in a feed reader they might not show up. So I recommend you read it &lt;a href="http://learnlinkeddata.com/articles/mapping-the-english-deprivation-stats-part-3-using-javascript-to-build-and-execute-the-query"&gt;on the web instead&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;What the app will do:&lt;/h3&gt;
&lt;p&gt;The basic principle of the app is that the user pans or zooms or searches by postcode to change which bit of the map they are looking at. The app detects that, retrieves the required data using &lt;span class="caps"&gt;SPARQL&lt;/span&gt;, then draws it on the map. You can play with the finished app on the OpenDataCommunities site &lt;a href="http://opendatacommunities.org/imd_mapper/map.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Last time&amp;#8230;&lt;/h3&gt;
&lt;p&gt;In the last article we explored how the deprivation data was stored, wrote a template &lt;span class="caps"&gt;SPARQL&lt;/span&gt; query, and drew a standard Google map centred on a starting location.&lt;/p&gt;
&lt;p&gt;By the way, I&amp;#8217;ve created a &lt;a href="https://github.com/Swirrl/imd_mapper_blog"&gt;new Github repo&lt;/a&gt; especially for this blog-series, so that you can watch the application evolve through the git commits. Everything that we did in parts 1 and 2 are in commit &lt;a href="https://github.com/Swirrl/imd_mapper_blog/commit/bce3021b0b3036f60127ae95082418432ad56fd9"&gt;bce302&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this article, we&amp;#8217;ll write some JavaScript to build and execute the right &lt;span class="caps"&gt;SPARQL&lt;/span&gt; query (based on the template from last time), to retrieve the deprivation data about the LSOAs currently displayed on the map. The code from this article is in commit &lt;a href="https://github.com/Swirrl/imd_mapper_blog/commit/17e211768c84476340477e5e29237bb1ed550790"&gt;17e211&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;A note about &lt;span class="caps"&gt;CORS&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;On the web server on which &lt;a href="http://opendatacommunities.org"&gt;OpenDataCommunities&lt;/a&gt; is hosted, we&amp;#8217;ve enabled Cross-Origin Resource Sharing (&lt;span class="caps"&gt;CORS&lt;/span&gt;), so that Ajax requests for the data can be made from sites not on the same domain. However, for this to be honoured, you&amp;#8217;ll need to host the app on a web server (such as Apache), while you develop it. Just opening the html from your disk in a browser won&amp;#8217;t work.&lt;/p&gt;
&lt;h3&gt;Map Manager&lt;/h3&gt;
&lt;p&gt;Much of the code we&amp;#8217;ll write in this article will be in a file called map-manager.js, in the &lt;code&gt;javascripts/swirrl&lt;/code&gt; directory. As you might expect, the MapManager will be responsible for dealing with the interaction with the map. The following code snippet explains the structure of the file:&lt;/p&gt;
&lt;script src="https://gist.github.com/1639717.js?file=map-manager.js"&gt;&lt;/script&gt;&lt;h3&gt;What&amp;#8217;s going to happen?&amp;#8230;&lt;/h3&gt;
&lt;p&gt;We&amp;#8217;re going to add some code to the main JavaScript closure (in the &lt;span class="caps"&gt;HTML&lt;/span&gt; file) which will listen for Google maps &lt;code&gt;idle&lt;/code&gt; events (i.e. when the map stops being zoomed or dragged).&lt;/p&gt;
&lt;p&gt;When we notice that the map has become idle, we&amp;#8217;ll ask the &lt;code&gt;MapManager&lt;/code&gt; to refresh the map.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;MapManager&lt;/code&gt; will report back to the main closure, using jQuery events, so that it can start listening again for &lt;code&gt;idle&lt;/code&gt; events.&lt;/p&gt;
&lt;h3&gt;The MapManager Constructor&lt;/h3&gt;
&lt;p&gt;The constructor for the &lt;code&gt;MapManager&lt;/code&gt; takes the Google Map object and the initial score domain (from the drop down) as it&amp;#8217;s parameters, and sets some stuff up.&lt;/p&gt;
&lt;script src="https://gist.github.com/1639783.js?file=map-manager.js"&gt;&lt;/script&gt;&lt;p&gt;Interesting things to note:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;We assign &lt;code&gt;this&lt;/code&gt; into a variable called &lt;code&gt;self&lt;/code&gt; so that when &lt;code&gt;this&lt;/code&gt; gets set to other things (in jQuery callbacks etc), we can always get a reference to the current &lt;code&gt;MapManager&lt;/code&gt; object.&lt;/li&gt;
	&lt;li&gt;The &lt;code&gt;lsoaDataRetrieved&lt;/code&gt; event will be triggered by another function when the deprivation data has been retrieved and is ready for use. For now, we&amp;#8217;re just going to log out the results (there&amp;#8217;s a gist later on with an example log-output), and tell the calling code that we&amp;#8217;ve finished.&lt;/li&gt;
	&lt;li&gt;Finally, there&amp;#8217;s a little bit of code to clean up if there are errors.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;The refresh function&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;refresh&lt;/code&gt; function (along with the constructor) will form the public &lt;span class="caps"&gt;API&lt;/span&gt; for the &lt;code&gt;MapManager&lt;/code&gt;. Let&amp;#8217;s add it to the prototype:&lt;/p&gt;
&lt;script src="https://gist.github.com/1639834.js?file=map-manager.js"&gt;&lt;/script&gt;&lt;ul&gt;
	&lt;li&gt;When execution of the function begins, we&amp;#8217;ll trigger the &lt;code&gt;started&lt;/code&gt; event to tell others that we&amp;#8217;re starting the process of refreshing the map.&lt;/li&gt;
	&lt;li&gt;If the Google map&amp;#8217;s zoom level is acceptable (if we&amp;#8217;re too zoomed-out there&amp;#8217;ll be too much data to handle), we proceed. Otherwise, we do nothing other than trigger a couple of events.&lt;/li&gt;
	&lt;li&gt;the &lt;code&gt;getTiles&lt;/code&gt; function (for brevity, not included in this article &amp;#8211; see the source on github for details*), interrogates the google map and determines which 0.1&amp;#215;0.1 lat/long tiles are visible in the viewport.&lt;/li&gt;
	&lt;li&gt;Next we remove any tiles that are no longer visible in the viewport, and add any new ones by comparing the results from &lt;code&gt;getTiles&lt;/code&gt; with the set of tiles from the previous time &lt;code&gt;refresh&lt;/code&gt; was called. The reason we do this is for efficiency: we don&amp;#8217;t need to request data for tiles for which we already have data.&lt;/li&gt;
	&lt;li&gt;Finally, we call &lt;code&gt;getLsoaData&lt;/code&gt;, passing in the set of tiles currently visible.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Getting the &lt;span class="caps"&gt;LSOA&lt;/span&gt; Data&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;getLsoaData&lt;/code&gt; function is responsible for building the right &lt;span class="caps"&gt;SPARQL&lt;/span&gt; query to call (based on the template query in the previous article), and executing it against the &lt;a href="http://opendatacommunities.org/sparql.json"&gt;OpenDataCommunities &lt;span class="caps"&gt;SPARQL&lt;/span&gt; endpoint&lt;/a&gt;.&lt;/p&gt;
&lt;script src="https://gist.github.com/1639924.js?file=map-manager.js"&gt;&lt;/script&gt;&lt;p&gt;That code might look a bit complicated, but it&amp;#8217;s not really. Let me break it down a bit.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;buildSparql&lt;/code&gt; is a nested function (as it wont be needed outside the scope of &lt;code&gt;getLsoaData&lt;/code&gt;). It&amp;#8217;s responsible for interpolating the bottom-left and top-right lat/long values of &lt;em&gt;tiles&lt;/em&gt; into the template &lt;span class="caps"&gt;SPARQL&lt;/span&gt; query.&lt;/li&gt;
	&lt;li&gt;&lt;code&gt;callAjaxSparqlPaging&lt;/code&gt; is another nested function, which calls itself recursively until all the pages of data have been retrieved (the &lt;span class="caps"&gt;SPARQL&lt;/span&gt; endpoint will return the data in 1000-result &amp;#8216;pages&amp;#8217;).&lt;/li&gt;
	&lt;li&gt;For each result of each page (in the &lt;code&gt;$.ajax&lt;/code&gt; &lt;code&gt;success&lt;/code&gt; callback), we call &lt;code&gt;setLsoaData&lt;/code&gt; which just sets the data for an &lt;span class="caps"&gt;LSOA&lt;/span&gt; (such as label, centroid lat/long, score, and &lt;span class="caps"&gt;URI&lt;/span&gt;) into a nested object (with the top level properties being the tile&amp;#8217;s corners, and the inner objects&amp;#8217; properties being the notation of the &lt;span class="caps"&gt;LSOA&lt;/span&gt; (e.g. &amp;#8216;E01005061&amp;#8217;). See the example log-output later on for an example of this structure.&lt;/li&gt;
	&lt;li&gt;The code at the end of the &lt;code&gt;getLsoaData&lt;/code&gt; function, calls the &lt;span class="caps"&gt;SPARQL&lt;/span&gt; query for each tile in our list of tiles.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Calling the refresh function&lt;/h3&gt;
&lt;p&gt;As I mentioned earlier, the main JavaScript closure in the &lt;span class="caps"&gt;HTML&lt;/span&gt; file is responsible for instantiating a &lt;code&gt;MapManager&lt;/code&gt; and calling &lt;code&gt;refresh&lt;/code&gt;. Let&amp;#8217;s see what that looks like:&lt;/p&gt;
&lt;script src="https://gist.github.com/1640003.js?file=map-html.js"&gt;&lt;/script&gt;&lt;ul&gt;
	&lt;li&gt;The first bit of code is what we set up in the previous article to just create the Google map centred on Manchester.&lt;/li&gt;
	&lt;li&gt;Next, we instantiate a MapManager, with the map object.&lt;/li&gt;
	&lt;li&gt;At the end of this code-snippet, we define a &lt;code&gt;bindMapIdle&lt;/code&gt; function, and then call it. As I described at the top of the article, this calls the &lt;code&gt;refresh&lt;/code&gt; function when we see that the map is &lt;code&gt;idle&lt;/code&gt;.&lt;/li&gt;
	&lt;li&gt;The &lt;code&gt;started&lt;/code&gt; event listener makes a note of the time, and then removes the &lt;/code&gt;idleListener&lt;/code&gt; if it exists (so that we only call refresh once at a time). It also shows the busy &amp;#8216;spinner&amp;#8217;.&lt;/li&gt;
	&lt;li&gt;Once &lt;code&gt;refresh&lt;/code&gt; has &lt;code&gt;finished&lt;/code&gt;, we log how long it took, hide the spinner, and re-bind the idle listener.&lt;/li&gt;
	&lt;li&gt;The &lt;code&gt;zoomToWide&lt;/code&gt; and &lt;code&gt;zoomOK&lt;/code&gt; handlers, just show and hide the zoom warning message (shown if the user zooms out too much and we can&amp;#8217;t show all the data).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Let&amp;#8217;s run it!&lt;/h3&gt;
&lt;p&gt;We&amp;#8217;re now ready to see what all our code does.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;ve been following along, just open the map.html file (from your web server) in your browser. (If you&amp;#8217;ve not been following along, just check out the code from &lt;a href="https://github.com/Swirrl/imd_mapper_blog/commit/17e211768c84476340477e5e29237bb1ed550790"&gt;this commit&lt;/a&gt; in Github).&lt;/p&gt;
&lt;p&gt;Open your browser&amp;#8217;s debug/console window (i.e. Web Inspector in Chrome/Safari, or Firebug in Firefox), and hit refresh.  You should see a bunch of log-output lines including information on what requests were made against &lt;span class="caps"&gt;SPARQL&lt;/span&gt; endpoint and how long it took (&amp;#8220;busy duration&amp;#8221;).&lt;/p&gt;
&lt;p&gt;Just before the busy duration message, there should be an entry that looks like this: &lt;code&gt;[&amp;gt;Object]&lt;/code&gt; (in Webkit-based browsers, at least). Click the triangle to expand the object, and you can see what data we have for the LSOAs with centroids in the current viewport. (This is what is logged out from the &lt;code&gt;lsoaDataRetrieved&lt;/code&gt; handler in the &lt;code&gt;MapManager&lt;/code&gt; constructor.)&lt;/p&gt;
&lt;p&gt;As I mentioned earlier, the top-level properties are the tiles. Each tile is an object whose properties which correspond to the LSOAs. Each &lt;span class="caps"&gt;LSOA&lt;/span&gt; contains data such as it&amp;#8217;s label, the lat/long, the score for the currently selected domain, and the &lt;span class="caps"&gt;URI&lt;/span&gt; of the &lt;span class="caps"&gt;LSOA&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;For example:&lt;br /&gt;
&lt;script src="https://gist.github.com/1639973.js?file=lsoaData.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;Try dragging and zooming the map, and watch what happens in the console window. The further zoomed out you are, the more tiles of data you will see.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://learnlinkeddata.s3.amazonaws.com/map-debug.png" alt="" /&gt;&lt;/p&gt;
&lt;h3&gt;Next time&lt;/h3&gt;
&lt;p&gt;In the next instalment (I promise not to leave it so long this time), we&amp;#8217;ll get the boundary information for all the LSOAs and plot that on the map as polygons. If there&amp;#8217;s time, we&amp;#8217;ll also make these interactive.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;span style="font-size:13px"&gt;*To be honest, I&amp;#8217;m not particularly proud of this bit of code &amp;#8211; it&amp;#8217;s pretty hacky, but it does the job!&lt;/span&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=r43SuMcmedQ:LeiKOHAS77Y:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=r43SuMcmedQ:LeiKOHAS77Y:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=r43SuMcmedQ:LeiKOHAS77Y:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?i=r43SuMcmedQ:LeiKOHAS77Y:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/learnlinkeddata/~4/r43SuMcmedQ" height="1" width="1"/&gt;</description>
      <pubDate>Thu, 19 Jan 2012 14:03:52 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/learnlinkeddata/~3/r43SuMcmedQ/mapping-the-english-deprivation-stats-part-3-using-javascript-to-build-and-execute-the-query</link>
      <guid isPermaLink="false">http://learnlinkeddata.com/articles/mapping-the-english-deprivation-stats-part-3-using-javascript-to-build-and-execute-the-query?updated_at=2012-01-19T14:03:52</guid>
    <feedburner:origLink>http://learnlinkeddata.com/articles/mapping-the-english-deprivation-stats-part-3-using-javascript-to-build-and-execute-the-query?updated_at=2012-01-19T14:03:52</feedburner:origLink></item>
    <item>
      <title>Mapping the English Deprivation Stats: Part 2 - Querying the data</title>
      <description>&lt;p&gt;&lt;em&gt;This article the 2nd in a series, where we&amp;#8217;re building a Linked Data &lt;a href="http://opendatacommunities.org/imd_mapper/map.html"&gt;application&lt;/a&gt; to map the English Indices of Multiple Deprivation Stats. The final source code for the app can be found &lt;a href="http://github.com/swirrl/imd_mapper"&gt;on github&lt;/a&gt;. If you missed the first part, you can find it &lt;a href="http://learnlinkeddata.com/articles/lets-make-a-linked-data-app-mapping-imd-stats"&gt;here&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: These articles use Github gists for showing code-snippets, and if you’re viewing this in a feed reader they might not show up. So I recommend you read it &lt;a href="http://learnlinkeddata.com/articles/mapping-the-english-deprivation-stats-part-2-map-manager"&gt;on the web instead&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Last time&amp;#8230;&lt;/h3&gt;
&lt;p&gt;In the last instalment, we got the basic page and code structure set up. In this article we&amp;#8217;ll explore how the deprivation data is stored, write some &lt;span class="caps"&gt;SPARQL&lt;/span&gt; to query it, and draw a Google map.&lt;/p&gt;
&lt;h3&gt;Score Data&lt;/h3&gt;
&lt;p&gt;The score data is available as Linked Data in a &lt;a href="http://opendatacommunities.org/datasets"&gt;variety of datasets&lt;/a&gt;: one for each deprivation domain (i.e. housing, crime etc), plus a dataset of combined scores. All of the data in these datasets is accessible through a &lt;a href="http://opendatacommunities.org/sparql"&gt;&lt;span class="caps"&gt;SPARQL&lt;/span&gt; endpoint&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://publishmydata.com"&gt;PublishMyData&lt;/a&gt;, the platform on which this Linked Data is hosted, caches the results of commonly executed &lt;span class="caps"&gt;SPARQL&lt;/span&gt; queries (and will therefore respond more quickly to common queries). This means that by making our app only make a relatively small number of distinct different queries against the server, we can ensure better performance. We should bear this in mind for later.&lt;/p&gt;
&lt;h3&gt;Boundary Data&lt;/h3&gt;
&lt;p&gt;The boundaries of the LSOAs are available as &lt;a href="http://geojson.org/"&gt;GeoJSON&lt;/a&gt; in two forms from the OpenDataCommunities.org server:&lt;/p&gt;
&lt;p&gt;1. Individual polygon definitions with urls such as:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http://opendatacommunities.org/lsoa_boundaries/E01017190.json&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;2. Polygon-definitions for 0.1-degree lat-long &amp;#8216;square&amp;#8217; tiles, with urls such as:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http://opendatacommunities.org/lsoa_tiles/lat53.4/long-2.3.json&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;Getting the data&lt;/h3&gt;
&lt;p&gt;There are over 32,000 LSOAs in England, and 8 different indicators of deprivation, which makes a total of over a quarter of a million &lt;em&gt;observations&lt;/em&gt; (like &lt;a href="http://opendatacommunities.org/doc/IMD/2010/IMD-score/LSOA/E01005134"&gt;this one&lt;/a&gt;).  So, it wouldn&amp;#8217;t make sense to just download all the data to the browser: we only want to get the data relevant to the portion of the map currently being viewed. Let&amp;#8217;s do this via a &lt;span class="caps"&gt;SPARQL&lt;/span&gt; query.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Aside&lt;/strong&gt;: Various other visualisations have been made using &lt;a href="http://www.google.com/fusiontables"&gt;Google Fusion tables&lt;/a&gt; to map deprivation in England (such as &lt;a href="http://www.guardian.co.uk/news/datablog/2011/mar/31/deprivation-map-indices-multiple"&gt;this one by the Guardian&lt;/a&gt;). Google Fusion tables are neat because they allow you to quickly augment a Google map with data, but they limit what kind interaction you can build into the map.  I want to be able to add custom JavaScript interactivity to the &lt;span class="caps"&gt;LSOA&lt;/span&gt; polygons on my map.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The following query will get all the LSOAs along with their scores and lat/long centroids within a certain bounded area:&lt;/p&gt;
&lt;script src="https://gist.github.com/1249100.js"&gt; &lt;/script&gt;&lt;p&gt;(You can see the results of this query, and experiment with the &lt;span class="caps"&gt;SPARQL&lt;/span&gt;, &lt;a href="http://opendatacommunities.org/sparql?_page=1&amp;amp;_per_page=20&amp;amp;query=PREFIX%20geo%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2003%2F01%2Fgeo%2Fwgs84_pos%23%3E%20PREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%20SELECT%20%3Flsoa%20%3Fnotation%20%3Flabel%20%3Flat%20%3Flong%20%3Fscore%20WHERE%20{%20%20%20GRAPH%20%3Chttp%3A%2F%2Fopendatacommunities.org%2Fid%2Fgraph%2Fgeography%2Flsoa%3E%20{%20%20%20%20%20%3Flsoa%20a%20%3Chttp%3A%2F%2Fopendatacommunities.org%2Fdef%2Fgeography%23LSOA%3E%20.%20%20%20%20%20%3Flsoa%20geo%3Alat%20%3Flat%20.%20%20%20%20%20%3Flsoa%20geo%3Along%20%3Flong%20.%20%20%20%20%20%3Flsoa%20%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23notation%3E%20%3Fnotation%20.%20%20%20%20%20%3Flsoa%20rdfs%3Alabel%20%3Flabel%20.%20%20%20}%20%20%20GRAPH%20%3Chttp%3A%2F%2Fopendatacommunities.org%2Fid%2Fgraph%2FIMD%2F2010%2FIMD-score%3E%20{%20%20%20%20%20%20%3Fobs%20%3Chttp%3A%2F%2Fpurl.org%2Flinked-data%2Fsdmx%2F2009%2Fdimension%23refArea%3E%20%3Flsoa%20.%20%20%20%20%20%3Fobs%20%3Chttp%3A%2F%2Fopendatacommunities.org%2Fdef%2FIMD%23IMD-score%3E%20%3Fscore%20.%20%20%20}%20%20%20FILTER%20(%20%3Flat%20%3E%3D%2053.4%20%26%26%20%20%20%20%20%3Flat%20%3C%2053.5%20%26%26%20%20%20%20%20%3Flong%20%3E%3D%20-2.3%20%26%26%20%20%20%20%20%3Flong%20%3C%20-2.2%20)%20.%20}"&gt;here&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Bearing in mind what I said earlier about how the caching works for &lt;span class="caps"&gt;SPARQL&lt;/span&gt; queries on our server, let&amp;#8217;s make our JavaScript code generate queries like that, which get the data for a 0.1&amp;#215;0.1 degree tile.  There are roughly 2000 of these tiles which cover the country, so we&amp;#8217;re fairly likely to get a cache hit once people start playing with the app &amp;#8230;and handily it matches up nicely with how the &lt;span class="caps"&gt;LSOA&lt;/span&gt; boundary data is organised too!&lt;/p&gt;
&lt;h3&gt;Drawing the Map&lt;/h3&gt;
&lt;p&gt;Before we can do anything interesting, we&amp;#8217;ll need a Google map object, so lets make one in our main closure (in the &lt;span class="caps"&gt;HTML&lt;/span&gt; page). The map will draw itself in the &lt;code&gt;map_canvas&lt;/code&gt; element, and initialize its location to Manchester, where my office is (feel free to pick a different initial location if you like).&lt;/p&gt;
&lt;script src="https://gist.github.com/1226811.js"&gt;&lt;/script&gt;&lt;p&gt;Refresh your browser, and you should see the map being rendered at your initial lat/long.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://learnlinkeddata.s3.amazonaws.com/manchester_map_only_screenshot.png" alt="" /&gt;&lt;/p&gt;
&lt;h3&gt;Next time&amp;#8230;&lt;/h3&gt;
&lt;p&gt;In the next instalment we&amp;#8217;ll add some JavaScript to generate the correct &lt;span class="caps"&gt;SPARQL&lt;/span&gt; query for the currently displayed area on the map, and hopefully get on to actually drawing the boundaries too.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=wF3B48Jhsmw:bXWZwJfvU-Y:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=wF3B48Jhsmw:bXWZwJfvU-Y:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=wF3B48Jhsmw:bXWZwJfvU-Y:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?i=wF3B48Jhsmw:bXWZwJfvU-Y:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/learnlinkeddata/~4/wF3B48Jhsmw" height="1" width="1"/&gt;</description>
      <pubDate>Fri, 30 Sep 2011 11:45:30 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/learnlinkeddata/~3/wF3B48Jhsmw/mapping-the-english-deprivation-stats-part-2-querying-data</link>
      <guid isPermaLink="false">http://learnlinkeddata.com/articles/mapping-the-english-deprivation-stats-part-2-querying-data?updated_at=2011-09-30T11:45:30</guid>
    <feedburner:origLink>http://learnlinkeddata.com/articles/mapping-the-english-deprivation-stats-part-2-querying-data?updated_at=2011-09-30T11:45:30</feedburner:origLink></item>
    <item>
      <title>Let's make a Linked Data app: Mapping the English Deprivation Stats</title>
      <description>&lt;p&gt;Earlier this year, we (&lt;a href="http://swirrl.com"&gt;Swirrl&lt;/a&gt;), launched the &lt;a href="http://opendatacommunities.org"&gt;OpenDataCommunities&lt;/a&gt; site, on which we host a Linked Data version of the 2010 English Indices of Multiple Deprivation.&lt;/p&gt;
&lt;h3&gt;Map Explorer&lt;/h3&gt;
&lt;p&gt;Over the last week or so, I&amp;#8217;ve been building a map-based web app (check it out &lt;a href="http://opendatacommunities.org/imd_mapper/map.html"&gt;here&lt;/a&gt;), which can be used to explore the data from OpenDataCommunities. The map shows the &lt;a href="http://en.wikipedia.org/wiki/ONS_coding_system"&gt;Lower Layer Super Output Areas&lt;/a&gt; (LSOAs) in England, coloured to indicate the level of deprivation in the area. It&amp;#8217;s just a single web-page, built purely with &lt;span class="caps"&gt;HTML&lt;/span&gt;, &lt;span class="caps"&gt;CSS&lt;/span&gt; and JavaScript.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://opendatacommunities.org/imd_mapper/map.html"&gt;&lt;img src="http://learnlinkeddata.s3.amazonaws.com/imd_mapper_screenshot.png" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I thought it would be useful for others if I shared how I went about building this little app, to illustrate how the combination of Linked Data and JavaScript lets you create quite rich visualisations, and to explain some JavaScript techniques that could easily be re-used elsewhere.&lt;/p&gt;
&lt;h3&gt;The &amp;#8220;Let&amp;#8217;s make a Linked Data app&amp;#8221; series of blog posts&lt;/h3&gt;
&lt;p&gt;This is the first of a series of blog posts which describes the process I went through.  By following along with these blog articles, you&amp;#8217;ll be able to build up the functionality step-by-step. The final source code for the completed app can be found on &lt;a href="http://github.com/swirrl/imd_mapper"&gt;Swirrl&amp;#8217;s Github account&lt;/a&gt; (it&amp;#8217;s open-source, and you&amp;#8217;re welcome to reuse it as you like).&lt;/p&gt;
&lt;p&gt;Throughout this series, some basic knowledge of JavaScript and &lt;span class="caps"&gt;HTML&lt;/span&gt; and Linked Data is assumed, but I&amp;#8217;ll be explaining everything that I don&amp;#8217;t think is obvious.&lt;/p&gt;
&lt;p&gt;In this first article, I explain how I set up the overall structure of the page and the code. In the next article, we&amp;#8217;ll get on to retrieving and displaying some data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: These articles will use Github &lt;em&gt;gists&lt;/em&gt; for showing code-snippets, and if you’re viewing this in a feed reader they might not show up. So I recommend you &lt;a href="http://learnlinkeddata.com/articles/lets-make-a-linked-data-app-mapping-imd-stats"&gt;read it on the web&lt;/a&gt; instead.&lt;/p&gt;
&lt;h3&gt;Features of the app&lt;/h3&gt;
&lt;p&gt;You&amp;#8217;ll see from playing with the &lt;a href="http://opendatacommunities.org/imd_mapper/map.html"&gt;app&lt;/a&gt; that there are a few main aspects to it:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A Google map, on which the LSOAs are plotted, with a colour-key.&lt;/li&gt;
	&lt;li&gt;A dropdown, to change the deprivation indicator (Combined, Crime, Health etc) being plotted on the map.&lt;/li&gt;
	&lt;li&gt;A form, to centre the map by postcode.&lt;/li&gt;
	&lt;li&gt;A sidebar which shows additional information about the selected &lt;span class="caps"&gt;LSOA&lt;/span&gt; (area). This includes the frequency distribution of the scores for the current deprivation indicator, and links to the Linked Data resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Page Structure&lt;/h3&gt;
&lt;p&gt;First, let&amp;#8217;s set up the basic &lt;span class="caps"&gt;HTML&lt;/span&gt; page structure that will be used for everything in the app.&lt;/p&gt;
&lt;script src="http://gist.github.com/1226717.js"&gt; &lt;/script&gt;&lt;p&gt;We&amp;#8217;re going to be using &lt;a href="http://code.google.com/apis/maps/documentation/javascript/"&gt;Google&amp;#8217;s map &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt; and &lt;a href="http://raphaeljs.com/"&gt;Raphael.js&lt;/a&gt;, so let&amp;#8217;s include them in the page&amp;#8217;s head. Also, in the head is a link to the stylesheet that I used for the page (you can find this file &lt;a href="https://github.com/Swirrl/imd_mapper/blob/master/stylesheets/map.css"&gt;here&lt;/a&gt;. In the interest of brevity, I wont bother including it in this blog post).&lt;/p&gt;
&lt;p&gt;In the body of the page, there&amp;#8217;s a &lt;code&gt;container&lt;/code&gt; element that wraps everything. This is useful for the way I wanted to do the stylesheet. The &lt;code&gt;info&lt;/code&gt; element is the sidebar, and the &lt;code&gt;map_canvas&lt;/code&gt; is where the map will be rendered. Next, we have the &lt;code&gt;domain&lt;/code&gt; drop-down selector, and an element called &lt;code&gt;colour_key&lt;/code&gt; in which the colour-key will eventually go. Finally, we&amp;#8217;ll be putting some &lt;span class="caps"&gt;HTML&lt;/span&gt; in &lt;code&gt;templates&lt;/code&gt; which we don&amp;#8217;t want to render directly, but which we&amp;#8217;ll reuse to display some information in the sidebar.&lt;/p&gt;
&lt;p&gt;If you create that &lt;span class="caps"&gt;HTML&lt;/span&gt; page, and make the stylesheet available at the right relative path, you should be able to view the basic page structure in your browser.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://learnlinkeddata.s3.amazonaws.com/imd_mapper_structure_screenshot.png" alt="" /&gt;&lt;/p&gt;
&lt;h3&gt;Code Structure&lt;/h3&gt;
&lt;p&gt;To keep things nicely organised, let&amp;#8217;s just put JavaScript code that deals with the &lt;span class="caps"&gt;DOM&lt;/span&gt; in the &lt;span class="caps"&gt;HTML&lt;/span&gt; file itself, and put everything else in separate JavaScript files, each with its own job.&lt;/p&gt;
&lt;p&gt;To avoid polluting the global namespace (that is, to avoid any possible name clashes with other JavaScript that might be on the same page), the JavaScript that goes in the &lt;span class="caps"&gt;HTML&lt;/span&gt; page should go in its own closure &amp;#8211; let&amp;#8217;s add that at in the html page, just before we close the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;
&lt;script src="http://gist.github.com/1226779.js"&gt;&lt;/script&gt;&lt;p&gt;Again to avoid polluting the global namespace, we can make a special namespace in which all our JavaScript classes and structures will live. I&amp;#8217;m going to call my namespace &lt;code&gt;swirrl&lt;/code&gt;, and add it to the window object. This code goes in a file called swirrl.js, which we&amp;#8217;ll load in our page&amp;#8217;s head.&lt;/p&gt;
&lt;script src="https://gist.github.com/1226800.js"&gt;&lt;/script&gt;&lt;p&gt;We&amp;#8217;ll be adding more JavaScript files as we go along, and they&amp;#8217;ll add stuff to the &lt;code&gt;swirrl&lt;/code&gt; object.&lt;/p&gt;
&lt;p&gt;This code also adds a simple wrapper to &lt;code&gt;console.log&lt;/code&gt; that checks if the console object exists. We can use &lt;code&gt;window.swirrl.log&lt;/code&gt; in our code instead of &lt;code&gt;console.log&lt;/code&gt;, and we won&amp;#8217;t need to worry about removing all the logging before releasing.&lt;/p&gt;
&lt;h3&gt;Next time&amp;#8230;&lt;/h3&gt;
&lt;p&gt;So that&amp;#8217;s the basic structure of the app set up. There isn&amp;#8217;t much to see yet, but we now have everything nicely organised. We&amp;#8217;ll get cracking with adding some actual functionality next time. Stay tuned!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=59Zt_nZP9Xo:oIj2Prf7zHo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=59Zt_nZP9Xo:oIj2Prf7zHo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=59Zt_nZP9Xo:oIj2Prf7zHo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?i=59Zt_nZP9Xo:oIj2Prf7zHo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/learnlinkeddata/~4/59Zt_nZP9Xo" height="1" width="1"/&gt;</description>
      <pubDate>Mon, 26 Sep 2011 16:13:53 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/learnlinkeddata/~3/59Zt_nZP9Xo/lets-make-a-linked-data-app-mapping-imd-stats</link>
      <guid isPermaLink="false">http://learnlinkeddata.com/articles/lets-make-a-linked-data-app-mapping-imd-stats?updated_at=2011-09-27T11:37:32</guid>
    <feedburner:origLink>http://learnlinkeddata.com/articles/lets-make-a-linked-data-app-mapping-imd-stats?updated_at=2011-09-27T11:37:32</feedburner:origLink></item>
    <item>
      <title>Real-life Linked Data: a diary</title>
      <description>&lt;p&gt;Last weekend we (Ric and Bill from &lt;a href="http://swirrl.com"&gt;Swirrl&lt;/a&gt;) attended the &lt;a href="http://lovelydata01.eventbrite.com/"&gt;Lovely Data&lt;/a&gt; hack-day in Manchester.&lt;/p&gt;
&lt;p&gt;For the event, we&amp;#8217;d promised to make available a Linked Data version of the Transport for Greater Manchester bus stops and schedules data, which had recently been &lt;a href="http://datagm.org.uk/package/atco-cif"&gt;released as open data&lt;/a&gt;. So, during the week leading up to the event, Bill blogged a &lt;em&gt;Linked Data Diary&lt;/em&gt; documenting the steps involved to make this possible, with the hope that it would be a useful illustration of what&amp;#8217;s involved.&lt;/p&gt;
&lt;p&gt;Bill&amp;#8217;s diary entries: &lt;a href="http://blog.swirrl.com/articles/manchester-buses-linked-data-diary-day-1"&gt;day1&lt;/a&gt;, &lt;a href="http://blog.swirrl.com/articles/manchester-buses-linked-data-diary-day-2"&gt;day2&lt;/a&gt;, &lt;a href="http://blog.swirrl.com/articles/manchester-buses-linked-data-diary-day-3"&gt;day3&lt;/a&gt;, &lt;a href="http://blog.swirrl.com/articles/manchester-buses-linked-data-diary-days-4-6"&gt;days4-6&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;At the event itself, as well as lots of interesting discussions around open and linked data, we were pleased to work with &lt;a href="http://bobop.co.uk/"&gt;Ben Gibbs&lt;/a&gt; who spent the day creating a very nice &lt;a href="http://gmbuses.heroku.com"&gt;timetable app&lt;/a&gt;.  Ben’s app gets its data via &lt;span class="caps"&gt;SPARQL&lt;/span&gt; queries against our &lt;a href="http://linkedmanchester.org/datasets/buses"&gt;Linked Manchester buses dataset&lt;/a&gt;.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=93FBNDdxJuI:sUS_0H2sFVU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=93FBNDdxJuI:sUS_0H2sFVU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=93FBNDdxJuI:sUS_0H2sFVU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?i=93FBNDdxJuI:sUS_0H2sFVU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/learnlinkeddata/~4/93FBNDdxJuI" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 13 Apr 2011 20:29:40 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/learnlinkeddata/~3/93FBNDdxJuI/linked-data-diary</link>
      <guid isPermaLink="false">http://learnlinkeddata.com/articles/linked-data-diary?updated_at=2011-04-14T19:28:34</guid>
    <feedburner:origLink>http://learnlinkeddata.com/articles/linked-data-diary?updated_at=2011-04-14T19:28:34</feedburner:origLink></item>
    <item>
      <title>SPARQL example: finding data for a postcode</title>
      <description>&lt;p&gt;To help &lt;span class="caps"&gt;SPARQL&lt;/span&gt; newbies get to grips with the language and to see what kind of things you can do with it, we&amp;#8217;re planning to run regular worked examples of &lt;span class="caps"&gt;SPARQL&lt;/span&gt; queries.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Aside: If you haven&amp;#8217;t worked with &lt;span class="caps"&gt;SPARQL&lt;/span&gt; at all, you might want to do some background reading first, but this article is pretty much self-contained as long as you don&amp;#8217;t mind that we don&amp;#8217;t explain all the &lt;span class="caps"&gt;SPARQL&lt;/span&gt; details.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In this tutorial, we&amp;#8217;re going to be building and running a query to find the names of all the schools in the London Borough of Brent, but we&amp;#8217;ll take it one step at a time.  The concepts we introduce here should come in useful elsewhere as so much Linked Data is geographically based.&lt;/p&gt;
&lt;p&gt;Our example is based around UK datasets, so apologies to readers from other countries, but hopefully the principles will transfer to similar datsets elsewhere.  All the data used in this example is available at &lt;a href="http://publishmydata.com/sparql"&gt;PublishMyData&amp;#8217;s &lt;span class="caps"&gt;SPARQL&lt;/span&gt; endpoint&lt;/a&gt;, if you want to follow along or experiment further.&lt;/p&gt;
&lt;h3&gt;Getting Stuck In&lt;/h3&gt;
&lt;p&gt;Let&amp;#8217;s start with a postcode. We&amp;#8217;ll use HA9 9HD, which as all of you will recognise, is the home of Brent Council. :)&lt;/p&gt;
&lt;p&gt;The first thing we need is a &lt;span class="caps"&gt;URI&lt;/span&gt; for this postcode.  The definitive set of geographical information on postcodes in the UK comes from the Ordnance Survey. The OS identifier for our postcode is:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http://data.ordnancesurvey.co.uk/id/postcodeunit/HA99HD&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If you look up that &lt;span class="caps"&gt;URI&lt;/span&gt; in your browser, you can see what properties of it are available. We&amp;#8217;re going to use the &amp;#8216;District&amp;#8217; property, which has the &lt;span class="caps"&gt;URI&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http://data.ordnancesurvey.co.uk/ontology/postcode/district&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;(I found this out by simply clicking on the link for &amp;#8216;District&amp;#8217; on the page for the postcode.)&lt;/p&gt;
&lt;h3&gt;Our first &lt;span class="caps"&gt;SPARQL&lt;/span&gt; query&lt;/h3&gt;
&lt;p&gt;The query below returns the district for the postcode HA9 9HD:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
PREFIX pc: &amp;lt;http://data.ordnancesurvey.co.uk/ontology/postcode/&amp;gt;

SELECT ?district 
WHERE {
  &amp;lt;http://data.ordnancesurvey.co.uk/id/postcodeunit/HA99HD&amp;gt; pc:district ?district
}
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;If you try that yourself by entering the &lt;span class="caps"&gt;SPARQL&lt;/span&gt; at &lt;a href="http://publishmydata.com/sparql"&gt;PublishMyData&lt;/a&gt; or &lt;a href="http://api.talis.com/stores/ordnance-survey/services/sparql"&gt;Talis&lt;/a&gt;&amp;#8216;s &lt;span class="caps"&gt;SPARQL&lt;/span&gt; endpoint, you&amp;#8217;ll see that the district for the postcode is identified by the &lt;span class="caps"&gt;URI&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http://data.ordnancesurvey.co.uk/id/7000000000011447&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Looking that &lt;span class="caps"&gt;URI&lt;/span&gt; up in your browser will confirm that it&amp;#8217;s the London Borough of Brent.&lt;/p&gt;
&lt;h3&gt;Linking up our Linked Data&lt;/h3&gt;
&lt;p&gt;There&amp;#8217;s another key dataset of geographical regions in the UK and that comes from &lt;a href="http://statistics.data.gov.uk"&gt;http://statistics.data.gov.uk&lt;/a&gt;.  These identifiers are based on codes from the UK Office of National Statistics (&lt;span class="caps"&gt;ONS&lt;/span&gt;) that are used for most government statistical information. Handily, this data is cross-referenced with the Ordnance Survey identifiers, so we can use the &lt;span class="caps"&gt;URI&lt;/span&gt; for our postcode from before to find the &lt;span class="caps"&gt;ONS&lt;/span&gt; district:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
PREFIX pc: &amp;lt;http://data.ordnancesurvey.co.uk/ontology/postcode/&amp;gt;
PREFIX rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt;
PREFIX owl: &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;

SELECT ?district ?ons_district 
WHERE {
  &amp;lt;http://data.ordnancesurvey.co.uk/id/postcodeunit/HA99HD&amp;gt; pc:district ?district .
  ?ons_district owl:sameAs ?district  
}
&lt;/code&gt;
&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;Note the use of &amp;#8216;owl:sameAs&amp;#8217; which specifies that the two URIs refer to the same real world thing.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So using the query above, we find the &lt;span class="caps"&gt;ONS&lt;/span&gt; identifier is:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http://statistics.data.gov.uk/id/local-authority-district/00AE&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;(Remember, you can try all the queries out yourself  &lt;a href="http://publishmydata.com/sparql"&gt;here&lt;/a&gt;)&lt;/p&gt;
&lt;h3&gt;Now what?&lt;/h3&gt;
&lt;p&gt;Well, we can use that to link up other datasets, for example to look up all the schools in the local authority with the given postcode.  To do this, we&amp;#8217;ll use another &lt;a href="http://data.gov.uk"&gt;data.gov.uk&lt;/a&gt; dataset, this one covering all &lt;a href="http://education.data.gov.uk/doc/school"&gt;schools in England and Wales&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By exploring that dataset, we can see that there is a property called &amp;#8216;districtAdministrative&amp;#8217; that relates a school to the local authority district it belongs to.  We&amp;#8217;ll use that to link the schools to the district for our postcode (and we include the label for the school to make it more readable).&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
PREFIX pc: &amp;lt;http://data.ordnancesurvey.co.uk/ontology/postcode/&amp;gt;
PREFIX rdfs: &amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt;
PREFIX owl: &amp;lt;http://www.w3.org/2002/07/owl#&amp;gt;
PREFIX school: &amp;lt;http://education.data.gov.uk/def/school/&amp;gt;

SELECT ?school ?label WHERE {
&amp;lt;http://data.ordnancesurvey.co.uk/id/postcodeunit/HA99HD&amp;gt; pc:district ?district .
?ons_district owl:sameAs ?district .
?school school:districtAdministrative ?ons_district .
?school rdfs:label ?label
 }
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This returns a list of 299 schools in the London Borough of Brent (try it by entering the query &lt;a href="http://publishmydata.com/sparql"&gt;here&lt;/a&gt;).&lt;/p&gt;
&lt;h3&gt;The power of &lt;span class="caps"&gt;SPARQL&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;With just a few queries, we&amp;#8217;ve done something pretty powerful, and hopefully you&amp;#8217;ve realised that &lt;span class="caps"&gt;SPARQL&lt;/span&gt; isn&amp;#8217;t that scary after all.  We plan on writing some tutorials explaining the syntax in more detail soon.&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;d like to see more articles like this, please subscribe to our &lt;a href="http://feeds.feedburner.com/learnlinkeddata"&gt;&lt;span class="caps"&gt;RSS&lt;/span&gt; feed&lt;/a&gt;, &lt;a href="http://twitter.com/learnlinkeddata"&gt;Twitter updates&lt;/a&gt;, or &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=learnlinkeddata&amp;amp;loc=en_US"&gt;email alerts&lt;/a&gt;.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=yKbFcqV0EA0:wheHJ-RMH0Q:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=yKbFcqV0EA0:wheHJ-RMH0Q:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=yKbFcqV0EA0:wheHJ-RMH0Q:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?i=yKbFcqV0EA0:wheHJ-RMH0Q:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/learnlinkeddata/~4/yKbFcqV0EA0" height="1" width="1"/&gt;</description>
      <pubDate>Thu, 24 Mar 2011 12:15:14 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/learnlinkeddata/~3/yKbFcqV0EA0/sparql-example-find-data-for-postcode</link>
      <guid isPermaLink="false">http://learnlinkeddata.com/articles/sparql-example-find-data-for-postcode?updated_at=2011-03-24T12:15:14</guid>
    <feedburner:origLink>http://learnlinkeddata.com/articles/sparql-example-find-data-for-postcode?updated_at=2011-03-24T12:15:14</feedburner:origLink></item>
    <item>
      <title>A skim-read introduction to linked data</title>
      <description>&lt;p&gt;I recently came across this very nice presentation by &lt;a href="http://moustaki.org/"&gt;Yves Raimond&lt;/a&gt; and &lt;a href="http://twitter.com/fantasticlife"&gt;Michael Smethurst&lt;/a&gt; of the &lt;span class="caps"&gt;BBC&lt;/span&gt;: &lt;a href="http://www.bbc.co.uk/blogs/radiolabs/s5/linked-data/s5.html"&gt;A skim-read introduction to linked data&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s particularly worth reading for its great explanations of content negotiation and of the difference between information resources and non-information resources.&lt;/p&gt;
&lt;p&gt;(Sorry for that bit of web architect jargon, but look at the presentation and all will become clear).&lt;/p&gt;
&lt;p&gt;Ric mentioned this issue in his &lt;a href="http://learnlinkeddata.com/articles/what-is-linked-data"&gt;What is Linked Data?&lt;/a&gt; post the other day, noting that we have one &lt;span class="caps"&gt;URI&lt;/span&gt; for the City of Manchester local authority itself, and another one for a web page about it.&lt;/p&gt;
&lt;p&gt;Their key point is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;We want to be able to make different claims about the thing and the document about the thing&amp;#8221;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yves and Michael explain very clearly why this is important, with lots of good examples.  But enough from me &amp;#8211; just go and read it.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=5Z8k6l9fCBs:NknnmIoPC3g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=5Z8k6l9fCBs:NknnmIoPC3g:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=5Z8k6l9fCBs:NknnmIoPC3g:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?i=5Z8k6l9fCBs:NknnmIoPC3g:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/learnlinkeddata/~4/5Z8k6l9fCBs" height="1" width="1"/&gt;</description>
      <pubDate>Mon, 14 Mar 2011 20:14:58 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/learnlinkeddata/~3/5Z8k6l9fCBs/a-skim-read-introduction-to-linked-data</link>
      <guid isPermaLink="false">http://learnlinkeddata.com/articles/a-skim-read-introduction-to-linked-data?updated_at=2011-03-14T20:39:44</guid>
    <feedburner:origLink>http://learnlinkeddata.com/articles/a-skim-read-introduction-to-linked-data?updated_at=2011-03-14T20:39:44</feedburner:origLink></item>
    <item>
      <title>What is Linked Data?</title>
      <description>&lt;p&gt;I suspect many of our readers may already have a black belt in Linked Data, but for others it&amp;#8217;s all new, so I thought it was worth explaining what Linked Data means to me.  The definitive description is Tim Berners-Lee&amp;#8217;s &lt;a href="http://www.w3.org/DesignIssues/LinkedData"&gt;Design Issues document&lt;/a&gt;, but I&amp;#8217;ll try to illustrate what this means in practice.&lt;/p&gt;
&lt;p&gt;In a nutshell, Linked Data is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;a method of publishing structured data [on the Web], so that it can be interlinked and become more useful.&amp;#8221; -&lt;a href="http://en.wikipedia.org/wiki/Linked_Data"&gt;wikipedia&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Linked Data can be used to describe any real-world things, such as people, objects, events, observations etc. Let&amp;#8217;s say we want to describe a unicorn (called Yuri).&lt;/p&gt;
&lt;p&gt;1. We choose an http &lt;span class="caps"&gt;URI&lt;/span&gt; to identify our unicorn. This &lt;span class="caps"&gt;URI&lt;/span&gt; looks like a normal web address, but in essence it&amp;#8217;s just a long name for Yuri (and is unique to him alone). For example, if I owned the unicornherders.com domain (I don&amp;#8217;t!), I might choose:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;http://unicornherders.com/id/unicorns/yuri&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;2. As you&amp;#8217;d expect from a web address, people can look it up.  Dereferencable (look-up-able) identifiers are a key feature of Linked Data. Looking up this &lt;span class="caps"&gt;URI&lt;/span&gt; would yield useful information about Yuri the Unicorn, such as his height, weight, eye colour, and horn-length.&lt;/p&gt;
&lt;p&gt;3. The info also contains links that connect Yuri to related things (such as Yuri&amp;#8217;s family members, owner, breed etc.), and be available in different useful formats.  This puts Yuri in context, and allows the person originally interested in Yuri to continue browsing and discover other useful stuff.&lt;/p&gt;
&lt;h3&gt;A Worked Example&lt;/h3&gt;
&lt;p&gt;My description above hopefully sounds simple enough, but to clarify here&amp;#8217;s a (more sensible) worked example&amp;#8230;&lt;/p&gt;
&lt;p&gt;This is the &lt;span class="caps"&gt;URI&lt;/span&gt; that the folks at data.gov.uk have chosen to identify the City of Manchester local authority district:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://statistics.data.gov.uk/id/local-authority-district/00BN"&gt;http://statistics.data.gov.uk/&lt;em&gt;&lt;strong&gt;id&lt;/strong&gt;&lt;/em&gt;/local-authority-district/00BN&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you click on the link above, you will be redirected (via a 303 &lt;em&gt;&amp;#8220;see other&amp;#8221;&lt;/em&gt; response) to an &lt;span class="caps"&gt;HTML&lt;/span&gt; page which contains information about the City of Manchester.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://statistics.data.gov.uk/doc/local-authority-district/00BN"&gt;http://statistics.data.gov.uk/&lt;em&gt;&lt;strong&gt;doc&lt;/strong&gt;&lt;/em&gt;/local-authority-district/00BN&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://learnlinkeddata.s3.amazonaws.com/datagovmanc.png" alt="" /&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Aside: It&amp;#8217;s worth noting that your browser ends up at a different address to the original &lt;span class="caps"&gt;URI&lt;/span&gt; you entered.  This is because in Linked Data we make a distinction between the real world thing, the City of Manchester local authority (&amp;#8230;/id/&amp;#8230;) and a document about the City of Manchester (&amp;#8230;/doc/&amp;#8230;).  It can seem like nit-picking, but I think it&amp;#8217;s an important point to get your head around.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On that web page, there are links to other related things, such as the containing county, &lt;a href="http://statistics.data.gov.uk/doc/county?name=Greater%20Manchester"&gt;Greater Manchester&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can request the information about the City of Manchester in different formats by including an &lt;span class="caps"&gt;HTTP&lt;/span&gt; &lt;code&gt;accept&lt;/code&gt; header.&lt;/p&gt;
&lt;p&gt;For example, to get it as &lt;span class="caps"&gt;JSON&lt;/span&gt;:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
curl --get http://statistics.data.gov.uk/doc/local-authority-district/00BN --header "Accept: application/json" -v
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Alternatively, you can just add a format extension to the description page&amp;#8217;s &lt;span class="caps"&gt;URL&lt;/span&gt;, like so:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://statistics.data.gov.uk/doc/local-authority-district/00BN.json"&gt;http://statistics.data.gov.uk/&lt;em&gt;&lt;strong&gt;doc&lt;/strong&gt;&lt;/em&gt;/local-authority-district/00BN.json&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Both of these approaches will yield something like this:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
{"http:\/\/statistics.data.gov.uk\/id\/local-authority-district\/00BN":{"http:\/\/www.w3.org\/2004\/02\/skos\/core#altLabel":[{"value":"Manchester","type":"literal","lang":"en"}],"http:\/\/statistics.data.gov.uk\/def\/administrative-geography\/region":[{"value":"http:\/\/statistics.data.gov.uk\/id\/government-office-region\/B","type":"uri"}],"http:\/\/statistics.data.gov.uk\/def\/electoral-geography\/ward":[{"value":"http:\/\/statistics.data.gov.uk\/id\/electoral-ward\/00BNGQ","type":"uri"},{"value":"http:\/\/statistics.data.gov.uk\/id\/electoral-ward\/00BNHH","type":"uri"},{"value":"http:\/\/statistics.data.gov.uk\/id\/electoral-ward\/00BNHB","type":"uri"}
...
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;I’ve used &lt;span class="caps"&gt;JSON&lt;/span&gt; in my example as many developers are already familiar with that, but you can get the same information in other formats including &lt;span class="caps"&gt;RDF&lt;/span&gt;/&lt;span class="caps"&gt;XML&lt;/span&gt; (&lt;a href="http://statistics.data.gov.uk/doc/local-authority-district/00BN.rdf"&gt;.rdf&lt;/a&gt;) and Turtle (&lt;a href="http://statistics.data.gov.uk/doc/local-authority-district/00BN.ttl"&gt;.ttl&lt;/a&gt;).&lt;/p&gt;
&lt;h3&gt;Want more?&lt;/h3&gt;
&lt;p&gt;I&amp;#8217;ve only scratched the surface here.  If you&amp;#8217;d be interested in more articles like this, please subscribe to our &lt;a href="http://feeds.feedburner.com/learnlinkeddata"&gt;&lt;span class="caps"&gt;RSS&lt;/span&gt; feed&lt;/a&gt;, &lt;a href="http://twitter.com/learnlinkeddata"&gt;Twitter updates&lt;/a&gt;, or &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=learnlinkeddata&amp;amp;loc=en_US"&gt;email alerts&lt;/a&gt;. We&amp;#8217;ll try to keep the articles coming fairly regularly.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=9pAmHIhhyo0:D8pkX31ep7w:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=9pAmHIhhyo0:D8pkX31ep7w:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/learnlinkeddata?a=9pAmHIhhyo0:D8pkX31ep7w:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/learnlinkeddata?i=9pAmHIhhyo0:D8pkX31ep7w:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/learnlinkeddata/~4/9pAmHIhhyo0" height="1" width="1"/&gt;</description>
      <pubDate>Thu, 10 Mar 2011 14:12:07 +0000</pubDate>
      <link>http://feedproxy.google.com/~r/learnlinkeddata/~3/9pAmHIhhyo0/what-is-linked-data</link>
      <guid isPermaLink="false">http://learnlinkeddata.com/articles/what-is-linked-data?updated_at=2011-03-10T14:12:07</guid>
    <feedburner:origLink>http://learnlinkeddata.com/articles/what-is-linked-data?updated_at=2011-03-10T14:12:07</feedburner:origLink></item>
  </channel>
</rss>
