// Column Name: function to compute the values of the new column
// idPlus: Function (take the value of id and add one)
idPlus:(d)=>d.id+1,
// sidePlus: (d) => d.side map this transformation given by the recode object
sidePlus:(d)=>aq.op.recode(d.side,recodeObject)
})
// Long form Function
functionadd(d,$){
returnd.id+$.id;
}
// Short form function (Arrow Function)
add1=(d,$)=>d.id+$.id
// No name function (Anonymous Function)
(d,$)=>d.id+$.id
add({id:2},{id:3})
add1({id:2},{id:3})
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.