specs icon indicating copy to clipboard operation
specs copied to clipboard

Quick Reference section for Frictionless specs

Open rufuspollock opened this issue 4 years ago • 0 comments

I want a quick reference for Frictionless specs esp their structure and metadata so that I can quickly find relevant fields and map against them in my work

Acceptance

Quick ref page

  • [ ] At a glance class model with links (in e.g. mermaid)
  • [ ] Listing of fields per spec
  • [ ] Quick search ...
  • [ ] Bonus: patterns for extra metadata fields e.g. use Dublin Core by default ...

Tasks

  • [x] List all frictionless data fields in spreadsheet (so that we can use them in mapping work)
    • [x] Write script to auto extract from json schemas to CSV with columns Object | Field | Type | Description | ...
      • [x] Write simple test DONE -- A repo was created here.
      • [x] Extract properties DONE -- Those were added to the spreadsheet and in this directory in CSV files.
      • [x] Write to CSV DONE -- See above point.
      • [x] Store script in a gist DONE -- See linked repo above.
    • [x] Import to google spreadsheet (manually) DONE - This was added in the "Frictionless" sheet.
  • [ ] ...

Analysis

TODOs

  • Does json schema have a reference facility where i can x-ref another schema? (that way package can -> resource etc)

Converting json schema for Frictionless specs to CSV

Example: https://specs.frictionlessdata.io/schemas/data-package.json

Sample:

{
   "$schema":"http://json-schema.org/draft-04/schema#",
   "title":"Data Package",
   "description":"Data Package is a simple specification for data access and delivery.",
   "type":"object",
   "required":[
      "resources"
   ],
   "properties":{
      "profile":{
         "default":"data-package",
         "propertyOrder":10,
         "title":"Profile",
         "description":"The profile of this descriptor.",
         "context":"Every Package and Resource descriptor has a profile. The default profile, if none is declared, is `data-package` for Package and `data-resource` for Resource.",
         "type":"string",
         "examples":[
            "{\n  \"profile\": \"tabular-data-package\"\n}\n",
            "{\n  \"profile\": \"http://example.com/my-profiles-json-schema.json\"\n}\n"
         ]
      },

Expected output:

Object, Field, Type, Description, ...
Package, profile, Text
...

rufuspollock avatar Jun 14 '20 13:06 rufuspollock