Using Image Processing & SPARQL to Drive Dynamic Data Visualization & Interaction

Created on 2016-10-28 15:18

Published on 2016-10-28 15:38


Problem

How can we leverage the strength of RDF-Language sentences as vehicles of powerful structured data representation, while also exploiting the “picture speaks a thousand words” dictum?

Our Solution

One key feature of Virtuoso’s SPARQL Query Processor is the integration of an image processor, enabling query solutions (results) to include an obvious drill-down interface. Here’s a query example:

SELECT DISTINCT  ?s as ?href 
                       ?name
                       ?kingdom 
                       ?image 
                       ?habitat 
                       ?hname 
                       ?description  
                       ?adaptation 
FROM <urn:bbc:nature:data>
WHERE {    
        ?s        wo:kingdom           ?kingdom ; 
                  dcterms:description  ?description ; 
                  rdfs:label           ?name ; 
                  wo:livesIn           ?habitat ;
                  wo:adaptation        ?adaptation ;
                  wo:class             ?class ;
                  wo:growsIn           ?growsIn ;
                  foaf:depiction       ?image .

        ?habitat  rdfs:label           ?hname .         
      }

Here’s an illustration of the query results page that applies specific image processing rules to entities identified by the ?image variable:

Here is a Cross Tabulated view of Entity Relationships that isolates (or filters out) Carnivores that are Desert Dwellers (i.e., desert in the habitat):

Here is the original SPARQL Query, exposed by clicking on the “edit” link of the results document:

There is an HTML5 PivotViewer instance incorporated into our live Linked Data “Junction Box” service, known as URIBurner. Alternatively, you can setup your own system with the following two steps:

  1. Download the HTML5 PivotViewer VAD Package
  2. Install the VAD package.

Once installed, you simply need to understand the use of specific HTML5 Pivot Viewer variable identifiers when building your SPARQL Queries:

You also have the option to select CXML document output from the SPARQL Endpoint associated with your Virtuoso instance that can be used as HTML5 PivotViewer input. Simply copy the CXML-based results page URI, and and paste it into the input field presented in the HTML5 PivotViewer’s home page.

Conclusion

This is a simple demonstration of how user interaction and interface challenges associated with Linked Data have been addressed via integration of an Image Processing module into Virtuoso’s SPARQL Query Processor .

You can share these drill-down reports with anyone using hyperlinks that identify the query results pages. Likewise, you can share query definition pages that allow anyone tweak and modify queries en route to alternative insights.

Links