{"id":421,"date":"2010-09-30T00:35:18","date_gmt":"2010-09-30T00:35:18","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/webteam\/?p=421"},"modified":"2010-09-30T13:31:29","modified_gmt":"2010-09-30T13:31:29","slug":"using-rdf-data-to-add-value-to-a-page","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/webteam\/2010\/09\/30\/using-rdf-data-to-add-value-to-a-page\/","title":{"rendered":"Using RDF data to add value to a page"},"content":{"rendered":"<p>I am a regular reader of the <a href=\"http:\/\/blog.ouseful.info\/\">Blog written by Tony Hirst at the Open University<\/a>. He&#8217;s always looking for existing tools which can solve new problems. I think my thing is looking for little tools which don&#8217;t exist but should.<\/p>\n<p>I&#8217;ve had an idea for a while that it would be cool to use RDF to add data into a webpage, but there&#8217;s no easy way to do it. So what I&#8217;ve done is a combination of a web service and a javascript library.<\/p>\n<p>Here&#8217;s how to use it to take a URI of a location with a geo:lat and geo:long and embed a map in your webpage:<\/p>\n<pre>\u00a0&lt;script src='injectgeo.js' type='text\/javascript' &gt;&lt;\/script&gt;\r\n\r\n\u00a0&lt;div id='mymap'&gt;&lt;\/div&gt;\r\n\u00a0&lt;script type='text\/javascript'&gt;\r\n\u00a0injectGeo('http:\/\/dbpedia.org\/resource\/Brading','mymap');\r\n &lt;\/script&gt;<\/pre>\n<p>It would be only a little extra work to start using linked data goodness in the mix.<\/p>\n<ul>\n<li><a href=\"http:\/\/graphite.ecs.soton.ac.uk\/inject\/\">See it in action!<\/a><\/li>\n<\/ul>\n<h3>Images in Linked Data<\/h3>\n<p>One interesting problem with the above page is the picture of TimBL is bloody huge. We don&#8217;t include size information in the FOAF data so it&#8217;s not possible to pick which size to show. Where last week I said we should aim to always include an rdf:type and one of the normal label attributes (dc:title, foaf:name, rdf:label etc.). I think I&#8217;m going to suggest that images should have a width and height. Anyone know some good predicates for that?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am a regular reader of the Blog written by Tony Hirst at the Open University. He&#8217;s always looking for existing tools which can solve new problems. I think my thing is looking for little tools which don&#8217;t exist but should. I&#8217;ve had an idea for a while that it would be cool to use [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-421","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/comments?post=421"}],"version-history":[{"count":2,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/421\/revisions"}],"predecessor-version":[{"id":423,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/421\/revisions\/423"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/media?parent=421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/categories?post=421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/tags?post=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}