Help:Tabular Data

Tabular data allows users to create a CSV-like table of data, and use it from multiple Wikis to create automatic tables, lists, and graphs.

To create a new table, go to Wikimedia Commons, and create a new page with a name in this style:. Data namespace will only allow page titles that end in  to be created. For now, there is no spreadsheet editor, and all data must be added in raw JSON format. If tabular data prooves useful, we hope to add an easy to use editor.

Tabular JSON data supports several basic value types:
 * number
 * boolean (true or false)
 * string (maximum 400 characters, no new lines or tabs allowed)
 * localized (multilingual) string, represented as an object with keys being language codes (e.g. "en"), and values being a string with above limitations of 400 max chars.

Tabular data has several required and optional top-level elements:
 * The "license" field must always be set. At this point it must be set to "CC0-1.0" (CC0 public domain dedication).
 * The "info" field must be set to an object with at least one key-value, where the key is a language code (e.g. "en"), and the value is a description string (max 400 chars, no new lines)
 * The "headers" field must be set to a list of unique strings. Each header must begin with a letter, and only contain latin characters or digits (A..Z, a-z, 0-9). This is done so that each header can be easily used from a coding environment like Lua or Vega graphs.
 * The "titles" field is an optional translation for each column's header. If set, it must be a list of localized string objects. Must have the same number of list elements as the "headers" field.
 * The "types" field must always be set to a list of types (strings), each type being either "number", "boolean", "string", or "localized". The list must be the same size as the list of "headers".
 * The "rows" field must always be set to a list of lists. Each sub-list must have the same number of elements as headers, and must mach the value types.

There are two ways to use this data:
 * A Lua script on any wiki can get this data by calling . The function returns tabular data in almost the same format as the original JSON, except that all localized strings will be converted to regular strings, and the license field will also include a localized license name. To get the data in another language, pass language code as the second parameter. To get the data in the original, unmodified form, use "_" as the language code.
 * A Vega graph can get tabular data by using "tabular:///Example.tab" as the data source url.