Can you add code descriptions to a data package?


#1

In trying to make a data package for GTFS public transport data, I come across a lot of codes in the specification such as route_type in routes.txt.

Route_type. Required. Describes the type of transportation used on a route. Valid values for this field are:

0: Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area.
1: Subway, Metro. Any underground rail system within a metropolitan area.
2: Rail. Used for intercity or long-distance travel.
3: Bus. Used for short- and long-distance bus routes.
4: Ferry. Used for short- and long-distance boat service.

etc. 

Is there a way to add the code descriptions in a data package?

I’ve added the constraints and the meanings to the description but was hoping there was something more machine-readable.

{
  "name": "route_type",
  "description": "Describes the type of transportation used on a route. Valid values for this field are: 0: Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area.  1: Subway, Metro. Any underground rail system within a metropolitan area.  2: Rail. Used for intercity or long-distance travel.  3: Bus. Used for short- and long-distance bus routes.  4: Ferry. Used for short- and long-distance boat service.  5: Cable car. Used for street-level cable cars where the cable runs beneath the car.  6: Gondola, Suspended cable car. Typically used for aerial cable cars where the car is suspended from the cable.  7: Funicular. Any rail system designed for steep inclines.",
  "type": "integer",
  "format": "default",
  "constraints": {
    "required": true,
    "minimum": 0,
    "maximum": 7
  }
}

#2

Hi @Stephen this is a great question. It was previously raised on the forum here and moved to the following GitHub issue on the specification repo:

https://github.com/frictionlessdata/specs/issues/156