Workbooks and nodes

A workbook is YAML; each node is an ordered list of steps that produces one table.

A workbook is a YAML file with three top-level keys:

title: Where does Yerevan need more shade?   # optional
params:                                       # optional: controls on the dashboard
  threshold: { default: 45, min: 30, max: 60, label: "Hot above, °C" }
nodes:                                        # the work itself
  surface:
    series: { layer: land_surface, area: AM01, from_date: "2024-06-01" }
  cells:
    from: surface
    aggregate: { by: [code, community], heat: median(lst_c) }
  hot:
    from: cells
    filter: heat > threshold
  where:
    map: { from: cells, level: cell, area: AM01, color: heat }

Nodes

Each entry under nodes is a node: a name (letters, digits and _, starting with a letter) and an ordered mapping of steps. The output of a node is a table — named columns and rows — that later nodes read by name.

  • The first step reads data: series, regions, from, join, or a code step.
  • Every later step changes the table: keep rows, keep or rename columns, compute new ones, summarise, resample, score, sort.
  • A chart or map step, always last, says how the node is drawn.

Steps run top to bottom, so order matters.

How nodes run

A node’s inputs come from its steps — from, join, a chart’s or map’s from, or node names used in its code — and the Lab runs nodes in an order where every node comes after its inputs. A node that reads itself, or nodes that read each other in a loop, are rejected.

Declarative steps run on Ridgital’s servers. Code steps (Python and TypeScript) run in your browser. When a node fails, the nodes that read it are skipped, and the rest still run.

The Graph view

The Graph view draws the nodes as boxes in columns, by depth, with a line from each node to the nodes that read it, and shows the parameters as controls.

Click a node to open it full screen and trace it:

  • its steps, to edit — or, for a Python or TypeScript node, its code, with completion for that language;
  • Reads from: the nodes it reads, each with its output from the last run;
  • Output: what it produces;
  • Read by: the nodes that read it.

Any node name is a link to that node. Run runs the draft with your change, so you see what comes in and what goes out. The change stays in the draft when you close the node (with Close, Esc or the browser’s back button); commit it from the bottom of the page as usual.