W3C home > Mailing lists > Public > public-csv-wg@w3.org > February 2014

Re: CSV-LD proposal

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Thu, 13 Feb 2014 11:28:05 -0800
Cc: "public-csv-wg@w3.org" <public-csv-wg@w3.org>
Message-Id: <727737EF-528B-4221-84ED-653BF199DAFD@greggkellogg.net>
To: Alf Eaton <eaton.alf@gmail.com>

On Feb 12, 2014, at 9:28 AM, Alf Eaton <eaton.alf@gmail.com> wrote:

> I've been having a go at writing a PHP class that will read a JSON
> description file and use it to extract linked data from a CSV file.
> 
> The JSON description file a) describes how to parse the CSV file, and
> b) links to a JSON-LD context document that describes how to map the
> column names to URIs.
> 
> Repo:
>  https://github.com/hubgit/csvfile-php
> Example description file:
>  https://github.com/hubgit/csvfile-php/blob/master/demo/description.json
> Example context document:
>  https://github.com/hubgit/csvfile-php/blob/master/demo/context.json
> 
> It's not finished yet (or documented), but has been useful for
> experimenting with ideas for the description file, so I thought I'd
> post it to the list.
> 
> The idea is to get to the point where any CSV file can be parsed
> successfully using just the declarative information in the description
> file. Perhaps the conversion of field names to URIs using the context
> document should be moved out into a separate step with a dedicated
> JSON-LD parser, I'm not sure.

Great Alf, this is fairly close to my CSV-LD proposal without the use of framing a framing document, which is fine for simple cases.

I hadn't considered the need for a format description, and I question if it's always needed, but I could see something like that being added to a spec.

Describing column micro-syntaxes might also be useful, and is another motivation for a format description.

Thanks,

Gregg

> It's similar to the Simple Data Format, except that SDF has its own
> schema/fields definition section rather than pointing to a separate
> JSON-LD context document. It might be possible to merge the two
> together, and maybe in fact there will still be some field-specific
> parsing instructions (e.g. the format of date fields) that need a
> separate schema definitionů
> 
> Alf
> 
> On 1 February 2014 01:52, Gregg Kellogg <gregg@greggkellogg.net> wrote:
>> I added a proposal for something I call CSV-LD to the wiki [1]. As the name might suggest, this is strongly tied to JSON-LD, and uses JSON-LD context and frame definitions to both provide meaning to CSV, allowing it to be losslessly transformed to JSON-LD, or to create CSV from JSON-LD (with or without embedding).
>> 
>> Consider this a straw-man proposal. It does lay out some use cases that are generally useful (and perhaps should be copied to other pages on the wiki), but there may be more use cases to consider. IMO, creating a specification for this, and extending an existing JSON-LD implementation to support this would not be too difficult.
>> 
>> Gregg Kellogg
>> gregg@greggkellogg.net
>> 
>> [1] https://www.w3.org/2013/csvw/wiki/CSV-LD
>> 
>> 
> 
Received on Thursday, 13 February 2014 19:28:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:38 UTC