Git Product home page Git Product logo

table_salad's Introduction

Table->SALAD

Convert a .csv table to a SALAD schema

Schema Generation

Input

A .csv file with the field headers: field_name, doc, type, iri

Eg:

field_name doc type iri
sample_name The user-defined name for the sample. string http://edamontology.org/data_3273
collection_date The date on which the sample was collected. string http://purl.obolibrary.org/obo/NCIT_C81286

(Note that SALAD has a limited set of primitive types available to choose from.)

A context.json file with prefixes for any IRIs used in your table:

{
  "edam_data": "http://edamontology.org/data_",
  "ncit": "http://purl.obolibrary.org/obo/NCIT_"
}

(optionally) a name for your schema class (defaults to SchemaClass if not provided.

Usage

table_salad_schema_gen.py --input schema_table.csv --context context.json --name SampleSchema
$namespaces:
  ncit: http://purl.obolibrary.org/obo/NCIT_
  edam_data: http://edamontology.org/data_

$graph:
- fields:
    collection_date:
      doc: The date on which the sample was collected.
      jsonldPredicate:
        _id: ncit:C81286
      type: date
    sample_name:
      doc: The user-defined name for the sample.
      jsonldPredicate:
        _id: edam_data:3273
      type: string
  type: record
  name: SampleSchema
  documentRoot: 'true'

Data Validation

Input

Usage

table_salad_validate.py

table_salad's People

Contributors

dfornika avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

cimendes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.