Published unlisted
Edited
Jun 1, 2022
Insert cell
Insert cell
data = [
{country: "USA", age_group: "1–10"},
{country: "Mexico", age_group: "11–30"},
{country: "Canada", age_group: "31–60"},
{country: "Mexico", age_group: "1–10"},
{country: "Canada", age_group: "11–30"},
{country: "USA", age_group: "31–60"},
]
Insert cell
Insert cell
viewof category = Inputs.select(categories, { label: "Categories" })
Insert cell
viewof sub_category = Inputs.select(
data
.filter((d) => d.category === category)
.map((d) => d.sub_category),
{ label: "Sub-category" }
)
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