Skip to content

Instantly share code, notes, and snippets.

@yeiichi
Created January 7, 2026 00:58
Show Gist options
  • Select an option

  • Save yeiichi/d2487251e4c7fa5a583299ce17d64c9c to your computer and use it in GitHub Desktop.

Select an option

Save yeiichi/d2487251e4c7fa5a583299ce17d64c9c to your computer and use it in GitHub Desktop.
Semantic contract for long-format datasets (Type A)
Column Type Meaning Rules
entity string Thing being measured Stable label, not human prose
variable string What is measured Atomic, no units
value numeric Measured value Float/decimal only
unit string Measurement unit %, g/100g, mg/L, etc.
basis string Unit basis w/w, w/v, dry, as_is
method string Measurement method Optional
source string Source name File/site/report
source_id string Stable source key URL, DOI, hash
observed_at string/date When observed ISO-8601
quality_flag string Data quality ok, estimated, imputed
note string Free text Last resort only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment