Jump to content

Module:Tabular data/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mxn (talk | contribs) at 00:47, 10 May 2020 (cell). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


This module displays the contents of a tabular data page on Wikimedia Commons as a (rather plain) table.

cell

Returns the value of the cell at the given row index and column name.

Usage: {{#invoke:Tabular data/doc|cell|Page name.tab|output_row=Index of row to output|output_column=Name of column to output}}

A row index of 1 refers to the first row in the table. A row index of -1 refers to the last row in the table. It is an error to specify a row index of 0.

Example getting the latest death toll in c:COVID-19 Cases in Santa Clara County, California.tab (regardless of when the table was last updated):

Lua error in package.lua at line 80: module 'Module:Tabular data/doc' not found.

lookup

Returns the value of the cell in the given output column of the row matching the search key and column.

This function is reminiscent of LOOKUP() macros in popular spreadsheet applications, except that the search key must match exactly. (On the other hand, this means the table does not need to be sorted.)

Usage: {{#invoke:Tabular data/doc|lookup|Page name.tab|search_value=Value to find in column|search_column=Name of column to search in|output_column=Name of column to output}}

Example getting the total confirmed case count in c:COVID-19 Cases in Santa Clara County, California.tab on the day that the county issued a stay-at-home order:

Lua error in package.lua at line 80: module 'Module:Tabular data/doc' not found.

wikitable

Returns the entire data table as a (rather plain) table.

Usage: {{#invoke:Tabular data/doc|wikitable|Page name.tab}}

Example

Lua error in package.lua at line 80: module 'Module:Tabular data/doc' not found.