I have a lot of interests. I really like learning and doing new things, and I do not make a secret of it. One of the interesting things about working at Grakn Labs is that, because the software has a very general scope, I keep getting the chance to look at completely different domains of application.

While I was browsing around doing some research on how to build a family-tree-related ontology, I stumbled upon this document from Lenzen Research. It is a piece of genealogy research into the family of a Catherine Niesz Titus. The document shows three generations of Catherine’s maternal lineage, along with the documents that were used to gather the data. On its own, it is a very interesting read, but in this case it has also served as a source of inspiration to build a new dataset to play with using Grakn.

The Data

I have put everything you need to work through this example in the GraknLabs sample-datasets repo. Further information about what is included, and how to work with it, is in the project’s README.md file.

The data that we will load into a graph is based on the Lenzen Research pdf document, with some modifications, which I made for the sake of getting interesting results from the queries that I describe later.

Just to be clear: the dataset is not historically accurate, nor does it pretend to be.

The data you will use has been built into Graql format, which is the declarative language that Grakn understands. The raw data can also be found in the project repository, and comprises a set of CSV files. The step that migrates the raw data into Graql is a straightforward one, but not documented here because you don’t need that information to work through this example. However, we have it documented as an example of CSV migration on the Grakn documentation portal.

Make sure that you have downloaded the latest version of GRAKN.AI (I used version 0.8.0), started the Grakn engine, then loaded the ontology, inference rules and the data. If you’re unsure about any of these steps, please take a look at our documentation or read some of my previous blog posts.

Let’s get started!

Meet the Family

First of all, if you have not already done so, start Grakn (with the command grakn.sh start ) and load the visualiser...

…wait a second…you didn’t know Grakn has a visualiser? Well, it has not received much attention in previous posts, but it’s there. You can load it simply by pointing your browser to localhost:4567 . If everything is correct, you will find yourself in front of our GUI, looking at the graph loaded into the default keyspace.

Click the Types button in the top right, then the Visualise button in the newly opened drawer and, lo and behold, the ontology will materialise itself in front of your eyes.