Join us for a Query Barn-Raising

Posted on 10/10/2011 by


Barn Raising*Update*

Today, we’re  having our first virtual barn-raising event. The goal is to add value to datasets, and today’s task is to contribute useful or interesting queries to as many datasets as possible.

There is a new timeline visualisation up on the site, which follows newly-created queries as they’re added. The name of the query-creator appears, and you can see a summary of the query with links to the datasets too.

The main meeting point is IRC at #kasabi or and you can also send messages to the developer list (reply here, or send to

A few tips:

* Try not to duplicate queries
* Try to add queries to datasets with no existing examples
* Use clear titles for your queries
* Make sure to include a description of what to expect from your query when it’s run.

Each dataset displays its sample queries—if any exist—on its homepage by default, just under the “Default APIs” and SPARQL section. From there, you can simply click “Create a sample query” to get started. It is helpful to give your sample query a title telling what it does, and a description explaining expected results from running the query. The vocabularies and classes used in each dataset can be found either by clicking the link on the set’s page, or by appending /schema to the uri. I also find it useful to have a look at existing queries on other datasets for ideas.

This is also an opportunity to practice your SPARQL, or ask questions and polish up your query skills, so feel free to ask for help or share ideas on IRC.

I’d like to invite you to our first Kasabi community “barn-raising” event, on Friday, 28 October. The challenge we’re looking to tackle is to crowd-source useful and interesting queries for all datasets in Kasabi. The team will be on the #kasabi channel on IRC (, and I will host a public Google+ hangout, for any discussions and pointers.

Everyone is welcome, and announcements of the Hangout address and anything we can think to tell you in advance will be available here on the blog, and on @TeamKasabi and the Kasabi Developers’ group.

Barn Raising?

In 19th-century North America, remote communities formed a tradition to easily overcome daunting challenges. They gathered together around a single project, and neighbours could accomplish in a day what would have taken one family weeks to do.

They called this barn-raising. The more folk pitching in to lift up the sides, scale the walls and shingle the roof, the quicker a suitable barn could be put together.

Why Queries?

Every set can have its own range of published queries, each performing a particular function for useful access to the data. Sharing queries lets someone familiar with a  dataset, or particularly skilled in SPARQL to help others query it in useful ways. Someone may be able to share a query that does exactly what someone else wants. By publishing queries directly in Kasabi, they become immediately useful: you can click on them and get results. These can also provide a starting point for others to begin customising.

As an example, we can take a look at some sample queries listed for the NHS Organisation dataset. One of them answers the question: “Which organisations have Twitter account?”

PREFIX rdfs: <>
PREFIX foaf: <>

SELECT ?org ?name ?twitter WHERE {
   ?org rdfs:label ?name;
        foaf:holdsAccount ?twitter.

   ?twitter foaf:accountServiceHomepage <>


To answer any new questions, you can click “Create a Sample Query,” and form your SPARQL request. The sample is saved and can be tested and copied by the rest of the community.

See you then!

CC BY Image: “P1050831” by grongar via flickr 

Posted in: Announcement, Events