Public
Edited
May 11
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
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
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
Insert cell
viewof checkboxes1 = Inputs.checkbox(["Diabetes", "Hypertension"], {label: "Select Disease", value: ["Diabetes"]})
Insert cell
viewof checkboxes = Inputs.checkbox(["Vaccination", "Therapy", "Surgery", "Medication"], {label: "Select Treatment", value: ["Vaccination"]})
Insert cell
filtered = GHS_parsed
.filter(d =>
checkboxes1.includes(d["Disease Name"]) &&
checkboxes.includes(d["Treatment Type"])
)
Insert cell
Plot.plot({
width,
color: {
legend: true,
domain: ["China", "Germany", "India", "USA", "Japan"],
range: [
"#ff7f0e",
"#1f77b4",
"#2ca02c",
"#d62728 ",
"#9467bd",
]
},
marks: [
Plot.barY(
filtered,
Plot.groupX(
{ y: "mean" },
{
x: "Year",
y: "Average Treatment Cost (USD)",
fill: "Country",
tip: true
}
)
),
Plot.ruleY([0])
]
})
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
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
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
Insert cell
Insert cell
Insert cell
Insert cell
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