Skip to content

Guides & reference

The FlowScript language

Complete FlowScript reference: syntax, values, units, uncertainty, expressions, checks, view lines, all 125 block kinds and every message.
Sculptural study of connected forms and structured ideas

FlowScript is the language you write in the Lab. A FlowScript document is a list of typed blocks (a study, a cohort, an estimate, a survival curve, a task) whose attributes hold numbers with units and intervals, text, references to other blocks and derived values. One or more view lines then say which figures to draw from it. Because every block has a known kind, the Lab can check the document as you type: that each count is a whole number that can exist, that a flow balances at every step, that a stated rate or p-value matches the counts beside it, that a unit is real and of the right kind, that an interval contains its own estimate, that every reference points at something, and that your own stated rules hold. This page is the complete reference: the syntax, every kind of value, units, uncertainty, the expression language, the check block, view lines, all 125 block kinds with every attribute, and every error and warning the Lab can show you, with what to do about each.

At a glance

TopicSummary
A blockkind id { attribute: value attribute: value }. Blocks can nest
A viewview name: renderer(argument) on a line of its own, for example view flow: consort(trial)
Comments// to the end of the line and /* across lines */
TextDouble quotes, on one line: "Drug X 50 mg daily"
Numbers42, -3.5, .5, 1e9, 12%
UnitsStraight after a number: 5 mg/kg/day, 14 months, 3.2 per 100000, 120 participants
Uncertainty0.68 [0.51, 0.90], 0.68 (0.51 to 0.90), 12.4 ± 0.8, 0.42 se 0.11, optionally followed by @ 90%
ReferencesA block id (from: screened) or a dotted path to one of its numbers (randomised.n)
Derived valuesAn attribute value that starts with =, such as n: = randomised.n - 40
Sourcesn: 1502 source "Screening log" or source { dataset: "trial.csv", column: "age", rows: 240 }
Your own rulescheck name { that: = …, else: "…", severity: warn }
Vocabulary125 block kinds in 22 fields, plus any kind you invent
SeverityErrors are things that are wrong and must be fixed. Warnings are probably wrong. Notes are worth knowing. The Lab still draws whatever it can read; only text it cannot read at all (an unclosed quote or comment, a stray character) leaves the canvas empty

A first document

// A two-arm trial. Edit any n and the Lab checks the flow again.
study trial {
  design: "Randomised, parallel-group"
  registry: "NCT00000000"
}

cohort screened { n: 1502 source "Screening log, May 2024" }

cohort randomised {
  n: 1200
  from: screened
  excluded: { ineligible: 238, declined: 64 }
}

arm placebo { n: 600, from: randomised, intervention: "Placebo" }
arm drug_x  { n: 600, from: randomised, intervention: "Drug X 50 mg daily" }

outcome death_30d {
  metric: "30-day all-cause mortality"
  control:   { events: 72, n: 600, rate: = events / n * 100 }
  treatment: { events: 48, n: 600, rate: 8.0% }
  test: "chi-squared"
  p: 0.021
}

check arms_balance {
  that: = sum(kind:arm, "n") == randomised.n
  else: "The arms hold {sum(kind:arm, \"n\")} people, not {randomised.n}."
}

view flow: consort(trial)

This document compiles with no issues. Change excluded: { ineligible: 238, declined: 64 } to { ineligible: 238 } and the Lab reports:

Arithmetic inconsistency: screened.n (1502) − sum(excluded) (238) = 1264, but randomised.n is 1200.

Change p: 0.021 to p: 0.9 and it warns that the p-value is not what a chi-squared test gives for 72/600 against 48/600 ("that is 0.021 or 0.027", with and without the continuity correction).


How a document is built

Blocks

A block is a kind, an optional id, and a body in braces:

cohort screened { n: 1502 }

cohort eligible {
  n: 1240
  from: screened
  excluded: { ineligible: 198, declined: 64 }
}
PartRules
KindThe first word: cohort. Any identifier. The 125 registered kinds are checked against their schema; any other word is accepted as your own kind and carried as plain data
IdThe second word: eligible. Optional in the grammar. Most registered kinds expect one, and a block without one is warned about: "Block "cohort" should have an identifier (e.g. cohort my_id { … })." Ids must be unique in the document
Body{ … } holding attributes and nested blocks, in any order

Identifiers

An identifier starts with a letter or _, then letters, digits, _ and -. Kinds, ids, attribute names and bare words are all identifiers.

Tip: Use only letters, digits and _ in block ids. A hyphen is legal in an id, but an expression reads arm-a.n as "arm minus a.n", and renaming with F2 refuses ids with hyphens.

Attributes

An attribute is a name, a colon and a value: n: 1240. Attributes are separated by new lines; commas between them are optional, so { n: 600, from: randomised } and the same on two lines are identical. Each kind declares the attributes it understands. An attribute it does not know is kept as data and warned about: "Attribute "x" is not part of the study schema — it will be carried through as freeform data." A required attribute that is missing is an error: "outcome is missing required attribute metric."

Nesting

Blocks may contain blocks:

survival os {
  time_unit: "months"
  group drug  { label: "Drug X",  times: [3, 8, 12, 20], events: [1, 0, 1, 0] }
  group usual { label: "Usual care", times: [2, 5, 9, 14], events: [1, 1, 0, 1] }
}

Nesting never makes a document invalid. Some kinds list their typical children (a study holds cohort, arm, outcome, view and note); putting something else inside one gives a warning such as "task is not a typical child of study (allowed: cohort, arm, outcome, view, note)." For several figures, nesting carries meaning (a group inside a survival is a curve; inside a table_one it is a column), so check Lab views and renderers for the shape each figure expects.

Comments

// A line comment runs to the end of the line.
/* A block comment
   can span lines. */
cohort a { n: 10 } // a comment may follow code

An unclosed /* is an error ("Unterminated /* … */ block comment") that stops the whole document being read.

Your own kinds

The vocabulary is open. factor laser_power { level: 3 } is a valid block even though factor is not a registered kind: it is not checked against any schema, its numbers can still be referenced and used in expressions, and nothing warns about its attributes. Registered kinds are the ones the Lab's figures, checks and reporting standards understand.

The only alias is captable, which is read as cap_table.


Values

ValueExamplesNotes
Text"Placebo", "Day 0 is the first dose"Double quotes only. Escapes: \", \\, \n, \t. A string must end on the line it starts on; a missing closing quote is "Unterminated string literal" and stops the whole document being read
Number42, 12.5, -3.14, +7, .5, 1e9, 2.5e-31e9 is a thousand million. An exponent too large to represent (1e999) is refused as a number, and you get an unrecognised-unit warning instead
Number with unit5 mg/kg/day, 120 participants, 25%See Units
Estimate0.68 [0.51, 0.90], 12.4 ± 0.8See Uncertainty
Derived value= randomised.n - 40See Expressions
true, false, nullblinded: trueBooleans and the empty value
Wordmeasure: hr, judgement: some_concernsA bare identifier. In an attribute the schema declares as a reference it must name a block; otherwise it is a word from a list or free data
Dotted referenceresults.hr, randomised.nAlways checked: the block must exist and must have the named attribute
List[3, 8, 12], ["Age", "Sex"], [task_a, task_b]Comma-separated, in square brackets
Object{ events: 72, n: 600 }Named entries in braces. Numbers one level inside an object can be referenced (death_30d.control.events)

What each attribute type accepts

The block reference gives each attribute a type:

TypeWriteChecked
Text"…"No
Number12, 0.95Range and whole-number rules where listed
Percent92% or 0.92Both spellings are accepted and never converted into each other. A unit that is not a percentage or ratio (3.2 kg) is an error
QuantityA number with a unit: 14 months, 88 mmWhere a dimension is listed, the unit must be of that kind (a duration, a proportion). A bare number is accepted
Estimate0.68 [0.51, 0.90] or a plain numberSee Uncertainty
Expression= …Must produce a number
Block idfrom: screenedMust name a block in the document
List of block idsdepends: [design, build]Each must name a block
List of numbers, List of labels[1, 2, 3], ["a", "b"]Not treated as references
Wordmeasure: hrWhere a list of allowed words is given, the word must be one of them
true/falseblinded: trueNo
Object{ … }Its entries are not checked against a schema

Allowed words are matched without regard to case or punctuation, so very_low, very-low and Very Low all match very_low, and judgement: low and judgement: "low" are the same.


References

A reference points from one block to another.

FormExampleWhat is checked
A block id in an attribute the schema declares as a referencefrom: screened, model: gpt_small, depends: [design, build]The block must exist: "Reference screened does not resolve — no block declared with id "screened"."
A dotted path anywhereabout: randomised.nThe block must exist, and so must the path inside it: "Reference c.bogus does not resolve — block "c" has nothing named bogus."
A path inside an expression= randomised.n - 40See Expressions
A view argumentview flow: consort(trial)A warning when no block has that id (see View lines)

A bare word in an attribute that is not declared as a reference (mode: web, arm: treatment) is never treated as a reference, so it is never reported as missing.

Duplicate ids are an error: "Duplicate id "s" — every block id must be unique." The first block keeps the id; references resolve to it.

Working with references in the editor

  • F12 on an id jumps to its declaration; ⇧F12 lists every use.
  • F2 renames an id in every place it is used: its declaration, references, derived values, selectors and view arguments, but not inside strings or comments. The rename refuses an id that is already taken, one that is not a valid id, or one that is not declared, with the reason.
  • Hovering an id shows the block and up to six of its numbers.

Sources

Any attribute value may be followed by where it came from. The source is recorded with the number; it shows in the editor's hover, the Provenance pane and the submission bundle.

cohort screened { n: 1502 source "Screening log, exported 2024-05-03" }

dataset trial_data { path: "trial.csv", format: csv, rows: 240 }
distribution age {
  mean: 61.4 source { dataset: "trial.csv", column: "age", rows: 240, aggregation: "mean" }
}
FormRecorded as
source "text"A typed source, in your words
source { dataset: …, column: … }A dataset column. file or path may be written for dataset, field for column; rows is a number; aggregation (or agg) names how the number was computed
source { … } with other entriesA typed source made from the entries, so nothing you wrote is lost

A number with no source is recorded as typed by hand. The Provenance pane lists those so you can decide which need one.


Units

A unit is written straight after a number, on the same line: dose: 5 mg/kg/day. The Lab parses it, knows what kind of quantity it is, converts between compatible units when it compares numbers, and refuses to compare incompatible ones.

Writing a unit

FormExamples
A symbol or wordmg, mL, mmHg, °C, days, participants
Prefixed SI unitsAny SI prefix from yocto to yotta on prefixable units: µg, ug, pmol, GBq, dL, kPa
Division and multiplicationmg/kg/day, mmol/L, kg/m^2, N*m, 5 mg / kg (spaces around an operator are allowed)
Powersm^2, m2, cm3, s^-1, s-1
Rates per a number3.2 per 100000, 3.2 per 100 000, 12 per 1000, 5 mg per kg
Counts120 participants, 14 events, 4 events/py

Three words that can follow a value are never units: source, se and to. A unit is only taken when what follows it can end a value (the end of the line, a comma, a closing bracket, an interval, ±, @, a comment, source or se), which is what keeps { x: 330 y: 230 } reading as two attributes.

Warning: In an attribute value, write per 100000 or per 100 000, not per 100,000: the comma ends the value. Hyphenated unit names such as person-years cannot follow a number in an attribute; write py (or pyrs) for person-years. Write the US fluid ounce as floz, not fl oz.

Supported units

FamilyUnits (aliases in brackets)
Massg (gram, grams), with prefixes such as mg, µg, kg; lb (lbs, pound, pounds); oz (ounce, ounces)
Lengthm (metre, meter), with prefixes such as mm, cm, km; in (inch, inches); ft (foot, feet)
Times (sec, second, seconds) with prefixes such as ms; min (minute, minutes, mins); h (hr, hrs, hour, hours); d (day, days); wk (week, weeks, wks); mo (month, months, mos); y (yr, yrs, year, years)
Amount and concentrationmol (mole, moles) with prefixes; M (molar) with prefixes such as mM, µM; U enzyme units with prefixes; kat (katal)
VolumeL (l, litre, liter) with prefixes such as mL, dL; floz (US fluid ounce)
PressurePa with prefixes; mmHg; torr; atm; bar with prefixes; cmH2O
TemperatureK (kelvin); °C (degC, celsius); °F (degF, fahrenheit)
Energy, power, electricity, radiation, lightJ, W, N, Hz, V, Ω (ohm), A (amp, ampere), cal (so kcal), Gy (gray), Sv (sievert), Bq (becquerel), all with SI prefixes; cd (candela) without
Counting labelsparticipants (participant, person, persons, people, patient, patients, subject, subjects), events, studies (study, trial, trials), cases, deaths, cells, copies, counts, observations (obs), beats, breaths, doses; Eq with mEq; IU
Rates of countsbpm (beats/min)
Person-timepy and pyrs for person-years. person-years, person-months and person-days (and their patient-, participant- and subject- spellings) are understood inside an expression's bracketed unit, such as 4[events/person-years]
Ratios% (percent, pct), ‰ (permille), ppm, ppb, proportion (fraction, prop), p (a p-value), probability (prob, Pr)

Word spellings of three or more letters may differ in case (Days, MOL). Short symbols keep their case: mM is millimolar and Mm megametre.

Some conventions to know: a month is one twelfth of a 365.25-day year, so 3 mo is 13.04 weeks, not 12; mmHg and torr differ in the eighth significant figure; a temperature offset applies only to an absolute temperature, so °C/min is a rate of change; counting labels are dimensionless but are not interchangeable (events/participants is a rate, while events + participants is refused); and Eq and IU cannot be converted to moles or mass, because that needs a substance-specific factor.

Refused symbols

You wroteWhat the Lab says
C"C is ambiguous — write °C for Celsius or coulomb (not supported) for charge."
F"F is ambiguous — write °F for Fahrenheit."
cc"cc is ambiguous — write mL (1 cc = 1 mL)."
Anything not in the table"Unknown unit furlongs. Units must be built from the known table (mg, mL, mmHg, mmol/L, wk, %, per 100000, …); counting labels like events or participants are declared there too."

These are warnings on the attribute ("Unit x on key is not recognised: … The number is kept; the unit is carried through as text."). The number is kept; the unit is just not checked.

Plausibility checks

Some values are physically impossible and are errors: a negative count of a counting unit, a duration below zero, a temperature below absolute zero, a proportion or probability outside 0 to 1, a p-value outside 0 to 1. Others are merely implausible and are warnings, against these ranges:

UnitPlausible rangeContext given
mmHg20 to 400Human blood pressure
°C−90 to 200Laboratory and environmental temperatures
K0 to 10,000Temperatures outside astrophysics
kg/m^28 to 100Body-mass index
beats/min10 to 350Heart rate
breaths/min2 to 90Respiratory rate
g/dL0 to 30Haemoglobin, albumin
mmol/L0 to 1,000Clinical chemistry
cells/µL0 to 10,000,000Cell counts
copies/mL0 to 10^12Viral load
U/L0 to 100,000Serum enzymes
Gy0 to 1,000Absorbed radiation dose
y0 to 150Human age or follow-up

A negative value of a quantity that cannot be negative (a pressure, a mass) is also a warning: "-4.2 mmHg is negative, and pressure is not. If this is a change or a difference, name it as one."

A percentage gets three extra checks, but only in attributes declared as percent or estimate: above 100 ("150% exceeds 100. A percentage of a whole cannot; a relative change can — label it as a change if that is what this is."), below zero, and a note when a tiny percentage looks like a proportion ("0.1% is 0.001 of the whole — one part in 1000. If this is a proportion, write 10% or change the unit to proportion."). A % on any other attribute is never questioned.

Tip: For a difference measure such as a mean difference in blood pressure, put the unit in the block's unit: attribute (estimate e { measure: md, value: -4.2 [-7.3, -1.1], unit: "mmHg" }) rather than on the number, so the blood-pressure plausibility range does not apply to a change.

Comparing numbers in different units

Wherever the Lab adds or compares numbers (a cohort flow, an arm sum, an expression), it uses one rule:

  1. If no number carries a unit, the numbers are compared as written.
  2. If every unit present is %, they are also compared as written.
  3. Otherwise every number must be the same kind of quantity, or the comparison is refused with a unit error and no arithmetic claim is made.
  4. Compatible numbers are converted to the first one's unit, so 1500 participants minus 300 participants is 1200, and 128 per 1000 reconciles with 12.8%.
  5. A plain number beside a counting label is read as that count. A plain number beside a ratio unit is refused rather than guessed, because 0.12 beside % could mean 0.12% or 12%: "Ambiguous scale: … Give … a unit".

Uncertainty

An estimate can carry its uncertainty in the same value. The Lab fills in the missing half (the standard error from an interval, or the interval from a standard error), on the right scale, and checks what cannot be true.

The notations

NotationExampleMeaning
Interval in brackets0.68 [0.51, 0.90]Point estimate and interval
Interval in prose0.68 (0.51 to 0.90)The same. Either bracket style takes either , or to
Plus or minus12.4 ± 0.8 or 12.4 +/- 0.8A symmetric half-width on the scale you wrote it
Standard error0.42 se 0.11Point and standard error
Coverage… @ 90%, … @ 0.9 or … @ 90Interval coverage. The default is 95%. A bare number above 1 is read as a percentage

A unit may follow the point estimate: 4.2 mmHg [1.1, 7.3]. Units on the bounds are accepted and ignored. The whole notation must be on one line.

Ratio measures and the log scale

When a block says its measure is a ratio (rr, or, hr, irr, rrr, ratio, gmr, sir or smr) or says scale: log, its intervals are treated on the log scale: the standard error is the standard error of the log ratio, the interval is asymmetric, and every bound must be above zero. A ratio of 0 or below is an error: "a ratio measure cannot be 0 — a risk, odds or hazard ratio is strictly positive. Set scale: identity if this is a difference."

Two ways to write an estimate

The estimate kinds (estimate, effect, contrast, meta, subgroup) accept either one value or separate parts:

estimate hr_os { measure: hr, value: 0.68 [0.51, 0.90] }
estimate hr_pfs { measure: hr, point: 0.71, lo: 0.58, hi: 0.87, p: 0.001 }

Both are checked the same way. Two differences matter:

  • An estimate written with separate point, lo, hi or se is also checked against its own p:. If the interval excludes no effect but the p-value says not significant (or the reverse), you get "the interval and the p-value disagree … One of the two was copied from a different analysis." A small band around α is allowed for rounding.
  • Expressions see the interval of an inline value: but not of separate parts. Using sep.point in an expression gives a note that the result "was computed without the uncertainty of sep.point", with the advice to write the estimate inline.

Writing both an inline value: and separate parts that complete an estimate (a point with lo/hi or se), and having the two points disagree, is a warning: "twice states its estimate twice and the two disagree: value says … and point says …. Keep one of them".

Use level: 0.95 (a fraction) on the block when you need a coverage level with separate parts; level: 95 is an error because the attribute takes a fraction from 0 to 1.

What is checked in an estimate

ProblemMessage
Lower bound above upper"Interval is inverted: lower 2 is above upper 0."
Point outside its interval"Point estimate 0.9 lies below its own lower limit 1.1." (or above its upper limit)
Negative standard error"Standard error must be finite and ≥ 0 (got …)."
Coverage not between 0 and 1"a coverage level must lie strictly between 0 and 1 — write @ 95% or @ 0.95"
A ratio bound at or below zero"A log-scale (ratio) quantity cannot have lower limit 0 — ratios are strictly positive."
Degrees of freedom not above zero"Degrees of freedom must be > 0 (got …)."
[ or ( after a number, followed by a number, that is not a valid interval (such as 1 [2])"An interval after a number must be written [lo, hi] or (lo to hi)." The "Unexpected token" errors for the stray characters follow it
± with nothing after it"± must be followed by the uncertainty, e.g. 12.4 ± 0.8."
@ without an uncertainty before it"@ sets the coverage of an uncertainty and must follow one, e.g. 0.68 [0.51, 0.90] @ 90%."

When df is given on the block, intervals use the t distribution rather than the normal.


Expressions (derived values)

Any attribute value that starts with = is an expression, computed from the rest of the document every time it changes:

cohort randomised { n: 1200 }
cohort analysed {
  n: = randomised.n - excluded.withdrew
  from: randomised
  excluded: { withdrew: 40 }
}

outcome death_30d {
  metric: "30-day mortality"
  control: { events: 72, n: 600, rate: = events / n * 100 }
}

funnel_step trials { n: 2400, title: "Started a trial" }
funnel_step paid   { n: 312, from: trials, title: "Paid" }
kpi conversion { title: "Trial to paid", baseline: = pct(paid.n, trials.n) }

A derived number cannot go stale: when a count is corrected, everything computed from it follows.

Where an expression can go

  • Any attribute of any block, and any entry one level inside an object (control: { rate: = … }).
  • The expression runs to the end of the line, a comment, a comma outside brackets, or a closing brace, so { a: = x + 1, b: 2 } works on one line. Without the comma, everything up to the end of the line would be read as part of the expression.
  • An expression must produce a number, except in check's that:, which must produce true or false. A true/false attribute anywhere else cannot be derived: "risk_table holds a truth value, but nothing reads the answer to a condition written there … Write the answer out, or state the condition as check … { that: = … }".
  • Expressions are evaluated in dependency order, so they may refer to each other in any order. A loop is an error: "Circular definition: b.n → c.n → b.n. One of these has to be written out as a number."

Names

NameResolves to
events (inside an object such as control: { … })The entry of that same object first, so rate: = events / n uses the control group's numbers
n (a single name)An attribute of the block the expression is in
screened.n, death_30d.control.eventsAn attribute of the named block, anywhere in the document
true, false, nullLiterals
"control" or 'control'Text, for comparisons such as if(arm == "control", 1, 2)

A path that names nothing is an error: "nope.n does not resolve to a value — check the block id and attribute name."

Operators

From loosest to tightest binding:

OperatorsMeaningNotes
c ? a : bIf c then a, else bRight to left
orEither is trueBoth sides must be true or false
andBoth are true
notNegation! is not accepted: "Use not for negation, and != for inequality."
==, !=Equal, not equalCompare numbers (in compatible units), text or truth values. = is not accepted: "Use == to compare, not =."
<, <=, >, >=OrderNumbers only. Comparisons do not chain: a < b < c is "Comparisons do not chain — write a < b and b < c instead."
+, -Add, subtractUnits are converted when compatible (5 mg + 1 g is 1005 mg); different quantities are refused
*, /, %Multiply, divide, remainder% is always the remainder in an expression (12 % 5 is 2)
Unary -, +SignBinds looser than ^, so -2^2 is −4
^PowerRight to left, so 2^3^2 is 512. An exponent cannot carry a unit
( … )Grouping

There is no truthiness: a number where true or false is needed is an error ("The condition of if must be true or false, got a number — this language has no truthiness, write the comparison out."). Juxtaposition is never multiplication: 2 randomised.n is an error ("Unexpected randomised after the end of the expression."), not "twice randomised"; write 2 * randomised.n.

Numbers and units inside expressions

WriteMeaning
5 mgA number with a one-word unit
5[mg/kg/day]A number with any unit, in square brackets. Needed for compound units
12[%] or 12 percentA percentage. 12% would be read as "12 remainder …"
1e9, 2.5e-3Exponent form

Arithmetic in expressions is exact for ordinary decimals: 0.1 + 0.2 is exactly 0.3, not 0.30000000000000004.

Built-in functions

FunctionArgumentsReturns
sum(…)Any number of values, or a selectorThe total. The empty sum is 0
mean(…)At least one value, or a selectorArithmetic mean
median(…)At least one value, or a selectorMiddle value; the mean of the two central values when the count is even
min(…), max(…)At least one value, or a selectorSmallest, largest
count(…)Any number of values, or a selector (no field needed)How many values are present
sd(…)At least two values, or a selectorSample standard deviation (n − 1)
se(…)At least two values, or a selectorStandard error of the mean, sd/√n
abs(x)1Magnitude
round(x), round(x, d)1 or 2Rounds half away from zero, optionally to d decimals (round(2.675, 2) is 2.68). d must be a whole number
floor(x), ceil(x)1Round down, round up
sqrt(x)1Square root; a negative number has no real value
ln(x), log10(x)1Natural and base-10 logarithms; x must be above 0, and should be dimensionless
exp(x)1e to the power of x
pow(b, e)2Same as b ^ e
clamp(x, lo, hi)3x limited to between lo and hi
if(cond, a, b)3a when cond is true, else b. Only the branch taken is evaluated
coalesce(a, b, …)At least 1The first argument that resolves to a value
pct(part, whole)2part / whole × 100, in %
ratio(a, b)2a / b
rate_per(events, population, per)3events / population × per, such as a rate per 100,000

The wrong number of arguments is an error ("round takes 1–2 arguments, got 3."), as is a name that is not a function ("foo is not a built-in function. Available: sum, mean, …").

Aggregates over blocks

sum, mean, median, min, max, count, sd and se can run over a set of blocks instead of a list of values. Write a selector, a comma, and the attribute name in quotes:

cohort randomised { n: 1200 }
arm placebo { n: 600, from: randomised }
arm drug_x  { n: 600, from: randomised }

check arms { that: = sum(kind:arm, "n") == randomised.n }
kpi large_arms { title: "Arms over 500", baseline: = count(where(kind:arm, n > 500)) }
SelectorPicks
kind:arm (or kind:"arm")Every block of that kind, anywhere in the document
children(trial)The blocks directly inside trial
descendants(trial)Every block inside trial, at any depth
ids(placebo, drug_x)Exactly the named blocks
where(selector, test)The blocks of selector that pass test

A where test compares a field with a literal (n > 500, label == "control", "role" == "primary"), and tests can be combined with and, or, not and parentheses. The field may be kind, id, or any attribute (dotted for an object entry, such as control.events). The right-hand side must be a literal number, text, true, false or null.

Blocks that lack the field are skipped. A sum over a selector that matches nothing is 0 with a warning ("Nothing matched over kind:sharehodler with a shares, so this total is 0. Check the selector."); every other aggregate over nothing is an error ("mean needs at least one value; nothing matched over kind:widget."). The field must be quoted ("The field of an aggregate must be a quoted name, e.g. sum(kind:arm, "n").") and every aggregate except count needs one. Values in different units are converted when they are the same kind of quantity; values that cannot be reconciled are left out of the total with a warning saying so.

Uncertainty through expressions

An expression that uses an inline estimate (value: 0.68 [0.51, 0.90]) carries its uncertainty through +, -, *, /, ^, ln, exp, sum and mean. For example, md1.value + md2.value with intervals [1.1, 7.3] and [0.5, 3.5] gives 6.2 with its own interval. A plain number you write (the 2 in x * 2) counts as exact.

Other operations keep the point estimate and drop the interval, with a note saying so ("median has no uncertainty algebra, so the result is a point estimate and the interval stops here."). Estimates on different scales cannot be combined: adding a ratio to a difference, or computing 1 - hr.value, is refused ("Cannot subtract these two estimates — one is a ratio measure (0.68) and the other is the plain number 1 … state it as an estimate of its own."). Aggregates over a selector use the numbers alone and carry no interval.

Limits

LimitValue
Nesting depth64 levels ("Expression nests more than 64 levels deep.")
Length20,000 characters ("Expression is … characters; the limit is 20000.")
SizeAbout 2,000 grammar steps; a very long chain such as 1+1+1+… stops with "Expression is too large to analyse." Use an aggregate instead

Checks

A check block states a rule about your document. The Lab runs it after everything else is computed and reports a violation on the status badge like any other issue.

cap_table acme { title: "Acme Ltd", currency: "GBP" }
shareholder founders { name: "Founders", shares: 7000000 }
shareholder seed     { name: "Seed investors", shares: 2000000 }
option_pool pool     { shares: 1000000 }

check fully_diluted {
  title: "Fully diluted share count"
  that: = sum(kind:shareholder, "shares") + pool.shares == 10000000
  else: "Shares and pool total {sum(kind:shareholder, \"shares\") + pool.shares}, not 10,000,000."
  severity: error
  about: acme
}
AttributeMeaning
thatThe condition, as an expression that produces true or false. Inserted checks start from a real condition such as = sum(kind:arm, "n") == 100
elseThe message to show when it fails. { … } holes are evaluated against the document (write the expression without =). {{ and }} print literal braces
severityerror (the default) or warn. It grades a violation the check decided
aboutA block the rule is about, offered as a second place to look
titleA readable name

This document passes. Change the seed shareholder to shares: 1500000 and the badge shows the error "Check fully_diluted: Shares and pool total 9500000, not 10,000,000." Without else, the Lab prints the condition and the numbers it compared, for example "Check fully_diluted: sum(kind:shareholder, "shares") + pool.shares == 10000000 is false — …".

What makes a check fail to run, always reported as an error whatever its severity:

ProblemMessage
No that"Check x states no that: — it asserts nothing, so it can never fail and its silence says nothing about the document. Write the condition, e.g. that: = count(kind:arm) > 0."
that is a constant"Check x: that is true, which is a constant rather than a condition — it cannot tell you anything about the document. Write it as an expression: that: = …."
that produces a number or nothing"x.that could not be run: = … produced the number 900 rather than a true/false answer. A condition that cannot be decided has NOT held."
A severity that is not error or warnReported, and the violation is shown as an error anyway
A hole in else that cannot be computedThe hole prints as ?, with a warning naming it

A selector that matches nothing makes a sum 0 and warns, which is usually why a check you believe in comes back false.


The arithmetic the Lab checks

Some rules are built in for specific kinds. They are errors when a number cannot exist and warnings when two numbers disagree.

RuleApplies toSeverityMessage (example)
Flow balancesA cohort with n and from:: the parent's n minus the sum of its excluded entries must equal its own nError"Arithmetic inconsistency: screened.n (1502) − sum(excluded) (238) = 1264, but randomised.n is 1200." Without excluded: "… does not match … — add an excluded object to account for the difference of 302."
Arms add upAll arm blocks with the same from: must sum to that cohort's nError"Arm allocation does not match parent cohort: randomised.n = 1200, but the arms drawn from it sum to 1150 (placebo=600 + drug_x=550)."
Counts can existn on a cohort or arm, and each excluded entryError"x.n is -5 — a count of participants cannot be negative." "y.n is 100.5 — a count of participants must be a whole number." "… an exclusion removes people from a box, so it cannot be negative."
Outcome counts can existcontrol and treatment in an outcomeError"Outcome o.control: 72 events among 50 participants is more events than people. No rate, effect or p-value can be computed from counts that cannot exist."
Fractional outcome countsThe sameWarning"… which is not a whole number of people. If these are imputed or weighted counts, say so in test …"
Outcome bigger than its armAn outcome group matched to an arm by name (or by arm: in the object)Warning"… analyses 80 participants, but arm control has n = 50 … If the outcome is counted per eye, lesion or episode, say so in metric."
Rate matches countsA rate in control or treatment with events and nWarning"Outcome o.treatment: declared rate 9% doesn't match 48/600 = 8.00%." Rates written per 100, per 1000 or percent are understood
p matches the testtest: "chi-squared" or "Fisher exact" (and their usual spellings) with whole countsWarning"p: 0.9 is not what chi-squared gives for 72/600 against 48/600 — that is 0.021 or 0.027." Both the plain and continuity-corrected chi-squared values, and Fisher's, are accepted at the precision you printed
Effects match countsrr, or, rd, nnt on an outcome with countsWarning"rr: 2.5 [2, 3.1] is not what its own counts give — 48/600 against 72/600 is RR 0.667 (95% CI 0.471 to 0.943). An adjusted estimate may differ from the crude one, but not to the point of excluding it …"
Data columns existA column with of: a dataset, or any block with dataset: and a column: or …_column: text, when rows are bound on the Data benchError"age binds to column "agee", which is not in dataset "trial" — did you mean "age"? The figure would draw a blank."
Data size matchesrows: and columns: on a dataset, when rows are boundWarning"trial_data declares 240 rows but the supplied data has 236 — the figure and the data have drifted apart."

The arm and outcome effect checks compare intervals, not points, so an adjusted estimate that differs from the crude one is only reported when it excludes it. Tests other than chi-squared and Fisher (a t-test, a log-rank test, a mixed model) are not recomputed.

The Reporting standards checks add many more rules (the ICER follows from costs and effects, a 2×2 table adds up, and so on) when you score a document against a checklist.


View lines

A view is one figure drawn from the document.

The one-line form

view flow: consort(trial)
view survival: km(os)
view timeline: gantt
view rob: rob_traffic_light(rob2)

view, then the view's name, a colon, a renderer, and optionally arguments in parentheses separated by commas. Arguments may be ids, quoted strings or numbers. Most renderers take the id of the block to draw; the risk-of-bias figures take an instrument name instead. A view line can sit at the top level or inside a block (inside a block it must have a name).

The block form

view figure_1 {
  renderer: "forest"
  args: ["pooled"]
  title: "Figure 1"
  caption: "Risk of the primary outcome, random-effects meta-analysis."
  alt: "Forest plot of eleven trials; pooled risk ratio 0.78."
  width: 183 mm
  publish: { journal: "nature", column: double }
}

The block form takes the same renderer and arguments plus presentation and publishing settings (title, caption, alt, width, height, theme, palette, publish, type_pt, line_pt, guideline). Write renderer: and each argument as quoted strings: a bare word in renderer: is not read, and the view then falls back to the CONSORT renderer. A block-form view without renderer: is an error ("view is missing required attribute renderer.").

What is checked in a view line

ProblemSeverityMessage
Unknown rendererError"View v names renderer kaplan, which no renderer answers to — it would render as a placeholder reading "No view renderer named kaplan" rather than fail." with a suggestion within two letters, or the first renderer names
Argument names no blockWarning"View v passes zzz to consort, but no block with that id is declared — the view would draw an empty figure rather than say so." (numbers and risk-of-bias instrument names are not checked)
No nameWarning"This view has no name, so it is listed as untitled and nothing can address it — not the remembered tab, not a share link, not a panel child. Give it an id: view consort : …."

Two views with the same name are a duplicate-id error ("Duplicate id "a" — every block id must be unique."); until you rename one, the second is listed as a-2 (then a-3 and so on). Several unnamed views are listed as untitled, untitled-2 and so on.

Renderers

The Lab has 36 renderers, most with aliases; there are 101 accepted names in all. Each renderer, the blocks it is built from, its argument and its messages are documented on Lab views and renderers.

FieldRenderers
Trial and review flowconsort, prisma
Clinical and protocolkm (kaplan_meier, survival), table_one (baseline, characteristics), clinical_timeline (timeline, case_timeline), spirit_schedule (spirit, schedule_of_assessments, soa)
Diagnostics and predictionroc (auc, pr_curve), calibration (calibration_plot, reliability_diagram), decision_curve (dca, net_benefit)
Evidence synthesisforest (forest_plot), funnel_plot (small_study, publication_bias), rob_traffic_light (rob, robvis, risk_of_bias), rob_summary_bar (rob_summary), grade_sof (sof, summary_of_findings), appraisal_table (amstar, appraisal, checklist_table), intervention_table (tidier, tidier_table, intervention_description)
Statistics and quality improvementraincloud (distribution, violin), control_chart (spc, run_chart, shewhart)
Qualitative and surveytheme_map (themes, qualitative_themes, coreq), item_map (instrument_map, survey_map)
Health economicsce_plane (icer, cost_effectiveness)
Composition and illustrationpanel (multi_panel, figure_panel), figure (schematic), scene (scene3d, isometric)
Machine learning and laboratoryablation_table (ablation), experiment_flow (experiment)
Business, engineering and othergantt (roadmap), c4_container (c4, container), funnel, okr_grid (okr), captable (cap_table, captable_waterfall), risk_matrix (stride, threat_matrix), fmea_table (fmea, rpn_table), supply_map (supply_chain, supply_network), rubric_grid (rubric, criteria_grid), clause_map (agreement_map, contract_map)

Note the two near-collisions: funnel is the business conversion funnel (the meta-analysis funnel plot is funnel_plot), and timeline is an alias of the clinical case timeline (the project timeline is gantt).

A note whose text contains "Illustrative values" or "(illustrative)" is drawn in a band below every view.


Block kinds reference

Each kind below lists its attributes with their type, the rules the Lab enforces, and what they mean. "Takes an id" means a block without one is warned about. "Typical children" are the kinds that nest inside it without a warning. "Read by" names the views that draw it. A rule breach is an error unless noted; the messages are listed under Messages reference.

Shared word lists

Several attributes take a word from one of these lists. Case and punctuation are ignored when matching.

ListWords
Effect measuresrr, or, hr, irr, rrr, ratio, gmr, sir, smr (ratio measures, drawn on a log scale), rd, ard, arr, nnt, nnh, md, smd, mean, median, proportion, rate, count, auc, beta, slope, correlation, r2, kappa, icc, custom
Risk-of-bias judgementslow, some_concerns, moderate, high, serious, critical, probably_low, probably_high, unclear, no_information
Appraisal toolsrob2, robins_i, robins_e, quadas2, quips, prob_ast, newcastle_ottawa, robis, amstar2, care, custom
Reporting standardsconsort, prisma, arrive, cheers, strobe, spirit, stard, tripod, srqr, coreq, moose, remark, agree, care, squire, tidier, prisma_abstracts, consort_harms, tripod_ai, claim, equator, custom
Validation typesapparent, internal, bootstrap, cross_validation, split_sample, external, temporal
Scale typeslinear, log, symlog, pow, sqrt, time, band, point, bin, quantile, threshold
Built-in palettesokabe-ito, tol-bright, tol-muted, tol-light, tol-vibrant, tol-high-contrast, tol-medium-contrast, greyscale-safe, viridis, cividis, magma, inferno, plasma, blues, greens, oranges, purples, greys, rdbu, brbg, piyg, rdylbu, vik-like, jet

Blocks that do not need an id

note, panel, view, caption, legend, alt, licence and the drawing primitives (shape, label_2d, arrow_2d, annotation, box3d, sphere3d, cylinder3d, plane3d, edge3d, label3d). Every other registered kind takes an id.

Required attributes

Only these attributes are required; leaving one out is an error. Kinds not listed have no required attributes, and the reporting standards say in their own words what is missing.

KindRequired
notetext
cohort, arm, funnel_stepn
outcomemetric
milestonedate
task, kpi, threat, control, clausetitle
evalmodel, dataset, metric
label_2dtext, x, y
annotation, label3d, itemtext
shareholdername, shares
option_poolshares
roundname, raise
asset, construct, sc_node, criterion, partyname
interventionname, cost, qalys
instrument, fmea, rubric, agreementtitle
failure_modecomponent, mode
mitigationmode, action
supply_chainproduct
sc_linkfrom, to
levelcriterion, label
obligationparty, action
view (block form)renderer

Core blocks

Four kinds belong to no domain: notes, layout panels, your own rules (check) and views.

note — Annotation. Free-form annotation attached to another block. The id is optional. Drawn below any view when its text marks the values as illustrative.

AttributeTypeRulesMeaning
textTextRequiredThe note itself. A note whose text contains "Illustrative values" or "(illustrative)" is drawn below every view
anchorBlock idThe block the note is about

panel — Layout panel. Composes a named view into a multi-panel figure — grid position, spans, shared axes, panel letter. The id is optional. Read by the panel view.

AttributeTypeRulesMeaning
titleTextTitle of the composed figure (on the container panel)
viewWordThe view this panel draws. A panel with view: is a child; a panel without one is the container
labelTextPanel letter as printed — a, B, (iii)
letterWordPanel letter when written bare: letter: a
label_styleWordPanel-letter house style — lowercase, uppercase, lowercase-bold, uppercase-bold, numeric
label_positionWordWhere the panel letter sits — top-left, top-right, bottom-left, bottom-right, above, outside
rowsNumberGrid rows this panel's children occupy
colsNumberGrid columns
rowNumber1-based grid row this panel occupies
colNumber1-based grid column
row_spanNumberRows this panel spans (default 1)
col_spanNumberColumns this panel spans (default 1)
share_xtrue/falseReuse the neighbouring panel's x scale and hide the duplicate axis
share_ytrue/falseReuse the neighbouring panel's y scale
gutterQuantitySpace between panels — 3 mm, 12 px
gutter_xQuantityHorizontal gutter, when it differs from gutter
gutter_yQuantityVertical gutter
widthQuantityPanel width — plain number, or 88 mm for a journal column
heightQuantityPanel height
alignWordHorizontal alignment inside the grid cell — left, center, right, justify
captionTextPanel-level caption; the figure caption lives on caption
altTextAlt text for this panel alone
publishObjectJournal target for the composed figure, as an object
type_ptObjectType sizes in points, keyed by role: { axis_tick: 6, panel_label: 8 }
line_ptObjectLine weights in points, keyed by role: { axis: 0.4, series: 0.75 }

check — Invariant. A rule you state about this document, the message to show when it is broken, and how loudly to say it. See Checks. Takes an id.

AttributeTypeRulesMeaning
thattrue/falseThe condition that must hold, as an expression such as = sum(kind:shareholder, "pct") == 100. Anything that does not produce true or false is reported as a check that could not be run
elseTextWhat to say when it fails, in your own words. { … } holes are evaluated against the document, so the message can quote the number that broke it
severityWordOne of error, warnHow loudly a violation is reported: error (the default) or warn. A check that could not be run is always an error, whatever this says
aboutBlock idThe block this rule is about, offered as a second place to look
titleTextA readable name for the rule

view — View. One figure drawn from the document. Usually written on one line as view name: renderer(args); see View lines. The id is optional.

AttributeTypeRulesMeaning
rendererTextRequiredThe renderer to draw with. Set for you by the view name: renderer(...) form
argsList of block idsThe renderer's arguments. Set for you by the colon form; write them as quoted strings in the block form
titleTextTitle of the figure
captionTextFigure caption; a caption block can hold a longer one
altTextAlt text — required by most journals and every screen reader
widthQuantityRendered width — plain number, or 183 mm for a journal
heightQuantityRendered height
themeWordlight, dark
paletteWordPalette id, or the id of a palette block
publishObjectJournal target: { journal: "nature", column: double, width_mm: 183, format: "pdf" }
type_ptObjectType sizes in points by role: { axis_tick: 6, panel_label: 8 }
line_ptObjectLine weights in points by role: { axis: 0.4, series: 0.75 }
guidelineWordReporting standard this figure claims — see the guideline block

Clinical trials, protocols and case reports

Trial flows, outcomes, case timelines and protocol schedules. The Lab checks the arithmetic of cohort and arm blocks and the rates, p-values and effects of outcome blocks (see The arithmetic the Lab checks).

study — Study. The study a figure reports: its design, place, period and registration. Takes an id. Typical children: cohort, arm, outcome, view, note. Read by the consort, rob_traffic_light, rob_summary_bar, appraisal_table and intervention_table views.

AttributeTypeRulesMeaning
designTextStudy design, such as a randomised trial or an observational cohort
locationTextWhere the study ran
periodTextWhen the study ran
registryTextTrial registration, such as an NCT identifier
titleTextStudy title
followup_periodTextWhen follow-up ended and why (CONSORT item 14b — why the trial stopped, or the date of last follow-up)

cohort — Cohort. One box of a participant flow: how many people, which box they came from, and why the others left. Takes an id. Read by the consort, prisma and experiment_flow views.

AttributeTypeRulesMeaning
nNumberRequiredNumber of participants
fromBlock idParent cohort this was drawn from
excludedObjectReasons-keyed counts of exclusions
labelTextBox label in the flow diagram
stageTextWhich CONSORT flow stage this box belongs to — enrolment, allocation, received, followup or analysis
analysisTextAnalysis population this cohort represents — intention-to-treat, per-protocol, safety (CONSORT item 16)

arm — Trial arm. One trial arm: how many were allocated to it and what they received. Takes an id. Read by the consort, experiment_flow, intervention_table and spirit_schedule views.

AttributeTypeRulesMeaning
nNumberRequiredParticipants allocated to this arm
fromBlock idThe cohort the arm was allocated from. Arms that share a from: must sum to it
interventionTextWhat this arm received
labelTextArm label in the figure

outcome — Outcome. One outcome, with each group's counts, the test, the p-value and the effect estimates. Takes an id. Read by the grade_sof, experiment_flow and spirit_schedule views.

AttributeTypeRulesMeaning
metricTextRequiredWhat was measured, in words
controlObjectThe control group's numbers, as an object such as { events: 72, n: 600, rate: 12% }
treatmentObjectThe treatment group's numbers, in the same shape as control
testTextThe statistical test used. chi-squared and Fisher exact (and their usual spellings) are recomputed from the counts
pNumberThe p-value as reported
roleTextPre-specified role — primary, secondary, exploratory or safety (CONSORT item 6a distinguishes primary from secondary)
timepointTextWhen the outcome was measured ("24 weeks after randomisation")
assessedTextHow the outcome was ascertained — the assay, instrument or adjudication (CONSORT item 6a). Not a count; the numbers analysed live on the analysis-stage cohorts
rrEstimateTakes an interval, such as 0.68 [0.51, 0.90]Risk ratio with its confidence interval
orEstimateTakes an interval, such as 0.68 [0.51, 0.90]Odds ratio with its confidence interval
rdEstimateTakes an interval, such as 0.68 [0.51, 0.90]Risk difference with its confidence interval
hrEstimateTakes an interval, such as 0.68 [0.51, 0.90]Hazard ratio with its confidence interval
mdEstimateTakes an interval, such as 0.68 [0.51, 0.90]Mean difference with its confidence interval
nntNumberNumber needed to treat, derived from the risk difference

timeline — Case timeline. The episode of care laid out against time (CARE item 7) — a title and the origin every event's time is counted from. Takes an id. Read by the clinical_timeline view.

AttributeTypeRulesMeaning
titleTextWhat the timeline shows — Timeline of the episode of care
originTextWhat the time axis is measured from — Day 0 is the first dose
orientationTexthorizontal or vertical; chosen from the number of events when absent
caseBlock idThe case_report this timeline belongs to, when a document holds more than one

timeline_event — Timeline event. One dated event in a clinical case — when it happened, what happened, and the phase of care it belongs to. Takes an id. Read by the clinical_timeline view.

AttributeTypeRulesMeaning
atTextWhen it happened — Day 26, Week 11 after withdrawal, 2024-03-04
dateTextA calendar date, when the event is dated rather than counted from the origin
dayNumberDays from the timeline's origin, as a bare number
timeTextAnother spelling of at, read when at is absent
unitTextUnit of a bare numeric time — d, wk, mo, y
labelTextWhat happened, in one line
titleTextAnother spelling of label
textTextAnother spelling of label
phaseTextPhase of care — presentation, diagnosis, intervention, outcome, follow-up
categoryTextAnother spelling of phase
typeTextAnother spelling of phase
kindTextAnother spelling of phase
statusTextAnother spelling of phase
detailTextA second line under the label — a result, a dose, a finding
noteTextAnother spelling of detail
timelineBlock idThe timeline this event belongs to, when a document holds more than one
ofBlock idAnother spelling of timeline

spirit_schedule — SPIRIT schedule. The SPIRIT 2013 item 13 figure — the study periods and time points a protocol's visits are scheduled against. Takes an id. Read by the spirit_schedule view.

AttributeTypeRulesMeaning
titleTextThe figure's title — Schedule of enrolment, interventions, and assessments
periodsList of labelsThe time points across the top, each led by its code — "-t1 Screening (week -2)", "0 Allocation", "t1 Week 4", "Close-out"

spirit_row — SPIRIT schedule row. One row of the SPIRIT schedule — an enrolment step, an intervention or an assessment, and the time points it happens at. Takes an id. Read by the spirit_schedule view.

AttributeTypeRulesMeaning
sectionTextEnrolment, Interventions or Assessments — the three SPIRIT sections
labelTextWhat happens at these visits — Eligibility screen, HbA1c (primary outcome)
titleTextAnother spelling of label
atList of labelsThe period codes this row is scheduled at — ["-t1", "0", "t2"]
placeholdertrue/falseA starter row still to be replaced; drawn faint and counted as not yet written
scheduleBlock idThe spirit_schedule this row belongs to, when a document holds more than one

Statistics

Estimates and their intervals, pooled analyses, time-to-event data, prediction-model performance, raw distributions and study design. The estimate kinds (estimate, effect, contrast, meta, subgroup) share one shape; see Uncertainty.

estimate — Effect estimate. One effect size with its interval, measure type and scale — the atom every forest plot is built from. Takes an id. Read by the forest, funnel_plot and grade_sof views.

AttributeTypeRulesMeaning
labelTextHow the estimate should be labelled on the figure
measureWordOne of the effect measuresEffect measure
scaleWordOne of identity, logThe scale of the interval. Every ratio measure needs log, or its interval is symmetric and wrong
valueEstimateTakes an interval, such as 0.68 [0.51, 0.90]Point estimate and interval as one value
pointNumberThe estimate, on the display scale
seNumberAt least 0Standard error on the analysis scale — of log(point) when scale: log
loNumberLower interval bound, display scale
hiNumberUpper interval bound, display scale
levelNumberFrom 0 to 1Interval coverage as a fraction — 0.95, not 95
pNumberFrom 0 to 1p-value. Exactly 0 is unattainable; write p < 0.001 in a string
nNumberWhole number, 0 or moreParticipants contributing to the estimate
eventsNumberWhole number, 0 or moreEvents contributing to the estimate
dfNumberAt least 1Degrees of freedom; when present the interval uses t, not z
unitTextUnit of a difference measure — meaningless for a ratio
weightPercent92% or 0.92Weight in a pooled analysis
null_valueNumberWhere no effect sits — 1 for a ratio, 0 for a difference
exprExpressionWritten = …Expression deriving the estimate from other blocks
outcomeBlock idThe outcome block this estimates
exposureWordExposure / intervention the estimate is for
comparatorWordWhat it is measured against — the reference group
adjustedtrue/falseAdjusted for covariates rather than crude
covariatesList of labelsCovariates the model adjusts for
modelTextModel that produced it — Cox, logistic, mixed
fromBlock idBlock the numbers were computed from
datasetBlock idDataset the estimate is bound to

effect — Effect size. An effect size stated on its own — the same shape as estimate, for documents that prefer the word. Takes an id. Read by the forest and funnel_plot views.

AttributeTypeRulesMeaning
labelTextHow the estimate should be labelled on the figure
measureWordOne of the effect measuresEffect measure
scaleWordOne of identity, logThe scale of the interval. Every ratio measure needs log, or its interval is symmetric and wrong
valueEstimateTakes an interval, such as 0.68 [0.51, 0.90]Point estimate and interval as one value
pointNumberThe estimate, on the display scale
seNumberAt least 0Standard error on the analysis scale — of log(point) when scale: log
loNumberLower interval bound, display scale
hiNumberUpper interval bound, display scale
levelNumberFrom 0 to 1Interval coverage as a fraction — 0.95, not 95
pNumberFrom 0 to 1p-value. Exactly 0 is unattainable; write p < 0.001 in a string
nNumberWhole number, 0 or moreParticipants contributing to the estimate
eventsNumberWhole number, 0 or moreEvents contributing to the effect
dfNumberAt least 1Degrees of freedom; when present the interval uses t, not z
unitTextUnit of a difference measure — meaningless for a ratio
weightPercent92% or 0.92Weight in a pooled analysis
null_valueNumberWhere no effect sits — 1 for a ratio, 0 for a difference
exprExpressionWritten = …Expression deriving the estimate from other blocks
outcomeBlock idThe outcome block this effect is on
ofBlock idBlock this effect belongs to
directionWordOne of benefit, harm, none, unclearWhich direction favours the intervention
favoursWordGroup the estimate favours, for the axis annotation
minimal_important_differenceQuantityMID — the smallest change that matters clinically

contrast — Contrast. A comparison between two named groups, carrying the contrast estimate and the test behind it. Takes an id. Read by the forest and funnel_plot views.

AttributeTypeRulesMeaning
labelTextHow the estimate should be labelled on the figure
measureWordOne of the effect measuresEffect measure
scaleWordOne of identity, logThe scale of the interval. Every ratio measure needs log, or its interval is symmetric and wrong
valueEstimateTakes an interval, such as 0.68 [0.51, 0.90]Point estimate and interval as one value
pointNumberThe estimate, on the display scale
seNumberAt least 0Standard error on the analysis scale — of log(point) when scale: log
loNumberLower interval bound, display scale
hiNumberUpper interval bound, display scale
levelNumberFrom 0 to 1Interval coverage as a fraction — 0.95, not 95
pNumberFrom 0 to 1p-value. Exactly 0 is unattainable; write p < 0.001 in a string
nNumberWhole number, 0 or moreParticipants contributing to the estimate
eventsNumberWhole number, 0 or moreEvents contributing to the contrast
dfNumberAt least 1Degrees of freedom; when present the interval uses t, not z
unitTextUnit of a difference measure — meaningless for a ratio
weightPercent92% or 0.92Weight in a pooled analysis
null_valueNumberWhere no effect sits — 1 for a ratio, 0 for a difference
exprExpressionWritten = …Expression deriving the estimate from other blocks
group_aWordFirst group — an arm/group id, or a bare label
group_bWordSecond group; the estimate is a-versus-b
referenceWordWhich of the two is the reference (default group_b)
outcomeBlock idThe outcome being compared
n_aNumberWhole number, 0 or moreParticipants in group A
n_bNumberWhole number, 0 or moreParticipants in group B
events_aNumberWhole number, 0 or moreEvents in group A
events_bNumberWhole number, 0 or moreEvents in group B
pairedtrue/falseWithin-subject comparison
testTextTest used — t-test, log-rank, Fisher exact
adjustedtrue/falseAdjusted for covariates rather than crude
alphaNumberFrom 0 to 1Significance threshold used (e.g. 0.05)
multiplicityWordOne of none, bonferroni, holm, hochberg, benjamini_hochberg, tukey, dunnett, hierarchicalMultiplicity adjustment applied across contrasts

meta — Meta-analysis. A pooled estimate over study-level estimates, with its heterogeneity and small-study diagnostics. Takes an id. Typical children: estimate, effect, subgroup, study, note, view. Read by the forest and funnel_plot views.

AttributeTypeRulesMeaning
titleTextTitle of the meta-analysis
measureWordOne of the effect measuresPooled measure
scaleWordOne of identity, logThe scale of the interval: log for every ratio measure
modelWordOne of fixed, fixed_effect, common_effect, random, random_effects, inverse_variance, mantel_haenszel, peto, dersimonian_laird, reml, ml, paule_mandel, hartung_knapp, hksj, bayesianPooling model — a random-effects label commits the figure to a tau-squared estimator
kNumberWhole number, 0 or moreNumber of studies pooled
nNumberWhole number, 0 or moreTotal participants across studies
pointNumberPooled estimate on the display scale
seNumberAt least 0Standard error on the analysis scale
loNumberLower bound of the pooled interval
hiNumberUpper bound of the pooled interval
levelNumberFrom 0 to 1Interval coverage as a fraction — 0.95, not 95
valueEstimateTakes an interval, such as 0.68 [0.51, 0.90]Pooled estimate and interval in one value
i2Percent92% or 0.92I-squared — share of variability beyond chance
tau2NumberAt least 0Between-study variance on the analysis scale
tauNumberAt least 0Between-study standard deviation
qNumberAt least 0Cochran's Q
q_dfNumberWhole number, 0 or moreDegrees of freedom of Cochran's Q
p_heterogeneityNumberFrom 0 to 1p-value of the heterogeneity test
prediction_loNumberPrediction-interval bound — where the next study is expected
prediction_hiNumberUpper prediction-interval bound
egger_pNumberFrom 0 to 1Egger's test for small-study effects
funnel_asymmetrytrue/falseFunnel asymmetry was found
weight_byWordOne of inverse_variance, sample_size, equal, mantel_haenszel, petoHow studies were weighted
pNumberFrom 0 to 1p-value for the pooled effect
unitTextUnit of a difference measure
null_valueNumberWhere the line of no effect is drawn — 1 for ratios, 0 for differences

subgroup — Subgroup. A study-level or participant-level subgroup estimate, with the interaction test that licenses it. Takes an id. Read by the forest view.

AttributeTypeRulesMeaning
labelTextHow the estimate should be labelled on the figure
measureWordOne of the effect measuresEffect measure
scaleWordOne of identity, logThe scale of the interval. Every ratio measure needs log, or its interval is symmetric and wrong
valueEstimateTakes an interval, such as 0.68 [0.51, 0.90]Point estimate and interval as one value
pointNumberThe estimate, on the display scale
seNumberAt least 0Standard error on the analysis scale — of log(point) when scale: log
loNumberLower interval bound, display scale
hiNumberUpper interval bound, display scale
levelNumberFrom 0 to 1Interval coverage as a fraction — 0.95, not 95
pNumberFrom 0 to 1p-value. Exactly 0 is unattainable; write p < 0.001 in a string
nNumberWhole number, 0 or moreParticipants contributing to the estimate
eventsNumberWhole number, 0 or moreEvents in the subgroup
dfNumberAt least 1Degrees of freedom; when present the interval uses t, not z
unitTextUnit of a difference measure — meaningless for a ratio
weightPercent92% or 0.92Weight in a pooled analysis
null_valueNumberWhere no effect sits — 1 for a ratio, 0 for a difference
exprExpressionWritten = …Expression deriving the estimate from other blocks
ofBlock idThe meta or estimate this subgroup belongs to
variableTextVariable defining the subgroups — age band, sex
categoryTextThis subgroup's category of that variable — 65 and over
stratumTextAlias of category, for authors who think in strata
kNumberWhole number, 0 or moreStudies in this subgroup
p_interactionNumberFrom 0 to 1Test for subgroup difference — the only honest basis for a subgroup claim
prespecifiedtrue/falseDeclared before the data were seen. A post-hoc subgroup must say so
i2Percent92% or 0.92I-squared within the subgroup
tau2NumberAt least 0Between-study variance within the subgroup

survival — Survival. A time-to-event curve — times, events, at-risk ticks per group, plus the hazard ratio. Takes an id. Typical children: group, series, estimate, effect, note, view. Read by the km view.

AttributeTypeRulesMeaning
titleTextFigure title
outcomeBlock idThe event being timed
time_unitTextUnit of the time axis — months, days
timesList of numbersTime points, ascending
at_riskList of numbersAt-risk counts at each tick — the risk table row
eventsList of numbersCumulative or interval events at each time
censoredList of numbersCensored counts at each time
survivalList of numbersSurvival probability at each time (0–1)
groupWordGroup these rows describe, for a single-curve block
estimatorWordOne of kaplan_meier, nelson_aalen, aalen_johansen, cox, flemington_harrington, life_tableHow the curve was estimated
medianQuantityA duration, such as 14 monthsMedian survival, with its time unit — 14 months
median_loQuantityA duration, such as 14 monthsLower bound of the median survival interval, with a time unit
median_hiQuantityA duration, such as 14 monthsUpper bound of the median survival interval, with a time unit
follow_upQuantityA duration, such as 14 monthsMedian or maximum follow-up, with its time unit
hrEstimateTakes an interval, such as 0.68 [0.51, 0.90]Hazard ratio with its interval
p_logrankNumberFrom 0 to 1Log-rank test p-value
risk_tabletrue/falseDraw the numbers-at-risk table beneath the axis
censor_markstrue/falseTick every censoring event on the curve
confidence_bandtrue/falseDraw the confidence band
levelNumberFrom 0 to 1Coverage of the band as a fraction
cumulativetrue/falsePlot cumulative incidence rather than survival
competing_riskstrue/falseA competing-risks analysis
proportional_hazardstrue/falseWhether the PH assumption was checked and held

roc — ROC curve. A receiver-operating-characteristic curve with its AUC, thresholds and validation provenance. Takes an id. Read by the roc view.

AttributeTypeRulesMeaning
titleTextFigure title
modelWordModel or test being characterised
aucNumberFrom 0 to 1Area under the curve — a proportion, so 0.84 not 84
auc_loNumberFrom 0 to 1Lower bound of the AUC interval
auc_hiNumberFrom 0 to 1Upper bound of the AUC interval
valueEstimateTakes an interval, such as 0.68 [0.51, 0.90]AUC with its interval in one value
fprList of numbersFalse-positive rates, ascending (1 − specificity)
tprList of numbersTrue-positive rates (sensitivity) at each fpr
thresholdsList of numbersDecision thresholds matching each point
nNumberWhole number, 0 or moreParticipants
eventsNumberWhole number, 0 or morePositive cases
prevalencePercent92% or 0.92Prevalence of the condition
diagonaltrue/falseDraw the chance line (default true)
partial_auc_fromNumberFrom 0 to 1Start of a partial-AUC range
partial_auc_toNumberFrom 0 to 1End of a partial-AUC range
operating_pointNumberFrom 0 to 1Threshold the figure highlights
validationWordOne of the validation typesHow the curve was validated. apparent means in-sample and should say so
datasetBlock idThe dataset block this is bound to
levelNumberFrom 0 to 1Interval coverage as a fraction

calibration — Calibration. Predicted-versus-observed risk with intercept, slope and Brier score — the other half of discrimination. Takes an id. Read by the calibration view.

AttributeTypeRulesMeaning
titleTextFigure title
modelWordModel being calibrated
predictedList of numbersMean predicted risk per bin (0–1)
observedList of numbersObserved proportion per bin (0–1)
binsNumberWhole number, 1 or moreNumber of risk groups — 10 for deciles
interceptNumberCalibration-in-the-large; 0 is perfect
slopeNumberCalibration slope; 1 is perfect, below 1 means overfitted
brierNumberFrom 0 to 1Brier score — lower is better
brier_scaledNumberAt most 1Scaled Brier score
iciNumberAt least 0Integrated calibration index
emaxNumberAt least 0Maximum calibration error
hl_pNumberFrom 0 to 1Hosmer–Lemeshow p — a weak test; report the plot too
methodWordOne of loess, spline, quantile, decile, isotonic, binnedHow the calibration curve was smoothed or binned
nNumberWhole number, 0 or moreParticipants
eventsNumberWhole number, 0 or morePositive cases
validationWordOne of the validation typesHow the predictions were validated
datasetBlock idThe dataset block this is bound to
diagonaltrue/falseDraw the line of perfect calibration
histogramtrue/falseShow the distribution of predicted risk under the plot

decision_curve — Decision curve. Net benefit across threshold probabilities, against treat-all and treat-none. Takes an id. Read by the decision_curve view.

AttributeTypeRulesMeaning
titleTextFigure title
modelWordStrategy being evaluated
thresholdsList of numbersThreshold probabilities (0–1), ascending
net_benefitList of numbersNet benefit at each threshold
treat_allList of numbersNet benefit of treating everyone
treat_noneList of numbersNet benefit of treating nobody — usually zero
prevalencePercent92% or 0.92Prevalence of the condition
harmNumberAt least 0Harm of the test itself, in net-benefit units
interventions_avoidedList of numbersInterventions avoided at each threshold
nNumberWhole number, 0 or moreParticipants
eventsNumberWhole number, 0 or morePositive cases
smoothtrue/falseSmooth the curve
datasetBlock idThe dataset block this is bound to
unitTextWhat net benefit is expressed per — per 100 patients
validationWordOne of the validation typesWhere the predicted risks were measured. apparent means in-sample, and its net benefit is optimistic

diagnostic — Diagnostic 2×2. A diagnostic-accuracy 2×2 table and everything derived from it — sensitivity through likelihood ratios. Takes an id.

AttributeTypeRulesMeaning
titleTextTitle
index_testTextThe test under evaluation
reference_standardTextWhat it is judged against
tpNumberWhole number, 0 or moreTrue positives
fpNumberWhole number, 0 or moreFalse positives
fnNumberWhole number, 0 or moreFalse negatives
tnNumberWhole number, 0 or moreTrue negatives
nNumberWhole number, 0 or moreTotal tested — should equal tp+fp+fn+tn
sensitivityPercent92% or 0.92Written either 92% or 0.92
specificityPercent92% or 0.92Specificity, written 88% or 0.88
ppvPercent92% or 0.92Positive predictive value — depends on prevalence
npvPercent92% or 0.92Negative predictive value
accuracyPercent92% or 0.92Overall accuracy
prevalencePercent92% or 0.92Prevalence in the tested population
lr_positiveNumberAt least 0Positive likelihood ratio
lr_negativeNumberAt least 0Negative likelihood ratio
dorNumberAt least 0Diagnostic odds ratio
youdenNumberFrom -1 to 1Youden's J
thresholdQuantityCut-off the 2×2 was built at, with its unit
levelNumberFrom 0 to 1Interval coverage as a fraction
indeterminateNumberWhole number, 0 or moreResults that were neither positive nor negative
blindedtrue/falseIndex test read without knowledge of the reference standard

distribution — Distribution. Raw values for a box, violin, raincloud or histogram — plus the summary statistics they imply. Takes an id. Typical children: group, series, note. Read by the raincloud and table_one views.

AttributeTypeRulesMeaning
titleTextFigure title
labelTextLabel for this distribution
valuesList of numbersThe raw observations — what a box or violin is drawn from
kindWordOne of box, violin, raincloud, strip, beeswarm, histogram, density, dot, ecdfHow to draw it. box over n<10 hides the data; prefer strip or raincloud
nNumberWhole number, 0 or moreNumber of observations
meanNumberMean
sdNumberAt least 0Standard deviation
seNumberAt least 0Standard error
medianNumberMedian
q1NumberFirst quartile
q3NumberThird quartile
iqrNumberAt least 0Interquartile range
minNumberMinimum
maxNumberMaximum
loNumberLower whisker or interval bound
hiNumberUpper bound
outliersList of numbersValues drawn as outliers
whiskerWordOne of tukey, minmax, sd, se, ci, iqr, percentileWhat the whiskers mean. A box plot that does not say is unreadable
binsNumberWhole number, 1 or moreNumber of histogram bins
bandwidthNumberAt least 0Kernel bandwidth for a density or violin
jittertrue/falseOffset overlapping points so n is visible
unitTextUnit of the values
groupWordGroup this distribution belongs to
ofBlock idThe block this distribution belongs to
datasetBlock idThe dataset block this is bound to
columnBlock idThe column these values are bound to
logtrue/falseValues are already logged
digitsNumberWhole number, from 0 to 6Decimals for this row of a table_one, overriding the table's own digits

series — Series. A named run of paired values with its error bars, encoding and redundant non-colour channel. Takes an id. Read by the roc, calibration, decision_curve, control_chart and table_one views.

AttributeTypeRulesMeaning
labelTextSeries name, for the legend
xList of numbersX values, paired positionally with y
yList of numbersY values, paired with x
valuesList of numbersY values when x is implicit (index or category order)
labelsList of labelsCategory labels, paired with values
loList of numbersLower error-bar bound per point
hiList of numbersUpper error-bar bound per point
seList of numbersStandard error per point
nList of numbersPer-point sample sizes
groupWordGroup this series belongs to
colorTextColour, hex or named
colourTextBritish spelling of color; either is accepted
markerWordOne of circle, square, triangle, diamond, cross, plus, star, nonePoint shape — the redundant channel that keeps a figure readable in greyscale
dashWordOne of solid, dashed, dotted, dashdot, noneLine style
encodingWordOne of line, bar, column, area, point, scatter, step, ribbonHow the series is drawn
widthNumberAt least 0Stroke width in points
unitTextUnit of the values
x_unitTextUnit of x
y_unitTextUnit of y
axisBlock idThe axis this series is measured against
ofBlock idThe block this series belongs to
datasetBlock idThe dataset block this is bound to
x_columnBlock idColumn the x values are read from
y_columnBlock idColumn the y values are read from
smoothtrue/falseSmooth the line
stackWordStack group; series sharing a name stack together

group — Group. One group's raw values or survival row — the unit a box plot, violin or Kaplan–Meier curve repeats. Takes an id. Read by the km, raincloud and table_one views.

AttributeTypeRulesMeaning
labelTextGroup name
valuesList of numbersRaw observations for this group
nNumberWhole number, 0 or moreNumber in the group
meanNumberMean
sdNumberAt least 0Standard deviation
seNumberAt least 0Standard error
medianNumberMedian
q1NumberFirst quartile
q3NumberThird quartile
loNumberLower bound
hiNumberUpper bound
eventsList of numbersFor a survival curve: one code per subject, matching times (1 for an event, 0 for censored). With at_risk, the event count at each time instead
at_riskList of numbersNumbers at risk at each time. Giving it turns the group into a life table (useful when digitising a published curve)
censoredList of numbersCensored counts at each time, in a life table
timesList of numbersFor a survival curve: one follow-up time per subject. With at_risk, the distinct times of the life table
survivalList of numbersSurvival probabilities, for a survival row
colorTextColour, hex or named
colourTextBritish spelling of color; either is accepted
unitTextUnit of the values
orderNumberWhole numberPosition in the legend and on the axis
fromBlock idCohort or arm this group is drawn from
datasetBlock idThe dataset block this is bound to
columnBlock idThe column these values are bound to
referencetrue/falseThis is the comparison baseline

dose_response — Dose–response. Doses against responses with the fitted curve's parameters — EC50, Hill slope, plateaux. Takes an id.

AttributeTypeRulesMeaning
titleTextFigure title
dosesList of numbersDoses, ascending, in dose_unit
responsesList of numbersMean response at each dose
loList of numbersLower bound at each dose
hiList of numbersUpper bound at each dose
nList of numbersReplicates per dose
dose_unitTextUnit of the dose axis — mg/kg, µM, Gy
response_unitTextUnit of the response axis
modelWordOne of four_param, three_param, five_param, log_logistic, emax, linear, log_linear, sigmoid, weibull, hillThe fitted curve
ec50QuantityHalf-maximal effective concentration, with its unit
ic50QuantityHalf-maximal inhibitory concentration, with its unit
ed50QuantityHalf-maximal effective dose, with its unit
hillNumberHill slope
topNumberUpper plateau
bottomNumberLower plateau
r2NumberAt most 1Goodness of fit
log_dosetrue/falseDoses are already log-transformed
p_trendNumberFrom 0 to 1Test for a monotone trend across doses
datasetBlock idThe dataset block this is bound to

power — Power. A power calculation: the effect assumed, the test, and the design that follows from them. Takes an id. Read by the experiment_flow view.

AttributeTypeRulesMeaning
titleTextTitle
powerPercent92% or 0.92Statistical power — written either 80% or 0.8
alphaNumberFrom 0 to 1Type-I error rate, as a fraction
sidesNumberWhole number from 1 to 21 or 2 — a one-sided test must justify itself
effect_sizeNumberThe effect the calculation assumes
measureWordOne of the effect measuresEffect measure the calculation uses
sdNumberAt least 0Assumed standard deviation
nNumberWhole number, 1 or moreTotal sample size
n_per_groupNumberWhole number, 1 or moreSample size per group
allocationNumberAt least 0Allocation ratio, e.g. 2 for 2:1
testWordOne of t, z, chi2, fisher, log_rank, anova, proportion, correlation, regression, mcnemar, simulationThe test the calculation assumes
baseline_ratePercent92% or 0.92Assumed control-arm event rate
target_ratePercent92% or 0.92Assumed event rate in the intervention arm
events_requiredNumberWhole number, 1 or moreEvents, not participants — what a survival trial is powered on
dropoutPercent92% or 0.92Assumed dropout
iccNumberFrom 0 to 1Intra-cluster correlation, for a cluster design
clustersNumberWhole number, 1 or moreNumber of clusters, for a cluster design
cluster_sizeNumberWhole number, 1 or moreParticipants per cluster
design_effectNumberAt least 1Design effect for clustering
marginQuantityNon-inferiority or equivalence margin, with its unit
hypothesisWordOne of superiority, non_inferiority, equivalence, futility, estimationWhat the trial sets out to show
achievedtrue/falseThis is post-hoc achieved power, not the a-priori target
softwareTextWhat computed it — a power claim needs to be reproducible

sample_size — Sample size. The planned and achieved sample size, and the assumption the plan rested on. Takes an id.

AttributeTypeRulesMeaning
titleTextTitle
targetNumberWhole number, 1 or morePlanned total sample size
per_groupNumberWhole number, 1 or morePlanned size per group
achievedNumberWhole number, 0 or moreActually recruited
analysedNumberWhole number, 0 or moreIncluded in the analysis set
groupsNumberWhole number, 1 or moreNumber of groups
powerPercent92% or 0.92Power the target was calculated for
alphaNumberFrom 0 to 1Significance level
dropoutPercent92% or 0.92Attrition the target was inflated for
inflationNumberAt least 1Multiplier applied for dropout or clustering
marginQuantityNon-inferiority or equivalence margin, with its unit
methodTextHow it was calculated
assumptionTextThe assumption the number rests on, in words
ofBlock idThe power block or study this sizes
interimtrue/falseAn interim or adaptive re-estimation
stopping_ruleTextThe stopping rule, in words

table_one — Baseline table. The baseline-characteristics table — groups, variables, and how each row is summarised. Takes an id. Typical children: group, distribution, note, view. Read by the table_one view.

AttributeTypeRulesMeaning
titleTextTable title
groupsList of labelsColumn headings — the arms or cohorts compared
variablesList of labelsRow headings, in the order they should print
nNumberWhole number, 0 or moreTotal participants
overalltrue/falseInclude an all-participants column
p_valuestrue/falsePrint per-row p-values. CONSORT advises against them for baseline tables
smdtrue/falsePrint standardised mean differences instead of p-values
missingPercent92% or 0.92Overall missingness across the table
continuous_summaryWordOne of mean_sd, median_iqr, median_range, mean_ci, geometric_meanHow continuous rows are summarised — and it must be stated
categorical_summaryWordOne of n_percent, percent, nHow categorical rows are summarised
digitsNumberWhole number from 0 to 6Decimal places printed
datasetBlock idThe dataset block this is bound to
footnoteTextFootnote under the table

control_chart — Control or run chart. A statistical-process-control or run chart's own parameters — baseline, centre line, limits, when the intervention started, and the rules it is read against. Takes an id. Read by the control_chart view.

AttributeTypeRulesMeaning
metricTextThe measure this chart plots, with its unit and its period
chartTextChart type as the team names it — run chart, p chart, u chart, xbar-s
baseline_periodTextThe dates the pre-intervention baseline covers. Every improvement claim is a comparison against it
baseline_nNumberWhole number, 0 or moreHow many observations the baseline is built from
centre_lineTextThe centre line the points are judged against, how it was calculated, and when it was re-based
limitsTextThe control limits, or a statement that this is a run chart and none are drawn
intervention_atTextWhen each intervention or PDSA cycle started, as a point on the time axis. Without it nothing marks the change the chart exists to show
rulesList of labelsThe special-cause rules applied, named — a shift, a trend, a point beyond the limits. This is what says out loud what would have counted as a signal rather than noise
special_causeTextThe special-cause variation actually found, and where on the chart
annotationsTextOther events marked on the chart — a scanner replacement, industrial action

Evidence appraisal and reporting

Risk of bias, GRADE, reporting standards, and the narrative "reporting homes" the checklists on the Reporting standards page read and write.

bias_domain — Bias domain. One domain of a risk-of-bias tool — RoB 2, ROBINS-I, QUADAS-2 — as a declared column. Takes an id. Read by the rob_traffic_light and rob_summary_bar views.

AttributeTypeRulesMeaning
nameTextDomain as the tool names it — Randomisation process
toolWordOne of the appraisal toolsThe appraisal tool this domain belongs to
labelTextShort heading for the traffic-light column
orderNumberWhole number, 1 or moreColumn order in the summary plot
signalling_questionsList of labelsThe tool's questions for this domain
descriptionTextWhat the domain covers
applies_toWordOne of randomised, non_randomised, diagnostic, prognostic, review, anyWhich study designs the domain applies to

bias_assessment — Bias assessment. One study × domain risk-of-bias judgement with its supporting quotation and predicted direction. Takes an id. Read by the rob_traffic_light and rob_summary_bar views.

AttributeTypeRulesMeaning
studyBlock idThe study (or estimate) being judged
domainBlock idThe bias_domain this judgement is for
toolWordOne of the appraisal toolsThe appraisal tool used
judgementWordOne of the risk-of-bias judgementsJudgement
overallWordOne of the risk-of-bias judgementsOverall judgement across domains
outcomeBlock idRoB 2 is per-outcome; name the outcome judged
supportTextQuotation from the paper supporting the judgement
rationaleTextWhy the assessor landed there
assessorTextWho made the judgement
second_assessorTextDuplicate assessment — a reporting requirement
consensustrue/falseDisagreements were resolved by consensus or arbitration
dateTextWhen
directionWordOne of favours_experimental, favours_comparator, towards_null, away_from_null, unpredictable, nonePredicted direction of the bias — ROBINS-I asks for this and figures rarely show it

grade_outcome — GRADE outcome. A GRADE certainty rating with each domain's downgrade and the footnote reasons behind it. Takes an id. Read by the grade_sof view.

AttributeTypeRulesMeaning
outcomeBlock idThe outcome being rated
estimateBlock idThe estimate or meta the rating is about
certaintyWordOne of high, moderate, low, very_lowCertainty of evidence
starting_certaintyWordOne of high, moderate, low, very_lowBefore downgrades — high for RCTs, low for observational
risk_of_biasWordOne of not_serious, serious, very_seriousDowngrade for risk of bias
inconsistencyWordOne of not_serious, serious, very_seriousDowngrade for inconsistency
indirectnessWordOne of not_serious, serious, very_seriousDowngrade for indirectness
imprecisionWordOne of not_serious, serious, very_seriousDowngrade for imprecision
publication_biasWordOne of undetected, suspected, strongly_suspectedAssessment of publication bias
large_effectWordOne of none, large, very_largeUpgrade for magnitude
dose_responsetrue/falseUpgrade for a dose–response gradient
residual_confoundingtrue/falseUpgrade: plausible confounding would reduce the effect
downgradesList of labelsReasons, in the words a Summary of Findings footnote needs
upgradesList of labelsReasons for any upgrade
importanceWordOne of critical, important, not_importantImportance to decision-makers, decided before the results were seen
studiesNumberWhole number, 0 or moreNumber of studies
participantsNumberWhole number, 0 or moreNumber of participants
designTextDesign of the included studies
reasonTextOne-line summary of the rating

sof_row — Summary-of-findings row. One row of a GRADE Summary of Findings table — absolute risks, relative effect, certainty. Takes an id. Read by the grade_sof view.

AttributeTypeRulesMeaning
outcomeBlock idThe outcome this row reports
labelTextRow label when the outcome has no metric
estimateBlock idThe relative effect this row reports
gradeBlock idThe grade_outcome supplying the certainty
certaintyWordOne of high, moderate, low, very_lowCertainty of the evidence
relative_effectTextAs printed — RR 0.68 (0.51 to 0.90)
risk_controlQuantityA proportion or rate, such as 128 per 1000 or 12.8%Absolute risk without the intervention — 128 per 1000
comparator_risk_basisTextWhere risk_control came from: the control arms, a registry, or a stated assumption
risk_interventionQuantityA proportion or rate, such as 128 per 1000 or 12.8%Absolute risk with it
risk_differenceQuantityA proportion or rate, such as 128 per 1000 or 12.8%Difference, with its interval in comments if needed
participantsNumberWhole number, 0 or moreParticipants
studiesNumberWhole number, 0 or moreStudies
follow_upQuantityA duration, such as 14 monthsFollow-up the risks apply to — 2 years
commentsTextThe footnote column — where a downgrade is explained
importanceWordOne of critical, important, not_importantImportance of the outcome
orderNumberWhole number, 1 or moreRow order in the table

guideline — Reporting guideline. Which reporting standard this figure claims to follow, at which version, and where the checklist is. Takes an id.

AttributeTypeRulesMeaning
standardWordOne of the reporting standardsWhich reporting standard this figure claims
labelTextDisplay name — CONSORT
versionTextVersion as published — 2010. Never invent one
yearNumberWhole number from 1980 to 2100Year the standard was published
extensionTextNamed extension — cluster trials, harms, abstracts
scopeTextWhat kind of study the checklist is for
referenceTextCitation for the checklist itself
urlTextWhere the standard is published
claimedtrue/falseThe author asserts compliance, rather than merely scoring against it
checklistTextPath or URL of the completed checklist accompanying the submission
completenessPercent92% or 0.92A completeness score, if you recorded one
ofBlock idThe view or figure the claim is about

animal_study — Animal-study report. The statements an animal-research report has to make and a figure has no number for — experimental unit, randomisation, blinding, housing, welfare, ethics. Takes an id. Read by the experiment_flow view.

AttributeTypeRulesMeaning
abstractTextThe abstract, or a note of where it is
backgroundTextThe scientific background, including why this species and this model were chosen
objectiveTextThe objective, or the hypothesis being tested
experimental_unitTextWhat was independently allocated — a single animal, a cage, a litter, a tank. The number the analysis is allowed to treat as n
inclusion_criteriaTextThe criteria for including or excluding an animal or a data point, and whether they were set in advance
randomisationTextWhether allocation was randomised and, if so, how the sequence was generated
confoundersTextHow treatment order, time of day and cage position were handled — or a statement that they were not controlled
blindingTextWho knew the allocation at allocation, during the work, at outcome assessment and at analysis. All four stages: the ARRIVE check names the stages a statement leaves out
proceduresTextWhen and how often the procedures were performed, where, and why this model, route and dose
statistical_methodsTextThe statistical methods for each analysis, where outcome.test does not carry them
assumptionsTextHow the assumptions of the analysis were checked, and what was done when they failed
softwareTextThe software that ran the analyses, where a power block does not name it
ethical_statementTextThe ethical review body, the licence number, and the guidelines the work followed
housingTextCage type and group size, light cycle, temperature, diet and enrichment
animal_careTextAnalgesia and anaesthesia, the monitoring schedule, the humane endpoints, and how many animals reached them
interpretationTextHow the results sit against the existing literature, with the limitations and possible biases
generalisabilityTextHow far the findings should be expected to transfer to other species or strains, or to humans
registrationTextWhere and when the protocol was registered and its number, or that it was not registered
data_accessTextWhere the data can be obtained and on what terms, where dataset.availability does not say
fundingTextWho paid for the work and what part they played, where no funding block carries it
declaration_of_interestsTextCompeting interests, or a statement that there are none — one is asked for either way

qi_project — Quality-improvement project. A quality-improvement report — the local problem, the rationale, the aim, the context, the intervention, and how attribution was studied. Takes an id.

AttributeTypeRulesMeaning
abstractTextThe structured abstract
problemTextThe nature and significance of the local problem
available_knowledgeTextWhat is already known about the problem
rationaleTextThe reasoning or theory of change that led to this intervention
aimTextThe specific aim of the project, with its target and its deadline
contextTextThe contextual elements that matter to the result
interventionTextThe intervention in enough detail to reproduce it, and who the team was
study_of_interventionTextHow the intervention's impact was assessed, and how the observed change was attributed to it rather than to time
measure_validityTextWhy these measures, and what is known about their validity and reliability
analysis_methodsTextThe qualitative and quantitative methods used to draw inferences
ethical_considerationsTextEthical aspects, how they were addressed, and any conflict of interest
missing_dataTextWhat data were missing or incomplete. A chart with silent gaps overstates its own stability
summaryTextThe key findings and the project's particular strengths
interpretationTextHow the intervention relates to the outcomes, how it compares with other reports, and the costs and opportunity costs
limitationsTextLimits to generalisability, limits to internal validity, and what was done to reduce them
conclusionsTextUsefulness, sustainability, potential for spread, and the next steps
fundingTextWho paid for the work and what part they played, where no funding block carries it

qual_study — Qualitative-study report. The reporting home COREQ and SRQR share — the research team and its reflexivity, the sampling, the interview conduct, saturation, coding and trustworthiness. Takes an id. Read by the theme_map view.

AttributeTypeRulesMeaning
interviewerTextWho conducted the interview or focus group
researcher_credentialsTextThe researchers' credentials
researcher_occupationTextTheir occupation at the time of the study
researcher_genderTextThe gender of the researchers who collected the data
researcher_experienceTextTheir experience and training in qualitative research
relationship_establishedTextWhether a relationship with participants existed before the study began
participant_knowledgeTextWhat the participants knew about the researcher
interviewer_characteristicsTextCharacteristics of the interviewer that may have influenced the interviews
reflexivityTextThe researchers' own influence on the research, and how it was addressed
methodologyTextThe methodological orientation and the theory underpinning the study
paradigmTextThe paradigm or approach the study works within
samplingTextHow the participants were selected, and on what dimensions the sample was varied
method_of_approachTextHow the participants were first approached
repeat_interviewsTextWhether interviews were repeated, and why
sample_descriptionTextThe sample's characteristics
participant_characteristicsTextFuller participant characteristics, where they do not fit sample_description
data_collection_settingTextWhere the data were collected
others_presentTextAnyone present besides the participant and the researcher
contextTextThe setting and context of the study
instrumentsTextThe questions, prompts and guides, where an instrument block with item children does not carry them
pilot_testedTextWhether the topic guide was pilot tested, and what changed as a result
recordingTextWhether audio or visual recording was used
field_notesTextWhether field notes were made, and when
interview_durationTextHow long the interviews or focus groups lasted
saturationTextWhether data saturation was discussed, and how it was judged
transcripts_returnedTextWhether transcripts were returned to participants for comment
data_collectionTextThe data-collection methods and the procedures behind them
data_processingTextTranscription and data preparation before analysis
codersTextHow many people coded the data, and who they were
theme_derivationTextWhether the themes were derived in advance or from the data
softwareTextThe software used to manage and code the data
member_checkingTextWhether the participants gave feedback on the findings
trustworthinessTextThe techniques used to establish trustworthiness and credibility
problemTextThe problem formulation, and why it matters
research_questionTextThe research question, or the purpose of the study
objectiveTextThe study objective, where it is narrower than the research question
abstractTextThe abstract, or a note of where in the manuscript it is
discussionTextHow the findings integrate with prior work
implicationsTextThe implications of the findings
transferabilityTextHow far the findings transfer beyond this setting
limitationsTextThe study's limitations
ethicsTextEthical approval and the body that granted it
consentTextThe consent process, including consent to be quoted
fundingTextWho paid for the work and what part they played, where no funding block carries it
declaration_of_interestsTextCompeting interests, including when there are none

tidier_intervention — Intervention description (TIDieR). One intervention described so another team could deliver it — what, why, by whom, how, where, when, how much, and how faithfully. Takes an id. Read by the intervention_table view.

AttributeTypeRulesMeaning
brief_nameTextThe name or phrase that describes the intervention
whyTextThe rationale, theory or goal essential to the intervention
materialsTextThe physical or informational materials used, and where a reader can obtain them
proceduresTextEach procedure, activity and process, including any enabling or supporting activity
providerTextWho delivered it, their expertise, and any training they were given for it
modeTextHow it was delivered — face to face, by telephone, individually or in a group
locationTextWhere it took place, including any infrastructure the site needed
scheduleTextWhen and how much — the number of sessions, the schedule, the duration, the dose or intensity
tailoringTextWhether the intervention was personalised or adapted, and how
modificationsTextAny modification made during the study, and why
fidelity_plannedTextHow adherence and fidelity were planned to be assessed
fidelity_actualTextThe fidelity actually achieved, and any deviation from what was planned

appraisal — Appraisal protocol. What a risk-of-bias appraisal states once rather than per study — which tool at which version, who assessed, and how disagreements were settled. Takes an id. Read by the appraisal_table view.

AttributeTypeRulesMeaning
toolWordOne of the appraisal toolsThe appraisal tool, from the same list bias_domain and bias_assessment use, so one document names the tool one way
versionTextThe version of the tool as published on it — the RoB 2 template dated 22 August 2019
effect_of_interestTextWhich effect the assessment is about: assignment to the intervention, or adherence to it. The two use different signalling questions and can give different judgements
unit_of_assessmentTextWhat was appraised — a study, a single result, a study × outcome pair
assessorsList of labelsWho appraised. A list or a single name both read the same
duplicatetrue/falseEach result was appraised independently by two assessors
disagreementsTextHow disagreements between assessors were settled. The one statement a duplicated appraisal is incomplete without
target_trialTextThe hypothetical randomised trial a non-randomised comparison is judged against
confoundersTextThe confounding domains listed before the assessment began. Per-domain status belongs on confounder blocks
tailoringTextAny modification made to the published tool, and why
review_questionTextThe review question the appraisal is judged against
relevanceTextWhether the review matches the target question, and where it does not
confidenceTextThe overall confidence in the results of the review, as the tool words it

signalling — Signalling answers. One assessment's recorded answers to its tool's signalling questions — what turns an asserted judgement into a re-runnable one. Takes an id.

AttributeTypeRulesMeaning
ofBlock idThe bias_assessment these answers belong to. Pointing at nothing used to be silent, and every domain then fell back to cannot tell
answersObjectThe answers keyed by the tool's own question ids — answers { q1_1: "Y", q1_2: "PN", q1_3: "NI" }

applicability — Applicability concern. A per-study, per-domain judgement of concern about applicability — a different question from risk of bias, asked of the same pair. Takes an id.

AttributeTypeRulesMeaning
studyBlock idThe study this applicability judgement is about
domainBlock idThe bias_domain it is about — the applicability question is asked of the same domains as the risk question
judgementWordOne of the risk-of-bias judgementsLevel of concern about applicability, from the same list a risk judgement uses
rationaleTextWhy the assessor landed there

confounder — Confounding domain. One confounding domain a non-randomised comparison was appraised against, and whether it was pre-specified, measured and controlled for. Takes an id.

AttributeTypeRulesMeaning
nameTextThe confounding domain as the appraisal names it — calendar time, baseline severity
prespecifiedtrue/falseThis domain was on the list before the papers were read. Judging against a list assembled afterwards is how a study with no adjustment at all gets rated moderate
measuredtrue/falseThe study measured this domain
controlledtrue/falseThe study's analysis controlled for it
methodTextHow it was controlled for — adjustment, matching, stratification, restriction

amstar_item — AMSTAR 2 item. One answered item of an AMSTAR 2 appraisal form — the item number, the answer, and the note behind it. Takes an id. Read by the appraisal_table view.

AttributeTypeRulesMeaning
numberTextThe item number as the form prints it — 1 through 16. A string, because some items are lettered
answerWordOne of yes, y, partial_yes, partial, py, no, n, not_applicable, na, no_meta_analysisThe answer to this item. The short spellings y, py, n and na are also read
noteTextThe reasoning, or the quotation from the review, behind the answer

Health economics

Cost-effectiveness models, strategies, ICERs and probabilistic sensitivity analyses.

econ_model — Cost-effectiveness model. The frame of a cost-effectiveness analysis: perspective, currency, time horizon and discount rate. Takes an id. Typical children: intervention, view, note. Read by the ce_plane view.

AttributeTypeRulesMeaning
perspectiveTextpayer, societal, health-system
currencyTextISO 4217 currency code
horizonTextTime horizon, such as lifetime, 10y or 1y
discountNumberAnnual discount rate (e.g. 0.035)
titleTextModel title

intervention — Intervention. One intervention's per-patient cost and QALYs, and what it is compared with. Takes an id. Read by the ce_plane view.

AttributeTypeRulesMeaning
nameTextRequiredIntervention name
costNumberRequiredPer-patient total cost over horizon
qalysNumberRequiredPer-patient QALYs gained
comparatorBlock idIntervention this is compared against
armTexttreatment, control, standard-of-care

economic_strategy — Economic strategy. One strategy on the cost-effectiveness plane, with its costs, effects and frontier status. Takes an id. Read by the ce_plane view.

AttributeTypeRulesMeaning
nameTextStrategy name
costQuantityPer-patient cost over the horizon, with its currency unit
qalysNumberPer-patient QALYs
effectNumberPer-patient effect when the outcome is not a QALY
effect_unitTextUnit of effect — life-years, cases averted
comparatorBlock idStrategy this is compared against
dominatedtrue/falseMore costly and less effective than an alternative
extendedly_dominatedtrue/falseRuled out by the frontier despite not being dominated
on_frontiertrue/falseOn the cost-effectiveness frontier
currencyTextISO 4217 — USD, EUR, GBP, NGN…
price_yearNumberWhole number from 1900 to 2100Year the prices are in
discount_costsPercent92% or 0.92Annual discount rate applied to costs
discount_effectsPercent92% or 0.92Annual discount rate applied to effects
horizonTextlifetime, 10y, 1y
perspectiveWordOne of payer, societal, health_system, provider, patientPerspective of the costs
armWordOne of treatment, control, standard_of_care, comparator, no_treatmentWhich arm this strategy is
ofBlock idThe econ_model this belongs to

icer — ICER. An incremental cost-effectiveness ratio with the threshold and verdict that make it mean something. Takes an id. Read by the ce_plane view.

AttributeTypeRulesMeaning
ofBlock idStrategy the ratio is for
versusBlock idStrategy it is compared against
incremental_costQuantityDifference in cost, with its currency
incremental_qalysNumberDifference in QALYs
incremental_effectNumberDifference in effect, when the outcome is not a QALY
ratioNumberCost per unit of effect. Negative ratios are uninterpretable — say dominant or dominated instead
valueEstimateTakes an interval, such as 0.68 [0.51, 0.90]The ratio with its interval
thresholdQuantityWillingness-to-pay threshold the verdict is against
inmbQuantityIncremental net monetary benefit at that threshold
inhbNumberIncremental net health benefit, in effect units
perTextWhat the cost is per — QALY gained
currencyTextCurrency
verdictWordOne of cost_effective, not_cost_effective, dominant, dominated, extendedly_dominated, uncertainThe conclusion at the threshold
interpretationTextThe conclusion, in words
levelNumberFrom 0 to 1Interval coverage as a fraction

psa — Probabilistic sensitivity analysis. A probabilistic sensitivity analysis — draws, seed, and the acceptability curve they produce. Takes an id. Read by the ce_plane view.

AttributeTypeRulesMeaning
titleTextTitle
iterationsNumberWhole number, 1 or moreMonte-Carlo draws
seedNumberWhole numberSeed used — without it the cloud is not reproducible
ofBlock idStrategy or icer the analysis is about
thresholdQuantityWillingness-to-pay threshold, with its currency
ce_probabilityPercent92% or 0.92Probability the strategy is cost-effective at that threshold
parameterTextParameter being varied, for a one-way row
distributionWordOne of normal, lognormal, beta, gamma, dirichlet, uniform, triangular, bootstrap, empiricalDistribution a parameter was drawn from
meanNumberMean of the parameter
sdNumberAt least 0Standard deviation of the parameter
loNumberLower bound of the parameter range
hiNumberUpper bound of the parameter range
correlatedtrue/falseParameters were sampled as correlated
ceacList of numbersAcceptability curve values across thresholds
thresholdsList of numbersThresholds the acceptability curve is evaluated at
evpiQuantityExpected value of perfect information
currencyTextCurrency, as an ISO 4217 code such as USD, EUR or GBP
softwareTextSoftware that produced it

econ_report — Economic-evaluation report. The narrative half of an economic evaluation — population, setting, how outcomes were valued, model structure, discounting, equity, engagement. Takes an id.

AttributeTypeRulesMeaning
abstractTextThe structured abstract
backgroundTextThe background to the evaluation and its practical relevance
objectiveTextThe objective of the evaluation, and the question it answers
analysis_planTextThe health-economic analysis plan, and where it can be read
populationTextThe population the evaluation is about, and who was excluded
settingTextSetting, location and jurisdiction — the decision context this result belongs to. Costs and practice patterns do not travel
comparator_rationaleTextWhy these comparators, and what was ruled out
outcome_selectionTextWhich outcomes the evaluation is built on, and why those
outcome_measurementTextHow the health outcomes were measured
outcome_valuationTextWhere the utility weights came from, and whose preferences they are
cost_measurementTextHow resource use was identified, measured and valued
currencyTextThe currency statement in prose, where the typed currency on econ_model or economic_strategy does not carry the whole story
discountingTextThe discount rates applied to costs and to outcomes, and the reference case they come from — including a reasoned statement that none were applied
model_structureTextThe model's structure, and why that structure
analytic_methodsTextThe analytic methods, and the assumptions behind them
structural_uncertaintyTextThe scenario analyses that address structural uncertainty — the uncertainty a probabilistic analysis cannot reach, because it varies parameters and not the model
heterogeneityTextHow differences between subgroups were handled, where subgroup blocks do not carry them
distributional_effectsTextDistributional effects and equity considerations
engagementTextHow patients, the public and other stakeholders were involved
engagement_effectTextWhat that involvement changed about the evaluation
discussionTextThe findings, their limitations, their generalisability, and how they fit current knowledge
fundingTextWho paid for the work and what part they played, where no funding block carries it
declaration_of_interestsTextCompeting interests, including when there are none

Data binding

Columns of a bound dataset. With rows bound on the Data bench, a column name the data does not have is an error (see The Data and Statistics benches).

column — Data column. One column of a bound dataset — its type, unit, role in the figure, and how it was derived. Takes an id.

AttributeTypeRulesMeaning
ofBlock idThe dataset this column lives in
nameTextColumn name as it appears in the file
typeWordOne of number, integer, string, boolean, date, datetime, category, durationData type of the column
unitTextUnit every value in the column carries
roleWordOne of value, group, time, event, weight, id, covariate, x, y, se, lo, hi, label, strataWhat the figure uses the column for, such as an axis, a group or an event
rowsNumberWhole number, 0 or moreNumber of rows
missingPercent92% or 0.92Share of rows with no value
levelsList of labelsCategory levels, in the order they should be drawn
valuesList of numbersThe column inline, for a figure small enough to carry its data
minNumberSmallest value
maxNumberLargest value
meanNumberMean value
sdNumberAt least 0Standard deviation
transformWordOne of none, log, log10, log2, logit, sqrt, z_score, rank, standardiseTransform applied to the values
descriptionTextWhat the column holds
derivedExpressionWritten = …Expression computing this column from others

Figure presentation

How a figure is drawn and described: axes, scales, palettes, captions, legends and alt text.

axis — Axis. One axis — its scale, domain, ticks, and whether it includes zero. Takes an id.

AttributeTypeRulesMeaning
ofBlock idThe view or panel this axis belongs to
sideWordOne of left, right, top, bottomWhich side the axis is on
labelTextAxis label. A unit belongs here or in unit, never nowhere
unitTextUnit of the axis
scaleWordOne of the scale typesScale type
minNumberDomain lower bound
maxNumberDomain upper bound
baseNumberAt least 1Log base (default 10)
exponentNumberExponent for a power scale
thresholdNumberAt least 0Linear-region width for a symlog scale
ticksNumberWhole number, 0 or moreTarget tick count
tick_valuesList of numbersExact ticks, when the automatic ones are wrong
tick_labelsList of labelsLabels for tick_values
tick_formatTextNumber format for tick labels
tick_rotationNumberFrom -90 to 90Tick-label rotation in degrees
zerotrue/falseInclude zero in the domain. A truncated bar axis misleads; say so deliberately
nicetrue/falseRound the domain out to tick boundaries
gridtrue/falseDraw grid lines
reversetrue/falseReverse the axis direction
paddingNumberFrom 0 to 0.5Band padding as a fraction of the step
breaktrue/falseThe axis is broken — which must be marked on the figure itself
null_lineNumberWhere the line of no effect is drawn — 1 on a log ratio axis
titleTextAxis title

scale — Scale. A named value-to-position or value-to-colour mapping, reusable across panels. Takes an id.

AttributeTypeRulesMeaning
typeWordOne of the scale typesScale type
ofBlock idThe view or panel the scale belongs to
domainList of numbersInput range — [0, 100]
categoriesList of labelsOrdinal domain, for a band or point scale
rangeList of numbersOutput range in figure units
paletteWordPalette id, or the id of a palette block, for a colour scale
clamptrue/falseClamp values to the range
baseNumberAt least 1Log base
exponentNumberExponent for a power scale
thresholdNumberAt least 0Linear-region width for a symlog scale
centerNumberMidpoint of a diverging scale — 0 for a difference, 1 for a ratio
binsNumberWhole number, 1 or moreNumber of bins
thresholdsList of numbersExplicit bin thresholds
nicetrue/falseRound the domain out to tick boundaries
reversetrue/falseReverse the scale
paddingNumberFrom 0 to 0.5Band padding as a fraction of the step
unitTextUnit of the scale
labelTextLabel for the scale

palette — Palette. The colour set a figure uses, and the redundant channel that keeps it readable without colour. Takes an id.

AttributeTypeRulesMeaning
nameWordOne of the built-in palettesA built-in palette
kindWordOne of qualitative, sequential, divergingqualitative, sequential, diverging
colorsList of labelsExplicit hex colours, overriding name
coloursList of labelsBritish spelling of colors; either is accepted
nNumberWhole number from 1 to 24How many colours are needed
reversetrue/falseReverse the colour order
forWordWhat the palette is applied to — a series, a group, a scale
centerNumberData value the neutral midpoint sits at
redundantWordOne of shape, dash, hatch, label, position, size, noneThe non-colour channel carrying the same distinction — what makes the figure survive colourblindness and a greyscale printer
cvd_safetrue/falseAsserted safe under protanopia/deuteranopia/tritanopia
greyscale_safetrue/falseAsserted to stay distinguishable in greyscale
sourceTextWhere the colours come from, if they are not a built-in

caption — Caption. The figure caption — including the error-bar and sample-size statements a journal requires. The id is optional.

AttributeTypeRulesMeaning
textTextThe caption a journal will typeset
ofBlock idThe view, panel or figure being captioned
titleTextBold lead sentence, where the house style wants one
numberTextFigure number as printed — 1, S3
panelWordPanel letter, for a per-panel caption
leadTextLead sentence
abbreviationsTextExpansions a caption is required to carry
statisticsTextWhat the error bars and asterisks mean — the commonest caption omission
n_statementTextWhat n is and what it counts
sourceTextData source or credit line
styleWordOne of journal, plain, structuredCaption style

legend — Legend. The figure key — or the decision to label the marks directly instead. The id is optional.

AttributeTypeRulesMeaning
ofBlock idThe view or panel the legend belongs to
titleTextLegend title
positionWordOne of top, bottom, left, right, inside, noneWhere the legend goes
orientationWordOne of horizontal, verticalLegend direction
itemsList of labelsEntries, in the order they should read
symbolWordOne of swatch, line, marker, patch, gradientWhat each legend entry shows
columnsNumberWhole number, 1 or moreNumber of legend columns
showtrue/falseSet false when the series are labelled directly — usually the better figure
paletteWordPalette the legend uses
direct_labelstrue/falseLabel the marks themselves instead of drawing a key

alt — Alt text. The alternative text a screen reader reads and most journals now require. The id is optional.

AttributeTypeRulesMeaning
textTextShort alternative text — what the figure shows, not that it is a figure
ofBlock idThe view, panel or figure the text describes
longTextLong description for a figure a sentence cannot carry
summaryTextThe finding in one sentence
trendTextDirection and magnitude, for a chart
langTextBCP 47 language tag, when it is not the document's
decorativetrue/falseGenuinely conveys nothing — rare, and almost never true of a data figure

Attribution

Who wrote the figure, what it cites, who paid for it and how it may be reused.

cite — Citation. A reference the figure depends on — the paper, dataset or software behind a number. Takes an id.

AttributeTypeRulesMeaning
keyTextCitation key — smith2020
titleTextTitle of the work
authorsTextAuthor list as it should print
journalTextJournal
yearNumberWhole number from 1400 to 2200Year
volumeTextVolume
issueTextIssue
pagesTextPages
doiTextDOI
pmidTextPubMed id
urlTextWeb address
publisherTextPublisher
accessedTextDate accessed
typeWordOne of article, preprint, book, chapter, dataset, software, report, thesis, webpage, guidelineKind of work
ofBlock idWhat this citation supports
noteTextA note on the citation

author — Author. One author of the figure, with their ORCID and CRediT role. Takes an id.

AttributeTypeRulesMeaning
nameTextName as it should print
orcidTextORCID iD
affiliationTextAffiliation
emailTextEmail
correspondingtrue/falseCorresponding author
orderNumberWhole number, 1 or morePosition in the byline
equal_contributiontrue/falseContributed equally
roleWordOne of conceptualization, data_curation, formal_analysis, funding_acquisition, investigation, methodology, project_administration, resources, software, supervision, validation, visualization, writing_original_draft, writing_review_editingCRediT taxonomy role
contributionTextContribution in prose, when CRediT is too coarse

funding — Funding. Who paid for the work, and what part they played in it. Takes an id.

AttributeTypeRulesMeaning
funderTextFunder name
grantTextGrant or award number
recipientWordThe author who holds it
doiTextFunder DOI from the Open Funder Registry
amountQuantityAmount, with its currency
roleWordOne of design, collection, analysis, interpretation, writing, decision_to_publish, noneThe funder's role in the work — journals require this stated, including when it is none
statementTextFunding statement as it should print
ofBlock idWhat the funding supports

licence — Licence. The licence the figure is released under, and how it should be credited. The id is optional.

AttributeTypeRulesMeaning
spdxTextSPDX identifier — CC-BY-4.0
nameTextLicence name
urlTextLicence text address
holderTextCopyright holder
yearNumberWhole number from 1400 to 2200Copyright year
reuseWordOne of cc_by, cc_by_sa, cc_by_nc, cc_by_nc_sa, cc_by_nd, cc_by_nc_nd, cc0, public_domain, all_rights_reserved, customReuse terms
statementTextLicence statement as it should print
ofBlock idWhat the licence covers
attributionTextHow reusers should credit the figure

Machine learning and evaluation

Models, datasets, evaluations, ablations and the protocol, compute, search and model-card statements a machine-learning report needs.

model — Model. A model being evaluated. Takes an id.

AttributeTypeRulesMeaning
titleTextModel name
paramsNumberNumber of parameters
familyTextModel family

dataset — Dataset. A dataset: an evaluation split, or a data file with where it came from, its licence and its availability. Takes an id. Data binding uses it too: see Data binding.

AttributeTypeRulesMeaning
titleTextDataset name
nNumberNumber of records
splitTextWhich split this is, such as train or test
pathTextRelative path to the data file
urlTextWhere the data can be fetched or cited from
doiTextDOI of the deposited dataset
formatWordcsv, tsv, json, ndjson, parquet, xlsx, inline
delimiterTextField separator, when it is not the format default
headertrue/falseFirst row holds column names
rowsNumberRow count. Checked against the rows bound on the Data bench
columnsNumberColumn count. Checked against the rows bound on the Data bench
hashTextContent digest of the data file
licenceTextLicence the data is released under
accessedTextDate the data was retrieved
citationTextHow the data should be cited
availabilityTextData-availability statement — open, on-request, restricted, plus the conditions
descriptionTextWhat the data are
inlineTextThe data itself, for a figure small enough to carry it

eval — Evaluation. One model's score on one dataset. Takes an id. Read by the ablation_table view.

AttributeTypeRulesMeaning
modelBlock idRequiredThe model evaluated
datasetBlock idRequiredThe dataset it was evaluated on
metricTextRequiredMetric name
scoreNumberThe score
ciList of block idsInterval, as a list

ablation — Ablation. One change from a baseline evaluation, and what it did to the metric. Takes an id. Read by the ablation_table view.

AttributeTypeRulesMeaning
baseBlock idThe eval this ablation is compared against
deltaNumberChange in the metric. A missing delta is read as zero
changeTextWhat was removed or changed

ml_protocol — ML evaluation protocol. How a machine-learning evaluation was actually run — task, seeds, metric definition, preprocessing, leakage checks and where the code is. Takes an id.

AttributeTypeRulesMeaning
taskTextWhat the model was asked to do — the task, the label space, the unit of prediction
seedsList of numbersThe random seeds actually used. Without them the reported runs cannot be reproduced and the spread across seeds cannot be read back
metric_definitionTextHow the headline metric is computed and what its interval is over — a bootstrap over test items is not the spread across seeds
preprocessingTextThe preprocessing and augmentation, and — the part that decides whether the number means anything — which split its constants were fitted on
deduplicationTextHow overlap between the splits was checked and what was found. The answer to "did the test set leak"
codeTextWhere the code and configuration are, at which tag or commit
compute_noteTextPointer to the compute figures when they live in an ml_compute block

ml_compute — Compute cost. What the experiments cost to run — hardware, accelerator hours, the total number of runs, and the energy. Takes an id.

AttributeTypeRulesMeaning
hardwareTextThe accelerators, how many of them, and the software stack
accelerator_hoursNumberAt least 0Total accelerator hours, or the wall-clock time the runs took
total_runsNumberWhole number, 0 or moreEvery run, including the ones discarded in development that appear nowhere in the results
energyTextEnergy consumed, and whether it was measured or estimated
noteTextWhat the run count is made of — search trials, seed replicates, discarded runs

ml_search — Hyperparameter search. The hyperparameter search behind a reported configuration — the space, the budget, and how the winner was picked. Takes an id.

AttributeTypeRulesMeaning
spaceTextThe ranges and options searched over
trialsNumberWhole number, 0 or moreHow many configurations were actually trained. The best of 200 and the best of 2 are not the same claim
selection_metricTextThe criterion the winning configuration was chosen on
selection_splitBlock idThe dataset split the selection happened on. Naming a split the document does not declare is the leakage this item exists to catch
chosenTextThe configuration the reported numbers actually use
noteTextAnything else the reader needs — per-model budgets, when the test split was first read

model_card — Model card. What a clinical prediction model or AI system is for and who it is not for — intended use, ground truth, oversight, monitoring. Takes an id.

AttributeTypeRulesMeaning
ofBlock idThe model this card describes
versionTextThe version of the model this card is about
intended_useTextWhat the model is for, at which decision point, and how its output is meant to be acted on
out_of_scope_useTextUses the model is not validated for and must not be put to
target_populationTextThe population the model was developed and validated in, and who falls outside it
usersTextWho is expected to read the output and act on it
ground_truthTextHow the reference labels were defined, and against what standard
annotationTextWho annotated the data, how many annotators, and their agreement
fairnessTextWhich groups performance was examined in, and what was found. The per-group numbers belong in subgroup blocks; this frames them
human_oversightTextWhat a human does with the output, and what happens when they disagree with it
monitoringTextWhat is monitored after deployment, how often, and what triggers a review
updatingTextWhen and how the model is retrained or recalibrated, and how a change is communicated
caveatsTextKnown failure modes, and the caveats a reader must carry away

Biology and laboratory

Laboratory experiments, samples, conditions, assays and the animals a study used.

experiment — Experiment. A laboratory experiment and the model system it uses. Takes an id. Typical children: sample, condition, assay, view, note. Read by the experiment_flow view.

AttributeTypeRulesMeaning
titleTextExperiment title
modelTextThe model system, such as a cell line or organism

sample — Sample. A sample and its replicates. Takes an id. Read by the experiment_flow view.

AttributeTypeRulesMeaning
nNumberNumber of samples
replicatesNumberReplicates per sample
fromBlock idThe block this sample was drawn from

condition — Condition. One experimental condition: what, how much and for how long. Takes an id. Read by the experiment_flow view.

AttributeTypeRulesMeaning
titleTextCondition name
doseTextDose, as written
durationTextDuration, as written

assay — Assay. An assay and what it reads out. Takes an id. Read by the experiment_flow view.

AttributeTypeRulesMeaning
kindTextKind of assay
readoutTextWhat the assay reads out

animal — Animals. The animals a study used — species, strain, sex, age, provenance, health and genetic status, and what they had already been through. Takes an id. Read by the experiment_flow view.

AttributeTypeRulesMeaning
speciesTextThe species, ideally as the binomial — Mus musculus
strainTextStrain and substrain exactly as published — C57BL/6JRj
sexTextSex, and the split between the sexes when both were used
ageTextAge or developmental stage when the procedures began
weightTextWeight or weight range at the start, where it is relevant — 18 to 22 g
provenanceTextWhere the animals came from — supplier or in-house colony — and any acclimatisation before the work began
health_statusTextHealth, immune or microbiological status, with the screening behind the claim — specific-pathogen-free
genetic_statusTextGenetic modification status and genotype, or that the animals were wild-type
previous_proceduresTextAny procedure these animals had already undergone, or that they were naive

Surveys and qualitative research

Survey instruments and qualitative coding trees with their quotations.

instrument — Survey instrument. A survey instrument: who it is for, how it is administered and in what language. Takes an id. Typical children: construct, item, view, note. Read by the item_map view.

AttributeTypeRulesMeaning
titleTextRequiredInstrument title
audienceTextWho the instrument is for
modeTextweb, phone, paper, sms
languageTextLanguage of the instrument

construct — Construct. A latent concept that a set of items measures. Takes an id. Read by the item_map view.

AttributeTypeRulesMeaning
nameTextRequiredLatent concept the items measure
definitionTextOperational definition
referenceTextCitation if borrowed from a published scale

item — Item. One survey question, the construct it measures and its response scale. Takes an id. Read by the item_map view.

AttributeTypeRulesMeaning
textTextRequiredQuestion text as the respondent reads it
constructBlock idConstruct this item measures
scaleTextlikert-5, likert-7, binary, multi, open
reversetrue/falseTrue if scoring is inverted

theme — Theme. One node of a qualitative coding tree — its label, its coding definition, and the parent theme it sits under. Takes an id. Read by the theme_map view.

AttributeTypeRulesMeaning
labelTextThe theme as it should read, in the participants' own terms
descriptionTextThe definition a second coder would apply — what distinguishes this theme from its siblings
ofBlock idThe parent theme this is a sub-theme of. A sub-theme with no parent is a root theme; a sub-theme whose parent is misspelt is now an error rather than a silently orphaned root
majortrue/falseThis is a major theme rather than a sub-theme of another

quotation — Participant quotation. A verbatim participant quotation, who said it, and the theme it is offered as evidence for. Takes an id. Read by the theme_map view.

AttributeTypeRulesMeaning
textTextThe quotation verbatim, exactly as the participant said it
participantTextThe participant identifier it is attributed to — P04
ofBlock idThe theme this quotation grounds. A theme with no quotation attached rests on nothing a reader can see

Project management

Projects, tasks, milestones and sprints.

project — Project. A project with its dates and owner. Takes an id. Typical children: milestone, task, sprint, view, note. Read by the gantt view.

AttributeTypeRulesMeaning
titleTextProject title
startTextStart date (YYYY-MM-DD)
endTextEnd date (YYYY-MM-DD)
ownerTextWho owns the project

milestone — Milestone. A dated milestone. Takes an id. Read by the gantt view.

AttributeTypeRulesMeaning
dateTextRequiredMilestone date (YYYY-MM-DD)
titleTextMilestone name
statusTextplanned, at-risk, done

task — Task. A task with dates, dependencies and an assignee. Takes an id. Read by the gantt view.

AttributeTypeRulesMeaning
titleTextRequiredTask name
startTextStart date (YYYY-MM-DD)
endTextEnd date (YYYY-MM-DD)
dependsList of block idsTasks this one waits for, as [task_a, task_b]
assigneeTextWho does the task
statusTextTask status

sprint — Sprint. A sprint with its dates and points. Takes an id.

AttributeTypeRulesMeaning
startTextSprint start date
endTextSprint end date
pointsNumberStory points in the sprint

Engineering and architecture

Systems, services, datastores and actors for architecture views.

system — System. A software system and its owner. Takes an id. Typical children: service, datastore, actor, view, note. Read by the c4_container view.

AttributeTypeRulesMeaning
titleTextSystem name
ownerTextWho owns the system

service — Service. A service inside a system, with what it depends on. Takes an id. Read by the c4_container view.

AttributeTypeRulesMeaning
titleTextService name
runtimeTextRuntime or language
dependsList of block idsServices, datastores or actors this one calls, as a list of ids
tierTextWhich row it sits in: edge or frontend, core or backend, or data

datastore — Datastore. A database, cache or store. Takes an id. Read by the c4_container view.

AttributeTypeRulesMeaning
kindTextKind of store, such as postgres, redis or s3
titleTextDatastore name

actor — Actor. A user or external system that interacts with the system. Takes an id. Read by the c4_container view.

AttributeTypeRulesMeaning
titleTextActor name
kindTextuser, external system, scheduler
dependsList of block idsThe containers this actor uses, one arrow each in the c4_container view

Business and strategy

Initiatives, KPIs, customer segments and conversion funnels.

initiative — Initiative. A business initiative with an owner and horizon. Takes an id. Typical children: kpi, segment, view, note. Read by the okr_grid view.

AttributeTypeRulesMeaning
titleTextInitiative name
ownerTextWho owns the initiative
horizonTextTime horizon, such as a quarter

kpi — KPI. A key performance indicator with a baseline and target. Takes an id. Read by the okr_grid view.

AttributeTypeRulesMeaning
titleTextRequiredKPI name
baselineNumberStarting value
targetNumberTarget value
unitTextUnit of the KPI

segment — Customer segment. A customer segment with its size and contract value. Takes an id. Read by the okr_grid view.

AttributeTypeRulesMeaning
titleTextSegment name
sizeNumberNumber of customers in the segment
acvNumberAnnual contract value

funnel_step — Funnel step. One step of a conversion funnel and how many reached it. Takes an id. Read by the funnel view.

AttributeTypeRulesMeaning
nNumberRequiredHow many reached this step
fromBlock idThe previous step
titleTextStep name

Finance

Cap tables, shareholders, option pools and funding rounds.

cap_table — Cap table. A company's capitalisation table. Takes an id. Typical children: shareholder, round, option_pool, view, note. Read by the captable view.

AttributeTypeRulesMeaning
currencyTextISO 4217 — USD, EUR, GBP, NGN…
titleTextCap table title
formedTextDate the company / cap table was formed

shareholder — Shareholder. A holder of shares, their class and their role. Takes an id. Read by the captable view.

AttributeTypeRulesMeaning
nameTextRequiredShareholder name
sharesNumberRequiredCommon / preferred share count
classTextcommon, preferred, seed, series-a …
roleTextfounder, employee, investor, advisor

option_pool — Option pool. An employee option pool and how much of it is granted. Takes an id. Read by the captable view.

AttributeTypeRulesMeaning
sharesNumberRequiredAuthorised pool size
grantedNumberShares already granted (default 0)
labelTextLabel for the pool

round — Funding round. A funding round: how much was raised, at what valuation and from whom. Takes an id. Read by the captable view.

AttributeTypeRulesMeaning
nameTextRequiredSeed, Series A, Bridge…
raiseNumberRequiredCash raised in this round
pre_moneyNumberPre-money valuation
leadTextLead investor name
dateTextRound date

Security (threat modelling)

STRIDE and LINDDUN threat models.

threat_model — Threat model. A threat model and the framework it follows. Takes an id. Typical children: asset, threat, control, view, note. Read by the risk_matrix view.

AttributeTypeRulesMeaning
frameworkTextSTRIDE, LINDDUN, PASTA, custom
titleTextThreat model title
scopeTextWhat is in scope

asset — Asset. Something worth protecting, and why. Takes an id.

AttributeTypeRulesMeaning
nameTextRequiredAsset name
valueTextWhy it matters: PII, IP, revenue path…
classificationTextpublic, internal, confidential, restricted

threat — Threat. A threat to an asset, rated for likelihood and impact. Takes an id. Read by the risk_matrix view.

AttributeTypeRulesMeaning
titleTextRequiredThreat name
assetBlock idAsset this threatens
categoryTextspoofing, tampering, repudiation, info-disclosure, dos, elevation
likelihoodNumber1 (rare) → 5 (almost certain)
impactNumber1 (negligible) → 5 (severe)

control — Control. A control that reduces one or more threats. Takes an id. Read by the risk_matrix view.

AttributeTypeRulesMeaning
titleTextRequiredControl name
mitigatesList of block idsThreats this control reduces
typeTextpreventive, detective, corrective
coverageNumber0..1 — fractional reduction in likelihood
ownerTextWho owns the control

Reliability (FMEA)

Failure mode and effects analysis.

fmea — FMEA. A failure mode and effects analysis. Takes an id. Typical children: failure_mode, mitigation, view, note. Read by the fmea_table view.

AttributeTypeRulesMeaning
titleTextRequiredFMEA title
systemTextSystem / process being analysed
teamTextTeam that ran the analysis
revisionTextRevision

failure_mode — Failure mode. One way a component fails, rated for severity, occurrence and detection. Takes an id. Read by the fmea_table view.

AttributeTypeRulesMeaning
componentTextRequiredThe component that fails
modeTextRequiredHow it fails
causeTextWhy it fails
effectTextDownstream effect
severityNumber1 (negligible) → 10 (catastrophic)
occurrenceNumber1 (very rare) → 10 (very frequent)
detectionNumber1 (always caught) → 10 (never caught)

mitigation — Mitigation. An action against a failure mode and the ratings it aims for. Takes an id. Read by the fmea_table view.

AttributeTypeRulesMeaning
modeBlock idRequiredFailure mode this addresses
actionTextRequiredWhat is done about it
ownerTextWho does it
target_severityNumberSeverity after the mitigation
target_occurrenceNumberOccurrence after the mitigation
target_detectionNumberDetection after the mitigation

Supply chain

Supply-chain networks.

supply_chain — Supply chain. A supply chain for one product. Takes an id. Typical children: sc_node, sc_link, view, note. Read by the supply_map view.

AttributeTypeRulesMeaning
productTextRequiredThe product that flows through the chain
currencyTextCurrency, as an ISO 4217 code such as USD, EUR or GBP
titleTextChain title

sc_node — Supply node. A supplier, factory, warehouse, distributor or customer. Takes an id. Read by the supply_map view.

AttributeTypeRulesMeaning
nameTextRequiredNode name
roleTextsupplier, factory, warehouse, customer
locationTextWhere the node is
capacityNumberUnits per period

sc_link — Supply link. A link between two nodes with its lead time, cost and transport mode. Takes an id. Read by the supply_map view.

AttributeTypeRulesMeaning
fromBlock idRequiredUpstream node
toBlock idRequiredDownstream node
lead_time_daysNumberLead time in days
cost_per_unitNumberCost per unit moved
modeTexttruck, rail, sea, air

Education

Assessment rubrics.

rubric — Rubric. An assessment rubric. Takes an id. Typical children: criterion, level, view, note. Read by the rubric_grid view.

AttributeTypeRulesMeaning
titleTextRequiredRubric title
courseTextCourse
assignmentTextAssignment
authorTextWho wrote the rubric

criterion — Criterion. One criterion of a rubric and its weight. Takes an id. Read by the rubric_grid view.

AttributeTypeRulesMeaning
nameTextRequiredCriterion name
weightNumberRelative weight (e.g. 0.25)
descriptionTextWhat the criterion assesses

level — Performance level. One performance level of a criterion and the points it earns. Takes an id. Read by the rubric_grid view.

AttributeTypeRulesMeaning
criterionBlock idRequiredThe criterion this level belongs to
labelTextRequiredEmerging, Developing, Proficient, Exemplary
pointsNumberScore awarded at this level
descriptorTextWhat this level looks like

Agreements, parties, clauses and obligations.

agreement — Agreement. A contract or agreement. Takes an id. Typical children: party, clause, obligation, view, note. Read by the clause_map view.

AttributeTypeRulesMeaning
titleTextRequiredAgreement title
typeTextKind of agreement, such as NDA, SaaS, DPA, MSA or employment
governing_lawTextGoverning law
effectiveTextEffective date

party — Party. A party to the agreement. Takes an id. Read by the clause_map view.

AttributeTypeRulesMeaning
nameTextRequiredParty name
roleTextbuyer, seller, licensor, licensee, discloser, recipient
jurisdictionTextJurisdiction

clause — Clause. A clause and the party it mainly affects. Takes an id. Read by the clause_map view.

AttributeTypeRulesMeaning
titleTextRequiredClause title
typeTextobligation, right, condition, warranty, covenant
partyBlock idParty primarily affected
summaryTextPlain-language summary
sectionTextSection number, such as 3.2.1

obligation — Obligation. Something a party must do, by when, and what happens if it does not. Takes an id. Read by the clause_map view.

AttributeTypeRulesMeaning
partyBlock idRequiredThe party that owes the obligation
actionTextRequiredWhat must be done
deadlineTextWhen
penaltyTextConsequence of missing it

Free-form 2D figures

Free-form 2D schematics drawn from shapes, labels, arrows and callouts.

figure — Figure (2D). Free-form 2D schematic — physics figures, anatomy, optics, custom diagrams. Takes an id. Typical children: shape, label_2d, group_2d, arrow_2d, annotation, view, note. Read by the figure view.

AttributeTypeRulesMeaning
titleTextFigure title
widthNumberDrawing width
heightNumberDrawing height
backgroundTextBackground colour, hex or named

shape — Shape. A shape in a 2D figure. The id is optional. Read by the figure view.

AttributeTypeRulesMeaning
kindTextrect, circle, ellipse, triangle, polygon, line, path
xNumberHorizontal position (drag the shape on the canvas to change it)
yNumberVertical position (drag the shape on the canvas to change it)
wNumberWidth
hNumberHeight
rNumberRadius (circles) or corner radius (rects)
pointsList of block ids[x1, y1, x2, y2, ...] for polygons / paths
fillTextFill colour, hex or named
strokeTextOutline colour, hex or named
strokeWidthNumberOutline width
dashedtrue/falseDraw the line dashed
labelTextText drawn on the shape
labelPosTextcenter, top, bottom, left, right
rotateNumberRotation in degrees around centre

label_2d — Label (2D). A text label in a 2D figure. The id is optional. Read by the figure view.

AttributeTypeRulesMeaning
textTextRequiredThe text
xNumberRequiredHorizontal position
yNumberRequiredVertical position
anchorTextstart, middle, end
sizeNumberText size
weightTextnormal, bold
colorTextColour, hex or named
rotateNumberRotation in degrees

arrow_2d — Arrow (2D). An arrow between two shapes or two points. The id is optional. Read by the figure view.

AttributeTypeRulesMeaning
fromBlock idShape or group the arrow starts at
toBlock idShape or group the arrow ends at
x1NumberStart x, when not using from
y1NumberStart y, when not using from
x2NumberEnd x, when not using to
y2NumberEnd y, when not using to
labelTextText on the arrow
colorTextColour, hex or named
dashedtrue/falseDraw the line dashed
headTextend, both, none

group_2d — Group (2D). A group of 2D elements moved, rotated or scaled together. Takes an id. Typical children: shape, label_2d, arrow_2d, annotation, group_2d. Read by the figure view.

AttributeTypeRulesMeaning
xNumberHorizontal position
yNumberVertical position
rotateNumberRotation in degrees
scaleNumberScale factor for everything in the group

annotation — Annotation callout. A callout pointing at another element. The id is optional. Read by the figure view.

AttributeTypeRulesMeaning
targetBlock idThe block the callout points at
textTextRequiredCallout text
offsetXNumberHorizontal offset from the target
offsetYNumberVertical offset from the target
styleTextfootnote, margin, inline, significance

3D and isometric scenes

Isometric 3D scenes drawn from boxes, spheres, cylinders, planes, edges and labels.

scene — Scene (3D / isometric). 3D scene rendered via isometric projection — molecules, lattices, geometric proofs. Takes an id. Typical children: box3d, sphere3d, cylinder3d, plane3d, label3d, edge3d, view, note. Read by the scene view.

AttributeTypeRulesMeaning
titleTextScene title
projectionTextisometric, dimetric, orthographic
widthNumberDrawing width
heightNumberDrawing height
gridtrue/falseShow ground grid
axestrue/falseShow x/y/z axes

box3d — Box (3D). A box in a 3D scene. The id is optional. Read by the scene view.

AttributeTypeRulesMeaning
xNumberHorizontal position
yNumberVertical position
zNumberDepth position
wNumberWidth
hNumberHeight
dNumberDepth along z
fillTextFill colour, hex or named
strokeTextOutline colour, hex or named
labelTextText on the box

sphere3d — Sphere (3D). A sphere in a 3D scene. The id is optional. Read by the scene view.

AttributeTypeRulesMeaning
xNumberHorizontal position
yNumberVertical position
zNumberDepth position
rNumberRadius
fillTextFill colour, hex or named
strokeTextOutline colour, hex or named
labelTextText on the sphere

cylinder3d — Cylinder (3D). A cylinder in a 3D scene. The id is optional. Read by the scene view.

AttributeTypeRulesMeaning
xNumberHorizontal position
yNumberVertical position
zNumberDepth position
rNumberRadius
hNumberHeight
fillTextFill colour, hex or named
strokeTextOutline colour, hex or named
labelTextText on the cylinder

plane3d — Plane (3D). A flat plane in a 3D scene. The id is optional. Read by the scene view.

AttributeTypeRulesMeaning
xNumberHorizontal position
yNumberVertical position
zNumberDepth position
wNumberWidth
dNumberDepth
fillTextFill colour, hex or named
strokeTextOutline colour, hex or named

edge3d — Edge (3D bond / strut). A bond or strut between two 3D primitives. The id is optional. Read by the scene view.

AttributeTypeRulesMeaning
fromBlock idPrimitive the edge starts at
toBlock idPrimitive the edge ends at
colorTextColour, hex or named
widthNumberLine width
dashedtrue/falseDraw the line dashed

label3d — Label (3D). A text label placed in a 3D scene. The id is optional. Read by the scene view.

AttributeTypeRulesMeaning
textTextRequiredThe text
xNumberHorizontal position
yNumberVertical position
zNumberDepth position
colorTextColour, hex or named
sizeNumberText size

Messages reference

Every message appears in the editor as an underline on the characters at fault and in the status badge's Validation list, worst first. Click an entry in the list to jump to its line. An error is something wrong that you must fix, a warning is probably wrong, and a note is information. The Lab still draws what it can while errors remain, but the document does not count as passing until they are fixed, and the badge keeps counting them.

Reading the document

These come from reading the text itself. The first three stop the whole document being read, so nothing at all is drawn until they are fixed.

MessageCauseFix
"Unterminated string literal"A " with no closing " on the same lineClose the string on the line it starts
"Unterminated /* … */ block comment"A /* with no */Close the comment
"Unexpected character "/"" (or another character)A character the language does not use, often from a unit written in a form the Lab cannot read in an attributeSee Writing a unit; quote anything that is text
"Expected a block kind (e.g. "study", "cohort"), got "…""Something other than a word where a block should startStart each block with its kind
"Expected '{' to open block body, got "…""A kind and id with no {Add the braces
"Expected '}', got "eof""A block that is never closedAdd the missing }
"Unexpected token "…" inside block"Something in a block body that is neither name: value nor a nested blockCheck for a missing colon, a stray word, or a unit the Lab could not read
"Expected a value, got "…""A colon with nothing usable after itGive the attribute a value
"Unexpected token "…" inside object"An object entry that is not name: valueWrite each entry as name: value
"Unexpected token "…" in view arguments"Something other than an id, string or number in view v: r( … )Use ids, quoted strings or numbers
"An interval after a number must be written [lo, hi] or (lo to hi)."A bracket after a number that is not a valid intervalSeparate the bounds with , or to
"± must be followed by the uncertainty, e.g. 12.4 ± 0.8."± with no number after itAdd the half-width
"@ sets the coverage of an uncertainty and must follow one, e.g. 0.68 [0.51, 0.90] @ 90%."@ after a plain numberAdd the interval, or remove the coverage

When the parser hits a mistake it skips to the next block, so the blocks around a mistake still compile and are still drawn where possible.

The schema

MessageSeverityFix
"Block "cohort" should have an identifier (e.g. cohort my_id { … })."WarningGive the block an id
"Duplicate id "x" — every block id must be unique."ErrorRename one of them (F2)
"Attribute "x" is not part of the kind schema — it will be carried through as freeform data."WarningCheck the spelling against the reference; if the attribute is intentional, ignore the warning
"kind is missing required attribute name."ErrorAdd it
"child is not a typical child of parent (allowed: …)."WarningMove the block, or ignore if the nesting is intended
"key is 95, above the maximum of 1 — …" / "… below the minimum of 0 — …" (followed by the attribute's own description)ErrorUse the range the attribute expects; a coverage level is a fraction such as 0.95
"key is 12.5, and this is a count — counts are whole numbers. If this is a mean or a rate, it needs a different attribute."ErrorUse a whole number, or the attribute meant for a mean or rate
"key is x, which is not one of: …"ErrorUse one of the listed words
"key is in mmHg (pressure), but this attribute holds time — e.g. d."ErrorUse a unit of the right kind
"key is a proportion or percentage, so kg (mass) cannot be its unit. Write it as 3.2%, as a fraction, or with a ratio unit such as per 1000."ErrorWrite a percentage, fraction or ratio

References

MessageSeverityFix
"Reference x does not resolve — no block declared with id "x"."ErrorDeclare the block, or correct the id
"Reference a.b does not resolve — block "a" has nothing named b."ErrorCorrect the attribute name

Units

MessageSeverityFix
"Unit x on key is not recognised: … The number is kept; the unit is carried through as text."WarningUse a unit from the table
"… is outside the plausible range (…) — …"WarningCheck the value and unit; ignore it if the value really is unusual
"… is negative, and … is not. If this is a change or a difference, name it as one."WarningPut the unit in unit: for a difference measure
"A count of participants cannot be negative; got …"ErrorCorrect the count
"… participants is not a whole number — counts are integers, so this is probably a rate or a mean."WarningCorrect it, or use a rate unit
"A duration of … is negative — durations run forwards."ErrorCorrect the duration
"… is … K — below absolute zero, which is physically impossible."ErrorCorrect the temperature
"A proportion must lie in 0–1; got …"ErrorUse a fraction, or the % unit
"A p-value must lie in 0–1; got …"ErrorCorrect the p-value
"A p-value of exactly 0 is not attainable — report it as p < 0.001."NoteWrite the p-value as text
"… exceeds 100. A percentage of a whole cannot; …"WarningCorrect it, or label it as a relative change
"Unit mismatch: a is in … but b is in … — these do not measure the same thing."ErrorUse units of one kind in the numbers being compared
"Ambiguous scale: a is a plain … but b is in %. Give a a unit …"ErrorGive the plain number a unit

Uncertainty

See the table in What is checked in an estimate. Also:

MessageSeverityFix
"… the interval and the p-value disagree. … One of the two was copied from a different analysis."WarningCheck both against the source analysis
"… states its estimate twice and the two disagree: …"WarningKeep value or the separate parts, not both
"… was computed without the uncertainty of …"NoteWrite the estimate inline as value: … [lo, hi] if the interval should flow into the expression

Expressions

MessageSeverityFix
"Empty expression — there is nothing to compute."ErrorWrite the expression after =
"x does not resolve to a value — check the block id and attribute name."ErrorCorrect the path
"Circular definition: a → b → a. One of these has to be written out as a number."ErrorBreak the loop
"Use == to compare, not =."ErrorWrite ==
"Use not for negation, and != for inequality."ErrorReplace !
"Comparisons do not chain — write a < b and b < c instead."ErrorSplit the comparison
"foo is not a built-in function. Available: …"ErrorUse a built-in function
"name takes … arguments, got …."ErrorCorrect the number of arguments
"The field of an aggregate must be a quoted name, e.g. sum(kind:arm, "n")."ErrorQuote the field
"sum over blocks needs a field: sum(kind:arm, "n")."ErrorAdd the field
"Nothing matched over … so this total is 0. Check the selector."WarningCorrect the kind or id in the selector
"mean needs at least one value; nothing matched …"ErrorCorrect the selector
"Division by zero — guard the denominator, e.g. if(denom > 0, num / denom, 0)."ErrorGuard the denominator
"A percentage of zero is undefined — the denominator is 0.", "A ratio with a zero denominator is undefined.", "A rate with a zero population is undefined."ErrorGuard the denominator with if
"sqrt of a negative number (…) has no real value." / "ln requires a positive number, got …"ErrorCheck the input
"Cannot add mg and mL — …"ErrorCombine quantities of one kind
"The condition of if must be true or false, got a number — this language has no truthiness, write the comparison out."ErrorWrite a comparison
"Cannot compare … with …" / "< compares numbers, not text …"ErrorCompare like with like
"Cannot subtract these two estimates — …" (or add, multiply, divide)ErrorState the derived quantity as an estimate of its own
"median has no uncertainty algebra, so the result is a point estimate and the interval stops here. …"NoteNothing to fix; the interval is not carried
"key: = … did not produce a number."ErrorMake the expression produce a number
"key cannot be derived: key holds a truth value, but nothing reads the answer to a condition written there …"ErrorWrite true or false, or move the condition into a check
"Expression nests more than 64 levels deep." / "Expression is … characters; the limit is 20000."ErrorSimplify, or use an aggregate

Checks

See Checks. Violations are reported as "Check name: …" at the severity you set; a check that cannot be run is always an error.

Views

See View lines.

Arithmetic and data

See The arithmetic the Lab checks.


Editor support

The Lab's source editor understands FlowScript:

FeatureHow
HighlightingBlock kinds, numbers, strings, comments, true/false/null/source, and the operators ±, +/-, = and @
CompletionBlock kinds at the start of a line; a kind's attributes (required first) and typical children inside a block; renderers after view name:. Snippets seed the right notation: 0 [0, 0] for an estimate, 0 d for a duration, = sum(kind:arm, "n") for an expression
HoverA number's resolved value, interval and source; a block's numbers; a kind's attributes
Go to definition, find referencesF12, ⇧F12
RenameF2 on a block id
Format⇧⌥F: re-indents by braces, leaves strings, comments and in-line alignment alone, and does nothing while braces are unbalanced
Comments⌘/ toggles a line comment
Brackets{, [, ( and " close themselves

See Lab for the rest of the studio around the editor.


Tips

  • Start from a template or the Insert flyout. They write the required attributes and the right notation for you.
  • Write ids in snake_case. Letters, digits and underscores keep ids usable in expressions and renameable with F2.
  • Give every flow box an excluded object. The Lab can then prove the flow balances at every step, and the CONSORT figure prints the reasons.
  • Derive what you can. n: = randomised.n - excluded.withdrew and rate: = events / n * 100 cannot drift from the counts.
  • Write estimates inline (value: 0.68 [0.51, 0.90]) when other values are computed from them, so the interval flows through.
  • Put a difference measure's unit in unit:, not on the number, to keep plausibility ranges for absolute values off a change.
  • Use measure: on every estimate. It decides the scale; a ratio measure on the identity scale has a symmetric interval, which is wrong.
  • Turn house rules into check blocks with a clear else: that quotes the number, so the message says what to fix.
  • Record sources on numbers you copied from tables (source "Table 2"), so Provenance can account for them.

Limits and known constraints

  • A string must fit on one line; use \n for a line break inside text.
  • In an attribute value, a unit cannot contain a comma (per 100,000), a space before a word (fl oz, per 1000 py) or a hyphenated name (person-years). Use per 100000, floz, py.
  • % inside an expression is the remainder operator; write 12[%].
  • Only objects one level deep are lifted into numbers you can reference (a.control.events), not objects inside objects, and not list elements.
  • An expression must produce a number, except in check's that:. A path in an expression reads numbers and text, not true/false attributes.
  • Uncertainty flows only from inline estimates, only through +, -, *, /, ^, ln, exp, sum and mean, and not through aggregates over a selector.
  • The p-value check against an estimate's interval runs only for estimates written with separate point, lo, hi or se.
  • In the block form of a view, renderer: must be a quoted string; a bare word is not read and the view falls back to the CONSORT renderer.
  • level: 95 on a block is an error; write level: 0.95. Inside an inline estimate, @ 95 is read as 95%.
  • Only chi-squared and Fisher's exact tests are recomputed from counts.
  • The line numbers in messages are recomputed on every change, so they always match the text. Comment threads are different: they are anchored to a line number, so editing above a commented line moves the text under the comment without moving the comment.

Troubleshooting

SymptomLikely causeWhat to do
Nothing draws and the badge shows one error at a quote markAn unclosed stringClose the " on the same line
"Unexpected token" errors after a number with a unitA unit form the attribute cannot read (comma, hyphen, two words)Rewrite it (per 100000, py, floz)
An arithmetic inconsistency you cannot seeA typo in an exclusion count, or a missing excluded entryThe message prints the parent, the excluded sum and the child; add or correct the entry
A derived value shows "not resolved" on hoverIts expression has an errorRead the message on the expression; usually a misspelt path
A check you believe in failsThe selector matched nothing (look for the "Nothing matched" warning), or a misspelt kindCorrect the selector
A view draws the wrong figureA block-form view with renderer: written as a bare wordQuote it: renderer: "forest"
A view draws an empty figureIts argument names no block, or the blocks it needs are missingRead the warning; see Lab views and renderers
level above the maximumA coverage written as a percentageWrite level: 0.95
A unit warning on a mean differenceThe unit on a change triggered an absolute-value rangeMove the unit to unit:
"Ambiguous scale"A plain number beside a %Give it a unit
F2 refuses to renameThe new id is taken, invalid (hyphens are not allowed) or the document does not compileChoose another id or fix the errors first

Something unclear or out of date on this page? Tell us from the Support link in any studio — the flowss team reads every report.

© 2026 Voranox Inc. flowss — Flow Systems Studio. All rights reserved.

This documentation, its text and its examples are protected by copyright. Engine and format names are trademarks of their respective owners — see the terms and copyright and licences.