Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

N-Quad graphs - how do I use them?

I downloaded a bunch of data from Nature in the form of N-Quads, .nq files. These contain RDF graphs, right? How do I access this data, and how can I translate RDF graphs into a more usable format (preferably something like Boost or igraph for R/C++/Python)?

like image 373
jclancy Avatar asked Oct 07 '12 18:10

jclancy


1 Answers

The typical workflow is something like this:

  1. Import the N-Quads dump into a SPARQL-capable triple store like OpenLink Virtuoso or Apache Fuseki
  2. Write SPARQL queries that extract the data you need
  3. Transform the SPARQL results, which you can get in a simple XML or JSON (or CSV, depending on the store) format, into whatever format you need

Alternatively, send the SPARQL queries directly from your applications and do with the data whatever needs to be done. There are SPARQL client libraries for most languages, but even if you don't have one, it's a fairly simple matter of %-encoding the query and constructing a query URL.

like image 181
cygri Avatar answered Sep 19 '22 05:09

cygri