{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "TIDES Data Package", "description": "TIDES Data Package is a simple specification for data access and delivery of tabular TIDES transit data.", "type": "object", "required": [ "title", "profile", "resources" ], "recommended":[ "name", "description", "agency", "ntd_id", "licenses", "contributors", "maintainers" ], "properties": { "profile": { "default": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/tides-datapackage-profile.json", "propertyOrder": 10, "title": "Profile", "description": "The json-schema profile used to validate this datapackage descriptor. Should be `https://raw.githubusercontent.com/TIDES-transit/TIDES//spec/tides-datapackage-profile.json`. Defaults to `https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/tides-datapackage-profile.json`", "format": "uri", "examples": [ "`https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/tides-datapackage-profile.json`" ] }, "title": { "propertyOrder": 20, "title": "Title", "description": "A human-readable title.", "type": "string", "examples": [ "Make Believe Trolley 1/1/2001-2/1/2001" ] }, "name": { "propertyOrder": 30, "title": "Name", "description": "Short, unique [sluggable](https://en.wikipedia.org/wiki/Clean_URL#Slug) identifier string.", "type": "string", "pattern": "^([-a-z0-9._/])+$", "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", "examples": [ "trolley_2001_1" ] }, "description": { "propertyOrder": 40, "format": "textarea", "title": "Description", "description": "Short description of TIDES data package.", "type": "string", "examples": [ "Raw and processed data from the Neighborhood of Make Believe Trolley recorded 1/1/2001-2/1/2001" ] }, "agency": { "propertyOrder": 50, "format": "textarea", "title": "Agency", "description": "Transit agency name.", "type": "string", "examples": [ "Make Believe Neighborhood Trolley" ] }, "ntd_id": { "propertyOrder": 60, "title": "NTD ID", "description": "ID for the National Transit Database.", "type": "string", "pattern": "^([-a-z0-9._/])+$", "context": "Background on NTD available at https://www.transit.dot.gov/ntd", "examples": [ "0R02-00307" ] }, "contributors": { "propertyOrder": 70, "title": "Contributors", "description": "Array of data contributors.", "type": "array", "minItems": 1, "items": { "title": "Contributor", "description": "A contributor to this descriptor.", "type": "object", "properties": { "name": { "title": "Name", "description": "A human-readable name.", "type": "string", "examples": [ "Daniel Tiger" ] }, "email": { "title": "Email", "description": "An email address.", "type": "string", "format": "email", "examples": [ "daniel@makebelievetrolley.gov" ] }, "organization": { "title": "Organization", "description": "An organizational affiliation for this contributor.", "type": "string", "example": "Make Believe Neighborhood Trolley" }, "role": { "title": "Role", "description": "The contributor's role in the project", "type": "string", "default": "contributor" } }, "required": [ "title" ], "context": "Use of this property does not imply that the person was the original creator of, or a contributor to, the data in the descriptor, but refers to the composition of the descriptor itself." }, "examples": [ "{'name':'Daniel Tiger','email': 'daniel@makebelievetrolley.gov','organization':'Make Believe Neighborhood Trolley','role':'contributor'}" ] }, "maintainers": { "propertyOrder": 80, "title": "Maintainers", "description": "Array of data maintainers", "type": "array", "minItems": 1, "items": { "title": "Maintainer", "description": "A maintainer of this descriptor.", "type": "object", "properties": { "name": { "title": "Name", "description": "A human-readable name.", "type": "string", "examples": [ "Henrietta Pussycat" ] }, "email": { "title": "Email", "description": "An email address.", "type": "string", "format": "email", "examples": [ "henrietta@makebelievetrolley.gov" ] }, "organization": { "title": "Organization", "description": "An organizational affiliation for this maintainer.", "type": "string" }, "role": { "title": "Role", "description": "The maintainer's role in the project", "type": "string", "default": "maintainer" } }, "required": [ "title" ], "context": "Use of this property does not imply that the person was the original creator of, or a contributor to, the data in the descriptor, but refers to the composition of the descriptor itself." }, "examples": [ "{'name':'Henrietta Pussycat','email': 'henrietta@makebelievetrolley.gov','organization':'Make Believe Neighborhood Trolley','role':'maintainer'}" ] }, "licenses": { "propertyOrder": 90, "title": "Licenses", "description": "The license(s) under which this package is published.", "type": "array", "minItems": 1, "items": { "title": "License", "description": "An array of license objects which apply to this data package. Must include at least a `name` or `path`", "type": "object", "anyOf": [ { "required": [ "name" ] }, { "required": [ "path" ] } ], "properties": { "name": { "title": "Open Definition license identifier", "description": "MUST be an Open Definition license identifier, see http://licenses.opendefinition.org/", "type": "string", "pattern": "^([-a-zA-Z0-9._])+$", "examples": ["odc-by","CC-BY-4.0"] }, "path": { "title": "Path", "description": "A fully qualified public URL, or a Unix-style relative file path.", "type": "string", "pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$", "examples": [ "https://opendefinition.org/licenses/odc-by/", "license.md" ], "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." }, "title": { "title": "Title", "description": "A human-readable title of the license.", "type": "string", "examples": [ "Creative Commons Attribution 4.0" ] } } }, "context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.", "examples": [ "{'name':'CC-BY-4.0','path':'https://opendefinition.org/licenses/cc-by/','name':'Creative Commons Attribution 4.0'}" ] }, "resources": { "propertyOrder": 100, "title": "Tabular Data Resources", "description": "Array describing the data files included in your package, formated as a [`tabular-data-resource`](#tabular-data-resource)", "type": "array", "minItems": 1, "items": { "title": "Tabular Data Resource", "description": "A Tabular Data Resource.", "type": "object", "required": [ "name", "path", "schema", "profile" ], "recommended": [ "title", "description", "sources", "licenses" ], "properties": { "profile": { "default": "tabular-data-resource", "propertyOrder": 10, "title": "Profile", "description": "Must be `tabular-data-resource`", "type": "string", "examples": [ "tabular-data-resource" ] }, "name": { "propertyOrder": 20, "title": "Name", "description": "Short, unique [sluggable](https://en.wikipedia.org/wiki/Clean_URL#Slug) identifier string for a data table.", "type": "string", "pattern": "^([-a-z0-9._/])+$", "context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.", "examples": [ "vehicle_locations_2001_01" ] }, "path": { "propertyOrder": 30, "title": "Path", "description": "A reference to the data for this resource, as a valid URI string.", "type": "string", "pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$", "examples": [ "event/2001/vehicle_locations_2001_01.csv" ], "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." }, "tides-table": { "enum": [ "devices", "fare_transactions", "operators", "station_activities", "passenger_events", "stop_visits", "train_cars", "trips_performed", "vehicle_locations", "vehicle_train_cars", "vehicles" ], "description": "An identifier string corresponding to the name of one of the table specs in the TIDES data package", "type": "string", "examples": [ "fare_transactions", "train_cars" ] }, "schema": { "title": "Table Schema", "description": "Location of the table schema for this resource.", "type": "string", "examples": [ "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/fare_transactions.schema.json" ] }, "title": { "title": "Title", "description": "A human-readable title for the data resource.", "type": "string", "examples": [ "Neighborhood Trolley Vehicle Locations: 1/1/2001-2/1/2001" ], "propertyOrder": 50 }, "description": { "title": "Description", "description": "D", "type": "string", "examples": [ "Vehicle location event data from the Neighborhood of Make Believe Trolley recorded 1/1/2001-2/1/2001" ], "propertyOrder": 60, "format": "textarea" }, "homepage": { "propertyOrder": 70, "title": "Home Page", "description": "The home on the web that is related to this data package.", "type": "string", "format": "uri", "examples": [ "http://example.com" ] }, "sources": { "propertyOrder": 140, "options": { "hidden": true }, "title": "Sources", "description": "The raw sources for this resource which describe where the data came from.", "type": "array", "minItems": 0, "examples": [ "[ {'title':'Trolley CAD/AVL System','component':'CAD/AVL','product':'TrolleyMaster','product_version':'3.1.4'} ]" ], "items": { "title": "Source", "type": "object", "required": [ "title" ], "properties": { "title": { "title": "Title", "description": "Human-readable title of the data source.", "type": "string", "examples": [ "Trolley CAD/AVL System" ] }, "component": { "title": "Component", "description": "The technology component used to generate this data (directly or indirectly)", "type": "string", "examples": [ "CAD/AVL", "AFC", "APC" ] }, "product": { "title": "Product", "description": "What product was used to generate this data (directly or indirectly)?", "type": "string", "examples": [ "TrolleyMaster" ] }, "product_version": { "title": "Product Version", "description": "Describe the version of the product was used.", "type": "string" }, "vendor": { "title": "Vendor", "description": "What company makes this product?", "type": "string" } } } }, "licenses": { "propertyOrder": 90, "title": "Licenses", "description": "The license(s) under which this package is published.", "type": "array", "minItems": 1, "items": { "title": "License", "description": "An array of license objects which apply to this data package. Must include at least a `name` or `path`", "type": "object", "anyOf": [ { "required": [ "name" ] }, { "required": [ "path" ] } ], "properties": { "name": { "title": "Open Definition license identifier", "description": "MUST be an Open Definition license identifier, see http://licenses.opendefinition.org/", "type": "string", "pattern": "^([-a-zA-Z0-9._])+$", "examples": ["odc-by","CC-BY-4.0"] }, "path": { "title": "Path", "description": "A fully qualified public URL, or a Unix-style relative file path.", "type": "string", "pattern": "^(?=^[^./~])(^((?!\\.{2}).)*$).*$", "examples": [ "https://opendefinition.org/licenses/odc-by/", "license.md" ], "context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly." }, "title": { "title": "Title", "description": "A human-readable title of the license.", "type": "string", "examples": [ "Creative Commons Attribution 4.0" ] } } }, "context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.", "examples": [ "{'name':'CC-BY-4.0','path':'https://opendefinition.org/licenses/cc-by/','name':'Creative Commons Attribution 4.0'}" ] }, "dialect": { "propertyOrder": 50, "title": "CSV Dialect", "description": "The CSV dialect descriptor.", "type": [ "string", "object" ], "required": [ "delimiter", "doubleQuote" ], "properties": { "csvddfVersion": { "title": "CSV Dialect schema version", "description": "A number to indicate the schema version of CSV Dialect. Version 1.0 was named CSV Dialect Description Format and used different field names.", "type": "number", "default": 1.2, "examples:": [ "1.2" ] }, "delimiter": { "title": "Delimiter", "description": "A character sequence to use as the field separator.", "type": "string", "default": ",", "examples": [ "`;`", "`|`" ] }, "doubleQuote": { "title": "Double Quote", "description": "Specifies the handling of quotes inside fields.", "context": "If Double Quote is set to true, two consecutive quotes must be interpreted as one.", "type": "boolean", "default": true }, "lineTerminator": { "title": "Line Terminator", "description": "Specifies the character sequence that must be used to terminate rows.", "type": "string", "default": "\r\n", "examples": [ "`\r`", "`\n`" ] }, "nullSequence": { "title": "Null Sequence", "description": "Specifies the null sequence, for example, `\\N`.", "type": "string", "examples": [ "`\\N`" ] }, "quoteChar": { "title": "Quote Character", "description": "Specifies a one-character string to use as the quoting character.", "type": "string", "default": "\"", "examples": [ "`'`" ] }, "escapeChar": { "title": "Escape Character", "description": "Specifies a one-character string to use as the escape character.", "type": "string", "examples": [ "`\\`" ] }, "skipInitialSpace": { "title": "Skip Initial Space", "description": "Specifies the interpretation of whitespace immediately following a delimiter. If false, whitespace immediately after a delimiter should be treated as part of the subsequent field.", "type": "boolean", "default": false }, "header": { "title": "Header", "description": "Specifies if the file includes a header row, always as the first row in the file.", "type": "boolean", "default": true }, "commentChar": { "title": "Comment Character", "description": "Specifies that any row beginning with this one-character string, without preceeding whitespace, causes the entire line to be ignored.", "type": "string", "examples": [ "`#`" ] }, "caseSensitiveHeader": { "title": "Case Sensitive Header", "description": "Specifies if the case of headers is meaningful.", "context": "Use of case in source CSV files is not always an intentional decision. For example, should \"CAT\" and \"Cat\" be considered to have the same meaning.", "type": "boolean", "default": false } }, "examples": [ "{'delimiter': ';' }" ] }, "format": { "propertyOrder": 80, "title": "Format", "description": "The file format of this resource.", "context": "`csv`, `xls`, `json` are examples of common formats.", "type": "string", "examples": [ "`xls`" ] }, "mediatype": { "propertyOrder": 90, "title": "Media Type", "description": "The media type of this resource. Can be any valid media type listed with [IANA](https://www.iana.org/assignments/media-types/media-types.xhtml).", "type": "string", "pattern": "^(.+)/(.+)$", "examples": [ "`text/csv`" ] }, "encoding": { "propertyOrder": 100, "title": "Encoding", "description": "The file encoding of this resource.", "type": "string", "default": "utf-8", "examples": [ "`utf-8`" ] }, "bytes": { "propertyOrder": 110, "options": { "hidden": true }, "title": "Bytes", "description": "The size of this resource in bytes.", "type": "integer", "examples": [ "2082" ] }, "hash": { "propertyOrder": 120, "options": { "hidden": true }, "title": "Hash", "type": "string", "description": "The MD5 hash of this resource. Indicate other hashing algorithms with the {algorithm}:{hash} format.", "pattern": "^([^:]+:[a-fA-F0-9]+|[a-fA-F0-9]{32}|)$", "examples": [ "d25c9c77f588f5dc32059d2da1136c02", "SHA256:5262f12512590031bbcc9a430452bfd75c2791ad6771320bb4b5728bfb78c4d0" ] } } } }, "sources": { "propertyOrder": 140, "options": { "hidden": true }, "title": "Sources", "description": "The raw sources for this data package which describe where the data came from. Can be alternatively specified at the individual resource-level.", "type": "array", "minItems": 0, "examples": [ "[ {'title':'Trolley CAD/AVL System','component':'CAD/AVL','product':'TrolleyMaster','product_version':'3.1.4'} ]" ], "items": { "title": "Source", "type": "object", "required": [ "title" ], "properties": { "title": { "title": "Title", "description": "Human-readable title of the data source.", "type": "string", "examples": [ "Trolley CAD/AVL System" ] }, "component": { "title": "Component", "description": "What technology component was used to generate this data (directly or indirectly)? Examples include `AVL`, `APC`, `AFC`, etc.", "type": "string", "examples": [ "CAD/AVL", "AFC", "APC" ] }, "product": { "title": "Product", "description": "What product was used to generate this data (directly or indirectly)?", "type": "string", "examples": [ "TrolleyMaster" ] }, "product_version": { "title": "Product Version", "description": "Describe the version of the product was used.", "type": "string" }, "vendor": { "title": "Vendor", "description": "What company makes this product?", "type": "string" } } } } } }