Visualize and Explore

For the following guide, we will be using a variation of the Star Wars dataset that you can download and execute the examples yourself.

Class hierarchy

To explore your data, navigate to Explore ‣ Class hierarchy. You can see a diagram depicting the hierarchy of the imported RDF classes by the number of instances. The biggest circles are the parent classes, and the nested ones are their children.


If your data has no ontology (hierarchy), the RDF classes are visualized as separate circles instead of nested ones.


Explore your data - different actions

  • To see what classes each parent has, hover over the nested circles.

  • To explore a given class, click its circle. The selected class is highlighted with a dashed line and a side panel with its instances opens for further exploration. For each RDF class, you can see its local name, IRI and a list of its first 1,000 class instances. The class instances are represented by their IRIs, which, when clicked, lead to another view where you can further explore their metadata.


    The side panel includes the following:

    • Local name;

    • IRI (Press Ctrl+C / Cmd+C to copy to clipboard and Enter to close);

    • Domain-Range Graph button;

    • Class instances count;

    • Scrollable list of the first 1,000 class instances;

    • View Instances in SPARQL View button. It redirects to the SPARQL view and executes an auto-generated query that lists all class instances without LIMIT.

  • To go to the Domain-Range Graph diagram, double-click a class circle or the Domain-Range Graph button from the side panel.

  • To explore an instance, click its IRI from the side panel.

  • To adjust the number of classes displayed, drag the slider on the left-hand side of the screen. Classes are sorted by the maximum instance count, and the diagram displays only the current slider value.

  • To administrate your data view, use the toolbar options on the right-hand side of the screen.

    • To see only the class labels, click the Hide/Show Prefixes. You can still view the prefixes when you hover over the class that interests you.

    • To zoom out of a particular class, click the Focus diagram icon.

    • To reload the data on the diagram, click the Reload diagram icon. This is recommended when you have updated the data in your repository, or when you are experiencing some strange behavior, for example you cannot see a given class.

    • To export the diagram as an .svg image, click the Export Diagram download icon.

  • You can also filter the hierarchy by graph when there is more than one named graph in your repository. Just expand the All graphs drop-down menu next to the toolbar options and select the graph you want to explore.


Domain-range graph

To see all properties of a given class as well as their domain and range, double-click its class circle or the Domain-Range Graph button from the side panel. The RDF Domain-Range Graph view opens, enabling you to further explore the class connectedness by clicking the green nodes (object property class).

  • To administrate your graph view, use the toolbar options on the right-hand side of the screen.

    • To go back to your class in the RDF Class hierarchy, click the Back to Class hierarchy diagram button.

    • To export the diagram as an .svg image, click the Export Diagram download icon.

Class relationships

To explore the relationships between the classes, navigate to Explore ‣ Class relationships. You can see a complicated diagram, which by default is showing only the top relationships. Each of them is a bundle of links between the individual instances of two classes. Each link is an RDF statement where the subject is an instance of one class, the object is an instance of another class, and the link is the predicate. Depending on the number of links between the instances of two classes, the bundle can be thicker or thinner, and has the color of the class with more incoming links. These links can be in both directions. Note that contrary to the Class hierarchy, the Class relationships diagram is based on the real statements between classes and not on the ontology schema.

In the example below, we can see that “Character” is the class with the biggest number of links. It is very strongly connected to “Film” and “Species”, and most of the links are to “Character”.


Left of the diagram, you can see a list of all classes ordered by the number of links they have, as well as an indicator of the direction of the links. Click on it to see the actual classes this class is linked to, again ordered by the number of links with the actual number shown. The direction of the links is also displayed.


Use the list of classes to control which classes to see in the diagram with the add/remove icons next to each class. Remove all classes with the X icon on the top right of the diagram. The green background of a class indicates that the class is present in the diagram. We see that “Planet” has many more connections to “Character” than to “Species”.


For each two classes in the diagram, you can find the top predicates that connect them by clicking on the connection, again ordered and with the number of statements of this predicate and instances of the classes.


Just like in the Class hierarchy view, you can also filter the class relationships by graph when there is more than one named graph in the repository. Expand the All graphs drop-down menu next to the toolbar options and select the graph you want to explore.


All of these statistics are built on top of the whole repository, so when you have a lot of data, the building of the diagram may be fairly slow.

You can also explore the class relationships of your data programmatically. To do so, go to the SPARQL tab of the Workbench menu and execute the following query:

PREFIX deps: <>

select ?typeSubj ?predicate ?typeObj ?count {
    _:b deps:listPredicates '' ;
        deps:fromClass ?typeSubj ;
        deps:toClass ?typeObj ;
        deps:predicate ?predicate ;
        deps:predicateCount ?count .

} order by DESC(?count) ?typeSubj ?predicate ?typeObj

Which will return:


Explore resources

Explore resources through the easy graph


Before you start exploring resources from this view, make sure to have enabled the Autocomplete index for this repository from Setup ‣ Autocomplete.

Navigate to Explore ‣ Visual graph. Easy graph enables you to explore the graph of your data without using SPARQL. You see a search input field to choose a resource as a starting point for graph exploration. Click on the chosen resource.


A graph of the resource links is shown. Nodes that have the same type have the same color. All types for a node are listed when you hover over it. By default, what you see are the first 20 links to other resources ordered by RDF rank if present. See the settings below to modify this limit and the types and predicates to hide or see with preference.


The size of the nodes reflects the importance of the node by RDF rank. Hover over a node of interest to open a menu with four options. Click the expand icon to see the links for the chosen node. Another way to expand it is to double-click on it.

_images/visual-graph-expand.png _images/visual-graph-expanded.png

Click on the node to know more about a resource.


The side panel includes the following:

  • labels (rdfs:label)

  • a short description (voc:desc)

  • RDF rank

Note that the information in the panel may vary depending on the data you are working with.

You can click on the node again to hide the panel.

Note that you can switch between nodes without closing the side panel. Just click on the new node about which you want to see more, and the side panel will automatically show the information about it.

Once a node is expanded, you have the option to collapse it. This will remove all its links and their nodes, except those that are connected to other nodes also – see the example below. Collapsing “The Force Awakens” removes all nodes connected to it except “R2-D2” and “BB8”, because they are also linked to “Droid”, which is expanded.


If you are not interested in a node anymore, you can hide it by using the remove icon.

The focus icon is used to restart the graph with the node of interest. Use carefully, as it resets the state of the graph.

More global actions are available in the menu in the upper right corner.

  • Go back to Visual graph home.

  • Search another resource.

  • To visually rotate your graph for convenience, use the arrows.

  • Pin/unpin all nodes.

  • Save your graph.

To configure your graph globally, click on the settings icon.


The following settings are available:

  • Maximum links to show is the limit of links to use when you expand each node.

  • If you have labels in different languages, you can choose which labels to display with preference. The order is of importance in this case.

  • Include schema statements

  • Include inferred statements

  • Expand results over owl:sameAs

  • Show predicate labels is an option that you can disable for convenience when you are not interested in the predicates linking the nodes.

  • Preferred and Ignored types/predicates is an advanced option. If you know your data well, you will be able to control to a bigger extent what to see when you expand nodes. If a preferred type is present, nodes of that type will be shown before all other types (see example below). Again, order matters when you have more than one preferred types.

Ignored types are used when you do not want to see instances of some types at all while exploring. The same is valid for predicates. Use full IRIs for types and predicates filters.

For example, add voc:film as preferred predicate and tick the option to see only preferred predicates.


Then click Save and see the change:


Create your own visual graph

Create your own custom visual graph by modifying the queries that fetch the graph data. To do this, navigate to Explore ‣ Visual Graph. In the Advanced graph section, click Create graph config.


The configuration consists of five queries separated in different tabs. A list of sample queries is provided to guide you in the process. Note that some bindings are required.

  • Starting point - this is the initial state of your graph.

    • Search box: Start with a search box to choose a different start resource each time. This is similar to the initial state of the Easy graph.

    • Fixed resource: You may want to start exploration with the same resource each time, i.e., select from the autocomplete input as a start resource, so that every time you open the graph, you will see Sofia and its connections.

    • Graph query results: Visual graph can render a random SPARQL Graph Query result. Each result is a triple that is transformed to a link where the subject and object are shown as nodes, and the predicate is a link between them.

  • Graph expansion: This is a CONSTRUCT query that determines which nodes and edges are added to the graph when the user expands an existing node. The ?node variable is required and will be replaced with the IRI of the expanded node. If empty, the Unfiltered object properties sample query will be used. Each triple from the result is visualized as an edge where subject and object are nodes, and each predicate is the link between them. If new nodes appear in the results, they are added to the graph.

  • Node basics: This SELECT query determines the basic information about a node. Some of that information affects the color and size of the node. This query is executed each time a node is added to the graph to present it correctly. The ?node variable is required and will be replaced with the IRI of the expanded node. It is a SELECT query and the following bindings are expected in the results.

    • ?type determines the color. If missing, all nodes will have the same color.

    • ?label determines the label of the node. If missing, the IRI’s local name will be used.

    • ?comment determines the description of the node. If missing, no description will be provided.

    • ?rank determines the size of the node, and must be a real number between 0 and 1. If missing, all nodes will have the same size.

  • Edge basics: This query SELECT the ?label binding that determines the text of the edge. If empty, the edge IRI’s local name is used.

  • Node extra: This SELECT query determines the extra properties shown for a node when the info icon is clicked. It should return two bindings - ?property and ?value. Results are then shown as a list in the sidebar.

If you leave a query empty, the first sample will be taken as a default. You can execute a query to see some of the results it will produce. Except for the samples, you will also see the queries from the other configurations, in case you want to reuse some of them. Explore your data with your custom visual graph.

Save and share visual graphs

During graph exploration, you can save a snapshot of the graph state with the Save icon in the top right to load it later. The graph config you are currently using is also saved, so when you load a saved graph, you can continue exploring with the same config.

GraphDB also allows you to share your saved graphs with other users. When security is ON in the Setup ‣ Users and Access menu, the system distinguishes between different users. The graphs that you choose to share are only editable by you.


The graphs are located in Visual graph ‣ Saved graphs. Other users will be able to view them and copy their URL by clicking the Get URL to graph icon.


When Users and Access ‣ Free Access is ON, the free access user will see shared graphs only and will not be able to save new graphs.

Embed visual graphs

GraphDB also enables you to embed your visual graph by adding the &embedded HTTP parameter that hides the Workbench menus (side panel, drop-down, and footer).

The following embedding options are available (substitute localhost and the 7200 port number as appropriate):

  • Start with a specific resource: http://localhost:7200/graphs-visualizations?uri=<encoded-iri>&embedded

  • Load a saved state of a specific expanded graph: http://localhost:7200/graphs-visualizations?saved=<saved-view-id>&embedded

  • Start with a custom graph configuration: http://localhost:7200/graphs-visualizations?config=<graph-config-id>&embedded

  • Start with graph query results: http://localhost:7200/graphs-visualizations?query=<encoded-sparql-query>&embedded


When using embeddings, it is recommended to run the Workbench in free access mode.

View and edit resources

View and add a resource


Before using the View resource functionality, make sure you have enabled the Autocomplete index from Setup ‣ Autocomplete.

To view a resource in the repository, go to the GraphDB home page and start typing in the Explore ‣ View resource field.

You can also use the Search RDF resource icon in the top right, which is visible in all Workbench screens.


Viewing resources provides an easy way to see triples where a given IRI is the subject, predicate, or object.


Even when the resource is not in the database, you can still add it from the resource view. Type in the resource IRI and hit Enter.

_images/create_new_resource.png _images/new_resource.png

Here, you can create as many triples as you need for it, using the resource edit. To add a triple, fill in the necessary fields and click on the orange tick on the right. The created triple appears, and the Predicate, Object, and Context fields are empty again for you to insert another triple if you want to do so. You can also edit or delete already created triples.


To view the new statements in .TriG format, click the View TriG button.


When ready, save the new resource to the repository.

Edit a resource

Once you open a resource in View resource, you can also edit it. Click the edit icon next to the resource namespace and add, change, or delete the properties of this resource.



You cannot change or delete the inferred statements.