Published
Edited
Jun 13, 2018
Insert cell
Insert cell
Insert cell
Insert cell
import {
presto,
pronto,
ago,
datestamp
} with {presto_user as presto_user} from "@jflatow/presto-data"
Insert cell
Insert cell
presto(`select * from hive.optilab.cmp_metrics_1 limit 1000`)
Insert cell
Insert cell
Insert cell
metrics = pronto(`select * from hive.optilab.cmp_metrics_1 where date = '${two_days_ago}'`)
Insert cell
Insert cell
Insert cell
Insert cell
data = {
const data = metrics.map(row => row.spend).filter(s => s > threshold)
data.x = 'Spend'
data.y = 'Campaigns'
return data;
}
Insert cell
Insert cell
Insert cell
Insert cell
import {chart}
with {
data,
height,
margin,
x,
y
}
from "@mbostock/d3-histogram"
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