Flavour your linked data with garlic

Explore linked data collections via Web-API’s — zero coding required!

Carlos Martinez-Ortiz
Netherlands eScience Center
3 min readJun 12, 2018

Linked data is growing in importance — and rightly so: it facilitates machine readability of data, making it easier for machines to explore connections in meaning (semantic) which are obvious to humans but not to machines.

SPARQL! In the world of linked data, SPARQL queries are used extensively as the query language to extract data from a triple store (a special type of database for storing linked data): they are our main tool to interact with linked data.

A SPARQL query

But writing SPARQL queries is not the most trivial of tasks. Most researchers who want to work with linked data do not know how to write SPARQL queries — and maybe they shouldn’t need to know! Let the SPARQL expert write a few queries which can search through the data and the domain expert can use these queries as required.

Enter grlc — grlc (pronounced ‘garlic’) is a tool which “automatically builds Web APIs using SPARQL queries stored in git repositories”. What this means in practice is that you can store your SPARQL queries on GitHub and then you can run your queries on your favourite programming language (Python, Javascript, etc.) using a Web API (including swagger documentation) just as easily as loading data from a web page.

Grlc — from GitHub to data

Who is using grlc?

grlc was initially developed as one of the tools used in CLARIAH, the Dutch research infrastructure for the arts and humanities. It was then adopted to be part of the CLARIAH MediaSuite.

Within the Netherlands eScience Center, we are promoting the use of grlc in our projects which have a linked data component. So far, it has been used within the CandyGene and DataQuality projects. In both cases, the Web API is used to load data on a Jupyter notebook to visualize the results of the queries. This enables researchers to interact with data in triple stores without having to type a single line of SPARQL.

Loading data via grlc into Jupyter notebooks — these plots were created from data loaded via a grlc Web API.

Extra features

But where is the data stored? Do I need to load all my data at once, or can I paginate my query? Do my results get cached? Can I customize the output of my query? What if I want… — all valid questions, but the answers are beyond the scope of this blog post. If you want to know more details of what grlc can and cannot do, please head to the usage section.

Conclusion

If you are working with linked data, you should use grlc!​

Sign up to discover human stories that deepen your understanding of the world.

Published in Netherlands eScience Center

We’re an independent foundation with 80+ passionate people working together in the Netherlands’ national centre for academic research software.

No responses yet

What are your thoughts?