Public
Edited
Aug 29, 2023
Fork of Template
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof eb_clean = aq.from(eb_raw)
.derive({
paid_applies: d => +op.replace(d['Paid Applies'], ',',''),
spend: d => +op.replace(d.Actual, ',','')
})
.derive({
week: aq.escape(d => d3.utcMonday(d.Date))
})
.groupby('week')
.rollup({
paid_applies: d => op.sum(d.paid_applies),
spend: d => op.sum(d.spend)
})
.derive({
cpa: d => d.spend / d.paid_applies
})
.view()
Insert cell
viewof other_clean = aq.from(other_raw)
.derive({
paid_applies: d => +op.replace(d['Paid Applies'], ',',''),
spend: d => +op.replace(d.Actual, ',','')
})
.derive({
week: aq.escape(d => d3.utcMonday(d.Date))
})
.groupby('week')
.rollup({
paid_applies: d => op.sum(d.paid_applies),
spend: d => op.sum(d.spend)
})
.derive({
cpa: d => d.spend / d.paid_applies
})
.view()
Insert cell
Insert cell
eb_raw = FileAttachment("employbridge-by_day-2023-07-01-2023-08-28.csv").csv({typed: true})
Insert cell
other_raw = FileAttachment("mau-workforce-by_day-2023-07-01-2023-08-28.csv").csv({typed: true})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// this is a really cool way of displaying tables. Much more aesthetically pleasing than the defaults of arquero and input.table

import { formatTable } from "@saneef/pretty-tables"
Insert cell
Insert cell
import {toc} from "@nebrius/indented-toc"
Insert cell
Insert cell
date_parser = d3.utcParse('%m/%d/%Y')
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// sample of how to place html blocks in a grid

// html `<div style="display: grid; grid-template-columns: 1fr 1fr 1fr; column-gap: 0px; row-gap: 5px;">
// ${viewof spend}
// ${viewof cpl}
// ${viewof cpc}
// </div>`
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