Code
Rows made by JavaScript: d is the input's rows as objects (an empty array with nothing wired), or a JSON file parsed whole when a URL is set, and the body returns an array of rows or GeoJSON. d3, turf and utils are in scope. It runs when its input changes, in the engine, and its rows become a DuckDB table every later node plans over; for per-row values use a JS Function instead.
Syntax
{ "id": "n1", "op": "code", "name": "code", "x": 0, "y": 0, "params": {} }
An edge into it ends at "targetPort": "in"; one out of it starts at "sourcePort": "out".
Inputs
| Port | Type | Takes |
|---|---|---|
in | table | optional |
Parameters
| Parameter | Kind | Default | Choices |
|---|---|---|---|
code | code | "return d" | |
url | url | "" |
Outputs
| Port | Type |
|---|---|
out | table |
Details
- Category: Data
- Operator:
code
Older projects
Projects saved before documents used operator classes. These convert to code when they open: ArcOp, CodeOp, FileOp, JSONOp.