Public
Edited
May 22, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
pid_color = d3
.scaleOrdinal(
[
"Catherine Nancarrow",
"Maria Praetzellis",
"Brian Riley",
"Erin Robinson"
],
d3.schemeTableau10
)
.unknown("#ccc")
Insert cell
color = d3.scaleOrdinal(["Perished"], ["#da4f81"]).unknown("#ccc")
Insert cell
pid_keys = ["vote","group","resourceTypeGeneral"]
Insert cell
keys = data.columns.slice(0, -1)
Insert cell
pid_data = [
{"vote":"John Chodacki", "group":"Project Leader", "resourceTypeGeneral":"OutputManagementPlan", "value":"1"},
{"vote":"Erin Robinson", "group":"Project Leader", "resourceTypeGeneral":"Article", "value":"4"},
{"vote":"Neil Davies", "group":"Creator", "resourceTypeGeneral":"Article","value":"15"},
{"vote":"Maria Praetzellis", "group":"Project Leader", "resourceTypeGeneral":"Article", "value":"19"},
{"vote":"Maria Praetzellis", "group":"Creator", "resourceTypeGeneral":"Software", "value":"9"},
{"vote":"John Chodacki", "group":"Creator", "resourceTypeGeneral":"Dataset", "value":"8"},
{"vote":"Brian Riley", "group":"Data Curator", "resourceTypeGeneral":"Dataset", "value":"12"},
{"vote":"Brian Riley", "group":"Creator", "resourceTypeGeneral":"Dataset", "value":"6"},
{"vote":"Catherine Nancarrow", "group":"Project Manager", "resourceTypeGeneral":"OutputManagementPlan", "value":"22"}
]
Insert cell
data = d3.csvParse(await FileAttachment("titanic.csv").text(), d3.autoType)
Insert cell
d3 = require("d3@6", "d3-sankey@0.12")
Insert cell
import { sankey as sankey2 } from "@kjgarza/vega-charts"
Insert cell
sankey2()
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