Public
Edited
Oct 4, 2023
Insert cell
Insert cell
Insert cell
data = parseGraph(`

Occupant A exhalation,respiratory aerosols w/ possible viral RNA,.01
Occupant B exhalation,respiratory aerosols w/ possible viral RNA,.01
Occupant C exhalation,respiratory aerosols w/ possible viral RNA,.01

respiratory aerosols w/ possible viral RNA,HEPA,.01

allergens,HEPA,.01
particulate pollutants,HEPA,.01

HEPA,post-HEPA respiratory aerosols w/ possible viral RNA,0
HEPA,post-HEPA allergens,0
HEPA,post-HEPA particulate pollutants,0


post-HEPA respiratory aerosols w/ possible viral RNA,Occupant A inhalation,0
post-HEPA allergens,Occupant A inhalation,0
post-HEPA particulate pollutants,Occupant A inhalation,0

post-HEPA respiratory aerosols w/ possible viral RNA,Occupant B inhalation,0
post-HEPA allergens,Occupant B inhalation,0
post-HEPA particulate pollutants,Occupant B inhalation,0

post-HEPA respiratory aerosols w/ possible viral RNA,Occupant C inhalation,0
post-HEPA allergens,Occupant C inhalation,0
post-HEPA particulate pollutants,Occupant C inhalation,0

`)
Insert cell
Insert cell
sankey = d3.sankey()
.nodeId(d => d.name)
.nodeAlign(d3.sankeyCenter)
.nodeSort(null)
.nodeWidth(15)
.nodePadding(padding)
.extent([[0, 5], [width, height - 5]])
Insert cell
width = 975
Insert cell
height = 440
Insert cell
padding = 24
Insert cell
color = "#dddddd"
Insert cell
d3 = require("d3@6", "d3-sankey@0.12")
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