Public
Edited
Apr 28
Insert cell
Insert cell
Insert cell
landscape.parquet
select *
from landscape
where gh_stars > 0
order by gh_stars desc
Insert cell
Insert cell
landscape.parquet
select category, count(*) as items
from landscape
group by 1
order by 2 desc
Insert cell
Plot.plot({
marginLeft: 200,
x: {
grid: true,
label: "Number of Items"
},
y: {
label: null
},
marks: [
Plot.barX(categories_by_items, {
y: "category",
x: "items",
sort: {y: "-x"},
fill: "steelblue"
})
]
})
Insert cell
landscape
select concat(category, '-', subcategory) as category, count(*) as items
from landscape
group by 1
order by 2 desc
Insert cell
Plot.plot({
marginLeft: 200,
x: {
grid: true,
label: "Number of Items"
},
y: {
label: null
},
marks: [
Plot.barX(subcategories, {
y: "category",
x: "items",
sort: {y: "-x"},
fill: "steelblue"
})
]
})
Insert cell
landscape.parquet
select concat(category, '-', subcategory) as category, count(*) as items
from landscape
where gh_stars > 0
group by 1
order by 2 desc
Insert cell
Insert cell
landscape.parquet
SELECT DISTINCT
category || ' > ' || subcategory AS combined_value
FROM landscape
ORDER BY category, subcategory
Insert cell
viewof combinedCategoriesInput = Inputs.text({
label: "Subcategory",
placeholder: "Type to subcategories...",
datalist: combinedCategories.map(d => d.combined_value)
})
Insert cell
landscape.parquet
SELECT name, gh_stars, category, subcategory
FROM landscape
WHERE category || ' > ' || subcategory = ${combinedCategoriesInput}
and gh_stars > 0
ORDER BY gh_stars desc
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