<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Feb</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>RDF Browser for Data Discovery and Visual Query Building</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jans Aasman</string-name>
          <email>ja@franz.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ken Cheetham</string-name>
          <email>cheetham@franz.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Author Keywords</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Franz Inc.</institution>
          ,
          <addr-line>2201 Broadway, Suite 715, Oakland, CA 94612</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>RDF, SPARQL</institution>
          ,
          <addr-line>Query Builder, Triplestore, Prolog, Reasoning, Semantic Web</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2011</year>
      </pub-date>
      <volume>13</volume>
      <issue>2011</issue>
      <abstract>
        <p>The free-form nature of triplestores offers a lot of flexibility for constructing databases, but that freedom can also make it less obvious how to find arbitrary data for retrieval, errorchecking, or general browsing. Gruff is a graphical triplestore browser that attempts to make data retrieval more pleasant and powerful with a variety of tools for laying out cyclical graphs, displaying tables of properties, managing queries, and building SPARQL and queries as visual diagrams.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        have many different domains, DBPedia and Freebase are
good examples. The LODC vision is that the single data
representation for every type of knowledge (RDF) will
make it easy to combine datasets and dramatically increase
their value. In practice, the exploitation and exploration of
these data sources can be far from trivial. Two papers
recently made this point:
1. Heath [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] argues in his paper How will we interact with
the web of data? the tools that are currently being
developed basically focus on how machines can interact
with the RDF cloud. However, there is also an urgent need
for new Human-Computer interaction paradigm for the
Web of Data. One point he makes, it is actually better to
speak of a Web of Things and visualization tools should
make the thing that is referred to in RDF become a first
class object.
2. Karger and Schraefel [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] wrote an interesting position
paper called The Pathetic Fallacy of RDF. The core of their
criticism of current visualization tools is that the cloud of
data is treated as one big fat graph that somehow should be
displayed as a graph. Their paper shows that in many cases
the 'graph view' hardly helps the user in achieving their
tasks. We actually agree with their assessment and we
think that any visualization tool should be a combination of
graphs, table like views, object oriented views and faceted
navigation and browsing tools.
      </p>
      <p>
        But lets us go back to why it is hard to browse the LOD
cloud. To begin, most of the time an interesting problem
requires you to combine datasets. A typical example would
be from the biomedical domain. Say you take the RDF
version of Clinical Trials [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], the side effect database –
Sider [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], the disease database - Diseasome [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], Dailymed
[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] with commercially available medicine, and Drugbank
[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] filled with FDA approved drugs and targets. With all
these databases combined you can perform some very
interesting analysis to find relationships between clinical
trials and genes, drug and diseases in a space of more than a
100 different classes and thousands of types of
relationships.
      </p>
      <p>EXPLORATION AND DISCOVERY
So what kinds of analysis would you do with these datasets:
Example 1 - Automatic Discovery. Sometimes users just
want to know if it would be possible to find any connection
between two interesting instances from two different
datasets. A good example would be to find all the links you
can find between a particular target (Cytochrome c3) and
say Morphine Sulfate given all the predicates or a subset of
the predicates in the database. What is non-trivial about
this? Well most Triplestores do not provide automatic
discovery functions that would connect these instances or
provide ways to specify which predicates to use while
doing automatic discovery.</p>
      <p>Example 2 - Write New Queries. Say a user has two
instances from two different datasets (like Example 1) and
you want to write a SPARQL query that links them
together. Again, what is non trivial about this? In some
sense a user has to know the datasets before they can write
the queries, that is, you have to understand the predicates
and the names of the classes that will link them together.
Unfortunately the datasets from the example above lack
domain and range restrictions so it not straight forward to
explore the schema space. Additional usability problems are
that you have to know the namespaces, the fragments of the
namespaces, and very often the type of the objects.
Example 3 - Basic Data Mining: Say you have an instance
of a clinical trial and now you want to find all the clinical
trials that discuss the same kind of drugs, diseases and
targets. The non trivial part is that most triple stores do not
offer you advanced ways to perform stored procedures on
large datasets that could do this data mining for you.
In order to make exploration of multiple datasets easier we
developed Gruff, an advanced Graphical User Interface for
working with RDF Data in a triplestore.</p>
      <p>Gruff provides a full set of graph analysis capabilities to
help users explore the LODC. In the most simple case a
user selects two resources in Gruff, the predicates the graph
algorithm needs to explore, and Gruff will find all
connections between the two instances. The end result on
the screen can even be saved as an NTriple file. The graph
algorithms all take as input first class functions called
generators. The contract for a generator is that it takes one
node as an input, and will generate a set of nodes as output.
Gruff will create these generators for you if you select the
predicates that you want to explore.</p>
      <p>In other cases the users want to investigate something more
sophisticated, like conditionally exploring predicates per
type of node (or resource), starting with the important
predicates first. In this case the user needs to write some
SPARQL or Prolog code and this can be facilitated with the
visual query builder described below.</p>
      <p>With Gruff you can first explore the graph over multiple
link data sets completely visually, and once you find one
pattern that you are interested in, you can easily build from
that a visual query and find all the same patterns in the set
of linked datasets.</p>
      <p>Gruff provides several key capabilities for LODC
exploration:</p>
    </sec>
    <sec id="sec-2">
      <title>Graph Layout:</title>
      <p>Triplestores specialize in relationships between things, and
it can be difficult to get a feel for a tangled set of
relationships.</p>
      <p>Gruff's Graph View (figure 1) provides automatic layout of
highly-cyclic graphs. Heuristics are used to make layouts of
a modest number of nodes fast enough for interactive
browsing. The algorithm specializes in keeping nodes from
laying on top of unrelated link lines, even though all link
lines are straight; those two features allow you to quickly
spot all of the nodes that are linked with a particular node,
and then to quickly spot all of the linked nodes of those
nodes, and so on.</p>
      <p>Once you have found one or more initial objects of interest,
the familiar Table View (figure 2) can be used to jump to
linked objects that are properties of other objects. The
Graph View will add nodes and links that show a history of
all of the paths that you traversed in the Table View. You
can also incrementally add linked nodes directly in the
Graph View.
A triplestore can contain many objects that are not instances
of a simple set of classes, and so it can be tricky to locate
arbitrary objects of interest.</p>
      <p>Gruff has a variety of ways for looking up arbitrary objects.
These include (1) specifying an object textually as either its
easy-to-type rdfs:label string, its full URI, or a brief URI
that uses a namespace identifier; (2) selecting a node that
has a selected rdf:type (selecting the type either from a
single list or from an rdfs:subClassOf hierarchy); (3)
finding all nodes that have property values containing
arbitrary text, using free text lookup; and even (4) selecting
from all sorted nodes.</p>
      <p>When there are many choices to select from, Gruff manages
the selection by using a series of pop-up menus that allow
you to gradually hone in on a desired object. You use these
menus by first selecting the starting character of an object's
name, then the second character, and so on. Each menu
displays only the choices that remain for the next character,
with string completion for the remaining choices to the
extent that's possible without ambiguity, allowing you to
see increasingly recognizable choices.</p>
      <p>Saving visual layouts and other views to file allows you to
start back up quickly in a future Gruff session with a
familiar set of "starter nodes", rather than specifying them
again from scratch. The most recently saved or loaded
views are always listed on the View menu for quick
retrieval. You can also copy nodes from one view to
another, for example, to avoid respecifying them.</p>
    </sec>
    <sec id="sec-3">
      <title>Building Queries Graphically</title>
      <p>While query languages like SPARQL are quite powerful,
queries can become rather complex and therefore difficult
to construct free of nesting mismatches and typos in URIs.
Gruff's newest feature, the Graphical Query View (figure
3), allows creating queries as diagrams of nodes and links.
A query diagram can include actual objects from the store,
which you select as in other views, while other nodes and
links represent query variables. Group graph patterns such
as UNION and OPTIONAL groups can be laid out as
grouper boxes that can be nested to any level, with proper
nesting maintained automatically.</p>
      <p>Once you've created a query diagram, Gruff will generate
either SPARQL or Prolog code for the query. Seeing the
generated query text (figure 4) can help you learn to write
SPARQL or Prolog queries directly. You can also edit the
generated text before performing the query. You can save
queries either as graphical diagrams or as actual query text
and load them any time later for modification into related
queries. You can even generate a visual graph from query
results, showing the network of all triples that are
comprised of nodes and predicates that are in the query
results and the query itself.</p>
      <p>CONCLUSION
In general, Gruff's tools are tightly integrated to allow
browsing a triple-store in a variety of ways. Gruff is free
and can be downloaded from www.franz.com/agraph/gruff/,
where additional screen shots and demonstration videos can
also be found.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Heath</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hepp</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Bizer</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <article-title>The Story So Far</article-title>
          . Special Issue on Linked Data,
          <source>International Journal on Semantic Web and Information Systems</source>
          (IJSWIS)
          <year>2009</year>
          . http://linkeddata.org/docs/ijswis-special-issue
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Tom</given-names>
            <surname>Heath</surname>
          </string-name>
          (
          <year>2008</year>
          )
          <article-title>How Will We Interact with the Web of Data? IEEE Internet Computing</article-title>
          , Vol.
          <volume>12</volume>
          (
          <issue>5</issue>
          ), pp.
          <fpage>88</fpage>
          -
          <lpage>91</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Schraefel</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Karger</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          (
          <year>2006</year>
          )
          <article-title>The Pathetic Fallacy of RDF</article-title>
          .
          <source>In: International Workshop on the Semantic Web and User Interaction (SWUI)</source>
          <year>2006</year>
          ,
          <article-title>Nov 2007</article-title>
          , Athens, Georgia.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>4. LinkedCT http://linkedct.org/index.html</mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>5. Sider - http://sideeffects.embl.de/</mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. Diseasome - http://www.nd.edu/~alb/Publication06/145- HumanDisease_PNAS-14My07
          <source>-Proc/Suppl/.</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>7. DailyMed - http://dailymed.nlm.nih.gov/</mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>8. Drugbank - http://www.drugbank.ca/</mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>