Public
Edited
Aug 3, 2023
Fork of Aya H - RN
Insert cell
Insert cell
Insert cell
"lyft-by_campaign-2023-07-31-2023-08-03.csv"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
(53000 - clean_all.get('spend')) / 4
Insert cell
aq.from(clean)
.view()
Insert cell
clean = aq.from(raw_data)
.derive({
spend: d => +op.replace(d.Actual, ',','')
})
.select(0, 'spend')
.filter(d => d.spend > 0)
.filter(d => op.includes(d.Campaign, 'Craigs') == false)
.filter(d => d.Campaign != 'All Other')
.orderby(aq.desc('spend'))
.derive({
category: aq.escape( d => lower_spend.includes(d.Campaign) == true ? 'lower' : 'other' )
})
.objects()
Insert cell
raw_data = file.csv({typed: true})
Insert cell
Insert cell
lower_spend = aq.from(lyft_categories_raw)
.filter(d => d['Recommended Action'] == 'lower spend')
.array('Region')
Insert cell
lyft_categories_raw = FileAttachment("Lyft Repository - regional budget guidance 8_1_23.csv").csv()
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