N-Quad graphs - how do I use them?

3.1k views Asked by At

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)?

1

There are 1 answers

2
cygri On BEST ANSWER

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.