Public
Edited
Jan 9, 2024
3 forks
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
WorkingGroup = "PLM"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
JSON.stringify(RadarInputs)
Insert cell
Insert cell
JSON.stringify(ASD_SSG_Blips)
Insert cell
createJsonDownloadButton(ASD_SSG_Blips, "blips.json", "Download ASD SSG Blips")
Insert cell
Insert cell
width = 800
Insert cell
height = 800
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Json = {
return CreateJsonFrom(numberPerQuadrant);
}
Insert cell
Insert cell
CreateJsonFrom = function createJson(data) {
const dataSetName = "ASD SSG PLM Standards Treemap 28/04/2022";
var jsonDataSet = {
children: [],
data: { $color: "white" },
id: "root",
name: dataSetName
};
var standardsNumber = 1;
for (let i = 0; i < numberPerQuadrant.length; i++) {
jsonDataSet.children[i] = {
children: [],
data: {
$color: ColorOfQuadrants[i],
$area: AreaNumericCriteriaPerQuadrant[Quadrants[i]],
articleTitle: Quadrants[i]
},
name: Quadrants[i],
id: Quadrants[i],
title: Quadrants[i]
};
jsonDataSet.children[i].children = QuadrantsWithStandards.get(
Quadrants[i]
).map((currentElement) => ({
id: standardsNumber++,
name: currentElement.label,
children: [],
data: {
standardLabel: currentElement.label,
$color: ColorOfQuadrants[i], //"#C0C0C0",
$area: 1
}
}));
}
return jsonDataSet;
}
Insert cell
ColorOfQuadrants = d3
.quantize(
(t) => colorToHex(d3.interpolateSpectral(t * 0.8 + 0.1)),
Quadrants.length
)
.reverse()
Insert cell
Quadrants = Object.keys(numberPerQuadrant)
Insert cell
AreaNumericCriteriaPerQuadrant = numberPerQuadrant
Insert cell
QuadrantsWithStandards = d3.group(ASD_SSG_Blips, (d) => d.quadrant)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
uuid = import("uuid/dist/esm-browser/v5.js").then((module) => module.default)
Insert cell
namespace = uuid("https://www.asd-ssg.org/", uuid.URL)
Insert cell
data = ASD_SSG_Blips.map((data, index) => {
var datas = {};
var standard = {};
standard["id"] = uuid(data.label, namespace);
standard["type"] = "business-object";
standard["label"] = data.label;
standard["name"] = data.name;
standard["ring"] = data.ring;
standard["quadrant"] = data.quadrant;
//standard["description"] = data.description;
standard["reference"] = data.Reference;
datas["group"] = "nodes";
datas["data"] = standard;
return datas;
})
Insert cell
JSON.stringify(data)
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more