Published
Edited
Apr 14, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
recipe2Ingredients = new Map(cleanedRecipes2.map(r=>[parseInt(r.RecipeId),r.cleanedIngredients]))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
//nodes_inDegree = inDegree(links)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
prunedNodes = nodeObjects(prunedLinks)
Insert cell
Insert cell
prunedNodesSet = new Set(prunedNodes2.map(n=>n.node))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
simulation = d3.forceSimulation(recipes_point_data)
.force("link", d3.forceLink(distance).id(d => node2index.get(d.label)).distance(d => d.value*100))
.force("charge", d3.forceManyBody())
.force("center", d3.forceCenter(width/2, width/2))
Insert cell
Insert cell
Insert cell
Insert cell
md`# Libraries`
Insert cell
d3 = require("d3@6")
Insert cell
import {select,text,slider,button,checkbox} from "@jashkenas/inputs"
Insert cell
import {style, scale, categoricalWidget} from "@zzzev/categorical-legend-picker"
Insert cell
import {inputsGroup,group,rangeSlider} from "@bumbeishvili/utils"
Insert cell
Plotly = require("https://cdn.plot.ly/plotly-latest.min.js")
Insert cell
import {zip, zipreader} from "@fil/jszip"
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