Public
Edited
Aug 8, 2023
Fork of Aya H - RN
Insert cell
Insert cell
Insert cell
"07130cd7-8f90-4aec-8a8f-11a969d6f8d2.csv"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
"85560d46-2491-4484-ad6f-a244aab9ad55.csv"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof clean = aq.from(raw_data)
.groupby('date')
.rollup({
spend: d => op.sum(d.spend),
captures: d => op.sum(d.captures),
full_applies: d => op.sum(d.full_applies),
hired: d => op.sum(d.hired)
})
.derive({
cpC: d => d.spend / d.captures,
cpFA: d => d.spend / d.full_applies,
cpH: d => d.spend / d.hired
})
.view()
Insert cell
viewof clean_by_campaign = aq.from(raw_data)
.groupby('date', 'parent_campaign', 'title')
.rollup({
spend: d => op.sum(d.spend),
captures: d => op.sum(d.captures),
full_applies: d => op.sum(d.full_applies),
hired: d => op.sum(d.hired)
})
.derive({
cpC: d => d.spend / d.captures,
cpFA: d => d.spend / d.full_applies,
cpH: d => d.spend / d.hired
})
.view()
Insert cell
raw_data = file.csv({typed: true})
Insert cell
Insert cell
viewof clean_mgmt = aq.from(raw_management)
.groupby('date')
.rollup({
spend: d => op.sum(d.spend),
captures: d => op.sum(d.captures),
full_applies: d => op.sum(d.full_applies),
hires: d => op.sum(d.hired)
})
.derive({
cpC: d => d.spend / d.captures,
cpFA: d => d.spend / d.full_applies,
cpH: d => d.spend / d.hires
})
.view()
Insert cell
viewof mgmt_clean_by_campaign = aq.from(raw_management)
.groupby('date', 'campaign_group_name', 'title')
.rollup({
spend: d => op.sum(d.spend),
captures: d => op.sum(d.captures),
full_applies: d => op.sum(d.full_applies),
hired: d => op.sum(d.hired)
})
.derive({
cpC: d => d.spend / d.captures,
cpFA: d => d.spend / d.full_applies,
cpH: d => d.spend / d.hired
})
.view()
Insert cell
raw_management = file1.csv({typed: true})
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