Getting Started with GRUFF



Similar documents
Google Sites. How to create a site using Google Sites

CentralMass DataCommon

Viewing and Troubleshooting Perfmon Logs

Adobe Acrobat 6.0 Professional

AutoDWG DWGSee DWG Viewer. DWGSee User Guide

Install MS SQL Server 2012 Express Edition

Power Point 2003 Table of Contents

Tutorial. Introduction to Windows Movie Maker 2.1. A Hands-on Workshop. from the Academic Technology Center. Distributed Learning Services, CIT

DWGSee Professional User Guide

Colligo Manager 6.2. Offline Mode - User Guide

Guide to Viewing Maps in Google Earth

Alteryx Predictive Analytics for Oracle R

With a wide variety of drag and drop widgets, adding and updating information on your website will be a snap!

Data Visualization. Prepared by Francisco Olivera, Ph.D., Srikanth Koka Department of Civil Engineering Texas A&M University February 2004

Making a Web Page with Microsoft Publisher 2003

Click on various options: Publications by Wizard Publications by Design Blank Publication

Working with the Ektron Content Management System

Create a Poster Using Publisher

PowerPoint 2013 Basics of Creating a PowerPoint Presentation

Getting Started on the Computer With Mouseaerobics! Windows XP

2) Sharing Projects Made easy by IntelliGantt s Share Wizard, there are three share options to fit the needs of your project.

Copy Documents from your Computer (H Drive) to a Flash Drive

Navigating Microsoft Word 2007

Lab 0: Preparing your laptop for the course OS X

Microsoft Access 2007

Install FileZilla Client. Connecting to an FTP server

Lab: Create Your Own Homepage! This exercise uses MS Expression Web as a Web Page creation tool. If you like you

The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.

A Quick Start Guide to Using PowerPoint For Image-based Presentations

Microsoft Excel 2013 Tutorial

Knowledgebase Article

SnagIt Add-Ins User Guide

Creating and Using Links and Bookmarks in PDF Documents

How To Use Databook On A Microsoft Powerbook (Robert Birt) On A Pc Or Macbook 2 (For Macbook)

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

Using PowerPoint To Create Art History Presentations For Macintosh computers running OSX with Microsoft Office 2008

Microsoft PowerPoint 2010 Handout

Latin American and Caribbean Flood and Drought Monitor Tutorial Last Updated: November 2014

understand how image maps can enhance a design and make a site more interactive know how to create an image map easily with Dreamweaver

LESSON 7: IMPORTING AND VECTORIZING A BITMAP IMAGE

How to test and debug an ASP.NET application

Introduction to OpenOffice Writer 2.0 Jessica Kubik Information Technology Lab School of Information University of Texas at Austin Fall 2005

MICROSOFT OUTLOOK 2010 WORK WITH CONTACTS

Instructions for Importing (migrating) Data

1. Right click using your mouse on the desktop and select New Shortcut.

GETTING STARTED WITH SQL SERVER

SMART BOARD USER GUIDE FOR PC TABLE OF CONTENTS I. BEFORE YOU USE THE SMART BOARD. What is it?

Introduction to Word 2007

Microsoft Word Tips and Tricks

IT Quick Reference Guides Using Windows 7

Personal Portfolios on Blackboard

Primavera P6 Professional Windows 8 Installation Instructions. Primavera P6. Installation Instructions. For Windows 8 Users

How To Restore Your Data On A Backup By Mozy (Windows) On A Pc Or Macbook Or Macintosh (Windows 2) On Your Computer Or Mac) On An Pc Or Ipad (Windows 3) On Pc Or Pc Or Micro

7.0 BW Budget Formulation Report Tips and Tricks

Using Microsoft Word. Working With Objects

Google Sites: Site Creation and Home Page Design

The FX Trading Station 2.0

Geocortex HTML 5 Viewer Manual

Database Studio is the new tool to administrate SAP MaxDB database instances as of version 7.5.

Excel Tutorial. Bio 150B Excel Tutorial 1

MicroStrategy Analytics Express User Guide

and satellite image download with the USGS GloVis portal

**If the box does not automatically pop up, see the next page.

Microsoft Word 2010 Tutorial

Intellect Platform - Tables and Templates Basic Document Management System - A101

Digital Marketing EasyEditor Guide Dynamic

Choosing your Preferred Colours in Windows

How to Setup and Connect to an FTP Server Using FileZilla. Part I: Setting up the server

MSSQL quick start guide

F-Series Desktop User Manual F20. English - Europe/New Zealand

Distributing forms and compiling forms data

After you complete the survey, compare what you saw on the survey to the actual questions listed below:

Word basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

EViews supports online access to EIA data via the EIA web server as well as offline access to data downloaded in the EIA Bulk File format.

DocumentsCorePack for MS CRM 2011 Implementation Guide

End User Guide. July 22, 2015

RuleBender Tutorial

Software Manual Ver 1.0 September 2015

Creating Web Services Applications with IntelliJ IDEA

Lync 2013 FAQ s. How do I keep my Lync conversation window on top of all the other windows on my computer, so I can see it while I work?

v4: How to create a BartPE Rescue CD for Macrium Reflect

ArcGIS online Introduction Module 1: How to create a basic map on ArcGIS online Creating a public account with ArcGIS online...

Web Ambassador Training on the CMS

Updox, LLC

Copyright 2006 TechSmith Corporation. All Rights Reserved.

Microsoft PowerPoint Exercises 4

Tutorial How to upgrade firmware on Phison S8 controller MyDigitalSSD using a Windows PE environment

Testing your Linux Virtual Box

Introduction to dobe Acrobat XI Pro

SW43W. Users Manual. FlukeView Power Quality Analyzer Software Version 3.20 onwards

Introduction to Microsoft Word 2003

Toad for Data Analysts, Tips n Tricks

Salient Dashboard Designer Training Guide

Microsoft Access 2010 handout

Getting Started with WebSite Tonight

DaRIS portal visual user guide

Newsletter Sign Up Form to Database Tutorial

Designing a Graphical User Interface

Transcription:

Getting Started with GRUFF Introduction Most articles in this book focus on interesting applications of Linked Open Data (LOD). But this chapter describes some simple steps on how to use a triple store, how to load linked open data, and how to create SPARQL queries with a graphical query builder. This should allow users new to these topics to better understand the methods and techniques and thus to better understand the more complex examples later in the book. What are triples and what is RDF? For completeness we ll introduce the concept of triples here but we assume that the readers of this book are familiar with the RDF stack. The Resource Description Framework (RDF) language is used to express data about resources, where resources can be interpreted to be anything (a web page, a person, an idea, etc.). The basic building block is the triple, consisting of subject, predicate, object. The subject is a URI, the predicate is some property that is defined for the type (class) of the subject, and the object is either a typed literal or the URI of some other subject. Let s look at a couple of assertions that express data about resources: bb:yogiberra rdf:type bio:person. bb:yogiberra bb:playsposition bb:catcher. bb:yogiberra bb:careerhomeruns 358. The first assertion says that a resource, Yogi Berra, whose URI is defined in the bb: namespace, is of type Person (where the meaning of Person is defined in the bio: namespace), he played the catcher position (where the meaning of playsposition and Catcher are defined in the bb: namespace), and he had 358 career home runs (where the meaning of careerhomeruns is defined in the bb: namespace). This is what data looks like in RDF: triples expressed as a subject, a predicate, and an object, separated by spaces, and concluded with a period. The above description comes from a little mini course in RDF that can be found on the Franz website (http://www.franz.com). What is a triple store? An introduction to AllegroGraph Most Linked Open Data comes in the form of files containing RDF triples. In order to work efficiently with triples you need to have a triple store database, that is specialized for storing the triples data format. A good triple store allows you to store triples and index them for fast retrieval, to perform SPARQL queries, and to reason dynamically or through materialization. AllegroGraph is such a triple store with some additional unique capabilities. AllegroGraph Provides:

All essential enterprise capabilities you expect in a major relational database: ACID transactions (Atomicity, Consistency, Isolation and Durability), backup/restore, point in time recovery, security, replication, warm fail over, clustering, triple level security. Geospatial reasoning, temporal reasoning, and social network analysis. These features are all directly accessible in SPARQL. Business rules with an ISO compatible Prolog compiler Server side JavaScript stored procedures [faulty parallelism. Why not delete Deploy?] Gruff, a powerful visualization tool which allows user friendly navigation of triples. Gruff s graphical query editor allows easy composition of SPARQL queries. The ability to automatically discover patterns by highlighting nodes and turning them into SPARQL queries The example In our example we are going to work with a data set that we extracted from DBPedia, the triple version of the Wikipedia. We took all the information about movies and actors, producers and directors and stored that in a single file (N-Triples Format). This file can be downloaded from our website (see instructions below) We are going to use a powerful visual navigation tool called Gruff. Gruff is one of the interfaces to AllegroGraph and it allows you to create a new triple store, download triple files to populate the store, and then query triples or display triples on the screen. Gruff comes in two forms, a standalone version that includes a basic version of AllegroGraph, and the server edition. You will want the server edition if you are working with hundreds of millions to billions of triples. If you just want to look at a few million triples and you don't have easy access to a Linux Server, then you can just install the standalone version. We are going to use the standalone version in this tutorial. Installing and starting the standalone version Gruff: Visit http://www.franz.com/agraph/gruff and go to the download section. Assuming you have a 64-bit Windows machine you should download Gruff v5.0.x for AG 3.3. Extract the file that you downloaded into a convenient location (which we will refer to as the Gruff directory). Go into the Gruff directory and double click 'gruff.exe' Downloading the dataset for our example: The data for or example is in: http://www.franz.com/franzdownload/agraph/allegrograph/data/actors.ntriples Please unzip it and place it in a convenient place. Creating a new triple store: Creating a triple store is now about as easy as starting an Excel spreadsheet. First we create a new triple store: File -> New Triple-Store

Because we work with a standalone version we use the name of your local machine, Gruff will probably fill it in for you already. As you can see my laptop is called JansSamsung. Note that you don t have to fill in a port number. For the Store Folder you will type in the full name of the triple store you are going to create. Make sure it is not an existing directory because it will overwrite that. Once you click ok, the database will ask you how many triples you expect. Just accept the default. This number is only important if you know you are going to use millions of triples. Loading data into Gruff: Now we are going to load the file with movies and actors in Gruff. File->Load Triples->Load N-Triples Gruff will ask if you want to load the triples from a file or from the web. Chose file for this tutorial. And find the place where you stored the file actors.ntriples downloaded from the Franz Inc website. Select it and load. You will see a yellow bar for a few seconds and if that bar disappears the data is ready to be used. Displaying some triples on the screen: To quickly test the data was loaded. From the Gruff menu: Display->Display All Triples Up To A Limit. And after a few seconds you ll see activity on your screen. Use the wheel on your mouse (or shift- or shift+,) to zoom in and out and then press the letter r to reformat the screen. Just for fun you might want to click on a node and go to the Tabular View. Click around a little bit to become familiar with the data. Go back to the Graph View (View->Graph View) or press the letter g. Now we are going to delete all the information from the screen by Remove->Remove-All-Nodes (Don t worry, it won t delete any triples, it will just remove the nodes from the screen)

Creating a freetext index and find Kevin Bacon: In many cases you start exploring a set of files by typing in some of the concepts that you know that might be in the file. For that we need text indexing (i.e. Key Word Search, like Google). Display -> Edit Free Text Predicates A widget will pop up, just select all and then click ok. Now we want to find Kevin Bacon: Display-> Display Triples by Freetext Index (or press ; ) and type Kevin Bacon in the search field. Browse through the results and choose Kevin Bacon and select ok. So now you have one node on the screen that we are going to use in the next section Exploring the Graph in the Graph View: So now we have Kevin Bacon on the screen and we want to see some triples where Kevin is the subject or object. The first thing we want to do is to select the predicates that we want to see on the screen. Type the letter p and you ll see a list of predicates. Choose DS, Director, and Starring and click OK Now select the Kevin Bacon node and press the letter f. You ll see a lot of new nodes come up. Click on a movie and see how that expands by pressing the letter f. Click a few times on nodes and you ll see that the screen gets crowded with nodes and links. Zoom in a little bit (use the wheel on your mouse or shift-.) and press the letter r to reformat (In the Layout Menu you see all the types of reorganization of the screen provided by Gruff). Below is a screen shot that should look similar on your machine.

Note how you see on the left side the names of the predicates and classes used as well as the corresponding colors. There are other ways to explore the graph on the screen. Press the letter z a few times until only the Kevin Bacon node is on the screen (you might have to zoom back to see his name again). For example: right click on Kevin and play with the first two options (Display a Linked Node from Menus, Display Linked Nodes from a Tree) to show triples on the screen. Finding the Shortest Path Between Two Nodes: One significant advantage to using a triple store is to let the database find connections between nodes. First let us clean up the screen by removing all triples from the screen (Remove -> Remove All Triples) Then use ; to find Kevin Bacon (or use Display->Display Triples by Freetext Query) Do this again to find Arnold Schwarzenegger (just type Arnold and you ll find him). You should now have two nodes on the screen; Arnold Schwarzenegger and Kevin Bacon.

Now select Arnold, press shift-f, and drag the cursor to Kevin and click and you should see something like the picture below 6. Exploring a Graph in the Tab View and Outline View First let us discuss the Tabular View. Assuming that you see Kevin Bacon still on the screen, double click on his name (or press the letter t ) and you are in the tabular view. See the picture below. It is kind of self evident on how to navigate through this view. Note that there is a thick grey line in the middle. Above the grey line you have triples that start with Kevin, below the grey line you have triples where Kevin is in the object position of the triple.

Another way to explore the triples is to use the outline view. Click on Kevin again and hit the letter O and you ll see this. Note that black text means that you are going deeper into the hierarchy, the blue text means that you see triples that point back at Kevin. Just play with it and you ll soon understand intuitively. Writing a SPARQL Query in Query View: Gruff will help you write SPARQL Queries. If you know SPARQL to some extent then you can go to the query view by pressing the w or View->Query View. Select the SPARQL bullet and then just for fun type this little query that will select a hundred random triples from the triple store. Select * where {?x?y?z. } limit 100 First click on the Do Query button and then click on the Create Visual Graph button. Writing a SPARQL query with the Graphical Query Builder: Now you don t need to type SPARQL Queries, you can also build them graphically. Here is a brief example. The query that we are going to build: Who directed the movies that Kevin Bacon starred in? 1. Go to the Query Editor view (press e or View->Graphical Query View) 2. Use Display->Display Triples by Freetext Query to find Kevin Bacon 3. Right click on the screen and choose the first option: create variable node. Give it the name film (although you could any name you like, do not add the? in front of the variable, Gruff will do that for you) 4. Right click on the variable? film and choose the first option: Add Predicate Link

5. Drag the cursor to Kevin Bacon and you get the option to choose the name of the link. Choose the option Predicates of Object Kevin Bacon. AllegroGraph already knows all the predicates pointing to Kevin Bacon so now you just have to choose. Please choose starring 6. Now right click on the screen again and create a new variable node, call it director 7. Right click on? film and Add Predicate Link. Drag the cursor to? director. This time choose from All Predicates and choose director. 8. Now click on the do-query button and you ll see how a query gets created and executed.

Conclusion We have shown you a simple way to create a triple store, navigate the triples, and create queries. Please note that we only used Gruff with the built in triple store. For larger data sets and working with SPARQL 1.1 you will want to try the combination of the AllegroGraph server and the client side Gruff.