Public
Edited
Nov 26, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
screenshot20241122At111634 = FileAttachment("Screenshot 2024-11-22 at 11.16.34.png").image()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
moreDetails = [{"attribute":"an attribute 1","categoryIndex":3,"category":"Above_3"},{"attribute":"an attribute 2","categoryIndex":2,"category":"Below_3"},{"attribute":"an attribute3","categoryIndex":1,"category":"Below_2"},{"attribute":"an attribute4","categoryIndex":1,"category":"Below_2"},{"attribute":"an attribute5","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute6","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute7","categoryIndex":1,"category":"Below_2"},{"attribute":"an attribute8","categoryIndex":1,"category":"Below_2"},{"attribute":"an attribute9","categoryIndex":1,"category":"Below_2"},{"attribute":"an attribute10","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute11","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute12","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute13","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute14","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute15","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute16","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute17","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute18","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute19","categoryIndex":3,"category":"Above_3"},{"attribute":"an attribute20","categoryIndex":1,"category":"Below_2"},{"attribute":"an attribute21","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute22","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute23","categoryIndex":0,"category":"Below_1"},{"attribute":"an attribute24","categoryIndex":0,"category":"Below_1"}]
Insert cell
newMoreDetails = {
const result = [];
moreDetails.forEach((d) => {
result.push({attribute: "an attribute", categoryIndex: d.categoryIndex, category: d.category})
})
console.log(JSON.stringify(result))
return result
}
Insert cell

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.
Learn more