Published
Edited
Apr 14, 2022
18 forks
Importers
13 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
db
SELECT * FROM items
Insert cell
Insert cell
Insert cell
db
SELECT * FROM events LIMIT 100
Insert cell
Insert cell
db
SELECT type, COUNT(*)::INT AS count FROM events GROUP BY type ORDER BY count DESC
Insert cell
Insert cell
db
SELECT MIN(date) AS min, MAX(date) AS max FROM events
Insert cell
Insert cell
db
SELECT *
FROM events
JOIN items on events.item_id = items.id
WHERE type = 'purchase'
Insert cell
purchases
Insert cell
Plot.plot({
marks: [
Plot.rectY(
purchases,
Plot.binX(
{ y: "sum" },
{
x: "date",
y: "price_in_usd",
fill: "category",
thresholds: d3.utcDay,
}
)
)
],
color: { legend: true, columns: "100px" },
})
Insert cell
Insert cell
db
SELECT * FROM users LIMIT 100
Insert cell
Insert cell
db
SELECT date_trunc('day', date) as day, count(*)::INT as count
FROM users
WHERE date > TIMESTAMP '2020-07-01'
GROUP BY day
Insert cell
Insert cell
Plot.rectY(dailyFirstTouch, { x: "day", y: "count", interval: d3.utcDay }).plot()
Insert cell
Insert cell
Insert cell
Insert cell
items = FileAttachment("items.csv").csv({ typed: true })
Insert cell
events = FileAttachment("events@1.csv").csv({ typed: true })
Insert cell
users = FileAttachment("users.csv").csv({ typed: true })
Insert cell
Insert cell
Insert cell
Insert cell
db = DuckDBClient.of([
FileAttachment("items.parquet"),
FileAttachment("events@1.parquet"),
FileAttachment("users@1.parquet"),
])
Insert cell
db.describe()
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