Help:Contributing/dataCuration: Difference between revisions
Add the curated-dataset contributor guide (issue #7; pending deployment) (via create-page on MediaWiki MCP Server) |
Mark the curated-dataset guide live (deployed 2026-11-22) (via update-page on MediaWiki MCP Server) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<blockquote>''' | <blockquote>'''Deployed 2026-11-22''' (PR #211). The curated-dataset store, APIs, parser functions and <code>Dataset:</code> namespace are live on production.</blockquote> | ||
A '''curated dataset''' is a hand-picked scientific table (for example a meta-analysis table cited by an article) stored as structured, queryable data instead of a plain-text table. Each dataset has a manifest, a readable <code>Dataset:</code> page, and a set of measurements that can be queried and exported. | A '''curated dataset''' is a hand-picked scientific table (for example a meta-analysis table cited by an article) stored as structured, queryable data instead of a plain-text table. Each dataset has a manifest, a readable <code>Dataset:</code> page, and a set of measurements that can be queried and exported. | ||
| Line 14: | Line 14: | ||
A <code>Dataset:</code> page uses four parser functions: | A <code>Dataset:</code> page uses four parser functions: | ||
* <code>{{#dataset-table: | * <code><nowiki>{{#dataset-table:<table_id>|panel=<key>}}</nowiki></code> — the table, with linked footnote superscripts. | ||
* <code>{{#dataset-footnotes: | * <code><nowiki>{{#dataset-footnotes:<table_id>}}</nowiki></code> — the notes list with a backlink to the table. | ||
* <code>{{#dataset-provenance: | * <code><nowiki>{{#dataset-provenance:<table_id>}}</nowiki></code> — source PDF, page, extraction method, confidence and review status. | ||
* <code>{{#dataset-cite: | * <code><nowiki>{{#dataset-cite:<dataset_id>}}</nowiki></code> — a compact citation block. | ||
To query the store programmatically, use <code>action=datasetquery</code> (JSON) or <code>format=csv</code>; the MCP <code>embeddable-dataset-query</code> tool wraps it. The data is also reachable from the dataset page, so ordinary readers do not need the API. | To query the store programmatically, use <code>action=datasetquery</code> (JSON) or <code>format=csv</code>; the MCP <code>embeddable-dataset-query</code> tool wraps it. The data is also reachable from the dataset page, so ordinary readers do not need the API. | ||
Latest revision as of 20:51, 22 November 2026
Deployed 2026-11-22 (PR #211). The curated-dataset store, APIs, parser functions and
Dataset:namespace are live on production.
A curated dataset is a hand-picked scientific table (for example a meta-analysis table cited by an article) stored as structured, queryable data instead of a plain-text table. Each dataset has a manifest, a readable Dataset: page, and a set of measurements that can be queried and exported.
What lives where
Dataset:<slug>— the readable page: infobox, one section per table, provenance, footnotes and a citation block.Dataset:<slug>/manifest— the canonical manifest (JSON). It is the source of truth; the database rows and the Wikibase items are derived from it. Do not edit the generated page or the manifest by hand — update the manifest through the tools and re-apply it.- The measurement store — the
wb_dataset_*tables. They are queried by the page functions and byaction=datasetquery; never edit them directly. - Wikibase — one item for the dataset and one per table, with the source, table number/id, review status and extraction method. The dataset item is sitelinked to
Dataset:<slug>.
Reading a dataset
A Dataset: page uses four parser functions:
{{#dataset-table:<table_id>|panel=<key>}}— the table, with linked footnote superscripts.{{#dataset-footnotes:<table_id>}}— the notes list with a backlink to the table.{{#dataset-provenance:<table_id>}}— source PDF, page, extraction method, confidence and review status.{{#dataset-cite:<dataset_id>}}— a compact citation block.
To query the store programmatically, use action=datasetquery (JSON) or format=csv; the MCP embeddable-dataset-query tool wraps it. The data is also reachable from the dataset page, so ordinary readers do not need the API.
Adding a dataset
The recommended flow is:
- Pick the source (the paper and the table). Prefer an open text layer; the PDF is the fallback.
- Run
pdf-figures-mcp extract_pdf_tableon the table. It returns the manifest envelope: the manifest, a validation report and amanifest_path. - Fill the dataset-level fields the extractor cannot know (source page, source item, DOI, year, licence, rights basis, curator) and review the cells, footnotes and column labels.
- Hand the envelope (or its path) to
embeddable-dataset-upsertwithmode="validate". Fix every error and review the warnings. - Apply with
mode="apply". The wiki saves the manifest, queues the apply job, writes the database rows and Wikibase items, renders the page and returns arun_id. Pollembeddable-dataset-statusuntil the run isok/partial/failed. - Review the dataset page: table, footnotes, provenance and citation. Set the table's review status to
checkedorverifiedafter human review.
The manifest contract is the same one the wiki, the MCP client and the extractor use. The wiki is the authoritative validator; a validation report from the extractor is advisory.
Manifest rules to remember
value_textalways holds the verbatim cell string; a numeric/date cell also carries exactly one typed value (value_float,value_intorvalue_date).- Cells are long-format observations: one row per (row, column) cell. Each cell can carry
footnote_keys. - Footnotes are first-class: every marker needs a note, every note must be referenced or have
scope=table. A missing marker/note is a validation error or warning. - The source PDF is identified by its exact SHA1 (and, when supplied, its revision). The file's internal-use marker is provenance only: extracted data is not copyright-protected, so a public dataset may cite an internal-use PDF. Do not reject a public dataset because its source PDF is internal.
access_tieris the dataset's audience tier, independent of the PDF gate.publicis readable by anyone;registeredneeds a logged-in session;internalis deny-by-default until the group mechanism is enabled.
Access tiers
The v1 store accepts public and registered data; internal is stored but not readable by anyone until an operator adds the allowed groups to $wgEmbeddableContentDatasetInternalGroups (server configuration). Ask an administrator before storing internal data. The source PDF remains behind the existing internal-use file gate; the dataset tier is declared in the manifest, not inferred from the file.
Review status
Each table carries a review status:
unreviewed— extracted but not checked.checked— a human compared the extracted cells with the source.verified— independently verified by a domain expert.
The status is shown in the provenance line and is queryable. A dataset can be published while a table remains unreviewed; the status makes that visible.
See also
- Help:Contributing/citations — citing the source work
- Help:Contributing/semanticDynamicContent — reading item statements in page text
- Help:Contributing/claims — the vocabulary and statement rules
- Help:Contributing/links — links and internal references