Skip to content

Suggestion #1

Description

@BenjaminHofstetter

I like your approach. Just as a suggestion. You can actually add semantics to your CSV. Like what is a Row. CSV files often only provide the file name or column headers to determine the content of a row. But you can add this explicit.

e.g.

 {
            "virtual": true,
            "propertyUrl": "rdf:type",
            "valueUrl": "schema:Person"
 }

You can do the same with properties. E.g. use schema.org properties if possible.

{
  "@context": ["http://www.w3.org/ns/csvw", {
    "schema": "http://schema.org/",
    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
    "ex": "http://example.org/vocab#"
  }],
  "tables": [
    {
      "url": "contacts.csv",
      "tableSchema": {
        "aboutUrl": "http://example.org/person/{email}",
        "columns": [
          {
            "name": "name",
            "titles": "Name",
            "datatype": "string",
            "required": true,
            "propertyUrl": "schema:name"
          },
          {
            "name": "email",
            "titles": "Email",
            "datatype": "string",
            "required": true,
            "propertyUrl": "schema:email"
          },
          {
            "name": "age",
            "titles": "Age",
            "datatype": "integer",
            "propertyUrl": "schema:age"
          },
          {
            "name": "subscribed",
            "titles": "Subscribed",
            "datatype": "boolean",
            "propertyUrl": "ex:newsletterSubscribed"
          },
          {
            "virtual": true,
            "propertyUrl": "rdf:type",
            "valueUrl": "schema:Person"
          }
        ]
      }
    }
  ]
}

As a side effect of your Editor isn't just an editor. It can communicate the semantics of the content.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions