Rdf-tabular

Tabular Data RDF Reader and JSON serializer

Tabular Data RDF Reader and JSON serializer

Features

RDF::Tabular parses CSV or other Tabular Data into RDF and JSON using the W3C CSVW specifications, currently undergoing development.

Install with gem install rdf-tabular

RDF::Tabular parses CSVs, TSVs, and potentially other tabular data formats. Using rules defined for W3C CSVW, it can also parse metadata files (in JSON-LD format) to find a set of tabular data files, or locate a metadata file given a CSV:

Given a CSV http://example.org/mycsv.csv look for http://example.org/mycsv.csv-metata.json or http://example.org/metadata.json. Metadata can also be specified using the describedby link header to reference a metadata file.

Given a metadata file, locate one or more CSV files described within the metadata file.

Also, extract embedded metadata from the CSV (limited to column titles right now).

This associates the metadata with the CSV doap.csv, creates a common subject for all rows in the file, and a common predicate using the URI Template URI Templatehttp://usefulinc.com/ns/doap#\{_name\} which uses the name of each column (defaulted from titles) to construct a URI in the DOAP vocabulary, and constructs object URIs for object-valued properties from the contents of the column cells. In some cases, the predicates are changed on a per-column basis by using a different propertyUrl property on a given column.