Introducing SPARQL Views

As some of you know, I have been working on a Google Summer of Code project this summer. My aim is to make it easy for site administrators to pull data from RDF datasets into their sites and have that data actually contribute to the site, instead of just being a novelty.

As part of this, I've been working on a module called SPARQL Views. It is still quite limited, but I wanted to get it out there for feedback. It's also still a bit of a bear to install, but if you can get through the installation process I'd love to hear your feedback—and if you can't, I'll have a much more user-friendly version coming out later.

Other features of this release are:

  • Token API integration for subjects and objects
    Token API, created by Jeff Eaton, provides a very simple way to declare and define tokens in a module. Users can then enter these tokens in the UI as placeholders. The tokens will get computed on page load, so any variables available during the page load process can be used to produce the replacement value.

    A SPARQL Views use case for this is adding publication lists to user profiles. A field could be added to user profiles so that users could enter their DBLP URIs. Then, with a token defined in a few lines of code, the administrator could create the SPARQL query in SPARQL Views so that the user's publications show up on their user profile.
     

  • Exhibit integration
    Exhibit is a great framework created by David Huynh that allows site admins to create quick visualizations of structured information. A Drupal module was created to bring Exhibit to Drupal 6 and while it did include a module that would allow people to use SPARQL queries to feed the exhibit, people had trouble getting it to work.

    I have created a plugin that can be used with SPARQL Views (use the version on GitHub to try this out). You have to patch Exhibit to make it work (URL in README) and it is only tested for the basic Exhibit use case with facets. Please feel free to play around and post bugs.

Thank you to Daniel Wehner (dereine) for his suggestion to use a Views query plugin and the initial help figuring out just how query plugins work. And thank you to Michael Hausenblas for providing a use case for me to hack against and motivation.

Comments

Already Seems Very Useful

Hi Lin,

Thanks for the intro o your SPARQL module.

Based on your video it already looks like a very useful method for finding information.

That being said I don't t really understand RDF. I've heard about it and have a vague idea what its used for.

It maybe helpful to explain some of the basics about RDF and how one goes about finding information using RDF. Like: whats an endpoint, a prefix, subject, attribute (predicate), value (object).

All the best,
Guy Saban

Thanks for the feedback (and

Thanks for the feedback (and sorry for the delay in responding!)

I will be releasing a new version of the module (pretty soon now, I think) and that will have a much, much more intuitive interface for building the query. My big goal is to make it so you can play around with the UI and figure out how RDF and SPARQL work just from clicking. There will also be advanced help throughout the interface for those who want to learn more about the concepts.

Thanks for the feedback and if you have a chance to try the next version when I release it, I would love to hear your feedback.

Cheers,
Lin

Awesome!

hi Lin,

This is amazing! We're using Drupal a lot here at the open university - and currently doing some work internally and with Talis re linked data. The work you are doing here could be absolutely fantastic for us.

Drop me a line if there's any help we can offer.
Stuart

Great Module

Hi Lin,

thanks for this great module! I've just tested it and it work's fine. One big problem (for me) at the moment is that the sparql query can't be limited. I requested some data from dbpedia and after about 1 Minute my browser hang on.

I'm curious about the next dev version.

with kind regards,
Michael Lambertz