{"id":575,"date":"2010-12-05T21:09:54","date_gmt":"2010-12-05T21:09:54","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/webteam\/?p=575"},"modified":"2010-12-05T21:36:52","modified_gmt":"2010-12-05T21:36:52","slug":"new-tools","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/webteam\/2010\/12\/05\/new-tools\/","title":{"rendered":"New Tools"},"content":{"rendered":"<p>As well as the more experimental stuff, I&#8217;ve also produce several more useful tools:<\/p>\n<h3>sparql2kml<\/h3>\n<p><a href=\"http:\/\/graphite.ecs.soton.ac.uk\/sparql2kml\/\">http:\/\/graphite.ecs.soton.ac.uk\/sparql2kml\/<\/a> &#8211; This takes a SPARQL query which returns ?lat,?long (or ?georss) and ?title and maybe ?desc and ?placename and produces a KML file so you can see it on Google Maps or Earth!<\/p>\n<p>As an experiment I used the following to find the birth place of Southampton football players.<\/p>\n<div style=\"font-size:80%\"><code> <\/code><\/p>\n<div>PREFIX dbo: &lt;http:\/\/dbpedia.org\/ontology\/&gt;<\/div>\n<div>PREFIX dbpedia: &lt;http:\/\/dbpedia.org\/resource\/&gt;<\/div>\n<div>SELECT DISTINCT ?georss ?title ?placename WHERE {<\/div>\n<div>?person dbo:team &lt;http:\/\/dbpedia.org\/resource\/Southampton_F.C.&gt;  .<\/div>\n<div>?person dbo:birthPlace ?place .<\/div>\n<div>?place &lt;http:\/\/www.georss.org\/georss\/point&gt; ?georss .<\/div>\n<div>?person rdfs:label ?title . FILTER langMatches( lang(?title), &#8220;EN&#8221; ) .<\/div>\n<div>OPTIONAL { ?place rdfs:label ?placename . FILTER langMatches( lang(?placename), &#8220;EN&#8221; ) }<\/div>\n<div>OPTIONAL { ?x &lt;http:\/\/dbpedia.org\/property\/county&gt; ?place }<\/div>\n<div>FILTER (!bound(?x) &amp;&amp; ?place != &lt;http:\/\/dbpedia.org\/resource\/England&gt; &amp;&amp; ?place != &amp;l<br \/> t;http:\/\/dbpedia.org\/resource\/Wales&gt; )<\/div>\n<div>}<\/div>\n<p>\u00a0<\/p>\n<\/div>\n<p>View it: <a href=\"http:\/\/maps.google.com\/?q=http%3A%2F%2Fgraphite.ecs.soton.ac.uk%2Fsparql2kml%2Findex.php%2Fconverted.kml%3Fsparql%3DPREFIX%2Bdbo%253A%2B%253Chttp%253A%252F%252Fdbpedia.org%252Fontology%252F%253E%250D%250APREFIX%2Bdbpedia%253A%2B%253Chttp%253A%252F%252Fdbpedia.org%252Fresource%252F%253E%250D%250A%250D%250ASELECT%2BDISTINCT%2B%253Fgeorss%2B%253Ftitle%2B%253Fplacename%2BWHERE%2B%257B%250D%250A%2B%2B%253Fperson%2Bdbo%253Ateam%2B%253Chttp%253A%252F%252Fdbpedia.org%252Fresource%252FSouthampton_F.C.%253E%2B%2B.%250D%250A%2B%2B%253Fperson%2Bdbo%253AbirthPlace%2B%253Fplace%2B.%250D%250A%2B%2B%253Fplace%2B%253Chttp%253A%252F%252Fwww.georss.org%252Fgeorss%252Fpoint%253E%2B%253Fgeorss%2B.%250D%250A%2B%2B%253Fperson%2Brdfs%253Alabel%2B%253Ftitle%2B.%2BFILTER%2BlangMatches%2528%2Blang%2528%253Ftitle%2529%252C%2B%2522EN%2522%2B%2529%2B.%250D%250A%2B%2BOPTIONAL%2B%257B%2B%253Fplace%2Brdfs%253Alabel%2B%253Fplacename%2B.%2BFILTER%2BlangMatches%2528%2Blang%2528%253Fplacename%2529%252C%2B%2522EN%2522%2B%2529%2B%257D%250D%250A%2B%2BOPTIONAL%2B%257B%2B%253Fx%2B%253Chttp%253A%252F%252Fdbpedia.org%252Fproperty%252Fcounty%253E%2B%253Fplace%2B%257D%250D%250A%2B%2BFILTER%2B%2528%2521bound%2528%253Fx%2529%2B%2526%2526%2B%253Fplace%2B%2521%253D%2B%253Chttp%253A%252F%252Fdbpedia.org%252Fresource%252FEngland%253E%2B%2526%2526%2B%253Fplace%2B%2521%253D%2B%253Chttp%253A%252F%252Fdbpedia.org%252Fresource%252FWales%253E%2B%2529%250D%250A%257D%26endpoint%3Dhttp%253A%252F%252Fdbpedia.org%252Fsparql\">Google Maps<\/a> or <a href=\"http:\/\/graphite.ecs.soton.ac.uk\/sparql2kml\/index.php\/converted.kml?sparql=PREFIX+dbo%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0D%0APREFIX+dbpedia%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2F%3E%0D%0A%0D%0ASELECT+DISTINCT+%3Fgeorss+%3Ftitle+%3Fplacename+WHERE+%7B%0D%0A%3Fperson+dbo%3Ateam+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FSouthampton_F.C.%3E++.%0D%0A%3Fperson+dbo%3AbirthPlace+%3Fplace+.%0D%0A%3Fplace+%3Chttp%3A%2F%2Fwww.georss.org%2Fgeorss%2Fpoint%3E+%3Fgeorss+.%0D%0A%3Fperson+rdfs%3Alabel+%3Ftitle+.+FILTER+langMatches%28+lang%28%3Ftitle%29%2C+%22EN%22+%29+.%0D%0AOPTIONAL+%7B+%3Fplace+rdfs%3Alabel+%3Fplacename+.+FILTER+langMatches%28+lang%28%3Fplacename%29%2C+%22EN%22+%29+%7D%0D%0AOPTIONAL+%7B+%3Fx+%3Chttp%3A%2F%2Fdbpedia.org%2Fproperty%2Fcounty%3E+%3Fplace+%7D%0D%0AFILTER+%28%21bound%28%3Fx%29+%26%26+%3Fplace+%21%3D+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FEngland%3E+%26%26+%3Fplace+%21%3D+%3Chttp%3A%2F%2Fdbpedia.org%2Fresource%2FWales%3E+%29%0D%0A%7D&amp;endpoint=http%3A%2F%2Fdbpedia.org%2Fsparql\">KML for Google Earth<\/a>.<\/p>\n<h3>excel2csv<\/h3>\n<p>This one is dead simple. It converts an excel file into comma separated values.<\/p>\n<p><a href=\"http:\/\/graphite.ecs.soton.ac.uk\/excel2csv?src=http:\/\/opendata.s3.amazonaws.com\/bridge-weight-limits-2010.xls\">http:\/\/graphite.ecs.soton.ac.uk\/excel2csv?src=http:\/\/opendata.s3.amazonaws.com\/bridge-weight-limits-2010.xls<\/a><\/p>\n<h3>sparqllib.php<\/h3>\n<p><a href=\"http:\/\/graphite.ecs.soton.ac.uk\/sparqllib\/\">http:\/\/graphite.ecs.soton.ac.uk\/sparqllib\/<\/a><\/p>\n<p>Nice and simple library to let you use SPARQL from PHP. The function names are deliberately copied from the mysql ones so you have sparql_connect, sparql_fetchrow etc.<\/p>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As well as the more experimental stuff, I&#8217;ve also produce several more useful tools: sparql2kml http:\/\/graphite.ecs.soton.ac.uk\/sparql2kml\/ &#8211; This takes a SPARQL query which returns ?lat,?long (or ?georss) and ?title and maybe ?desc and ?placename and produces a KML file so you can see it on Google Maps or Earth! As an experiment I used the [&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-575","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/575","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=575"}],"version-history":[{"count":15,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/575\/revisions"}],"predecessor-version":[{"id":577,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/575\/revisions\/577"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/media?parent=575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/categories?post=575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/tags?post=575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}