Public
Edited
Jun 29, 2023
Fork of Aya H - RN
Insert cell
Insert cell
Insert cell
raw = d3.csv('https://raw.githubusercontent.com/plotly/datasets/master/us-cities-top-1k.csv')
Insert cell
Inputs.table(list)
Insert cell
viewof list = aq.from(raw)
.derive({
Population: d => +d.Population
})
.orderby(aq.desc('Population'))
.filter(d => op.rank() <= 250)
.derive({
row_number: d => op.row_number()
})
.join_left(abb, ['State', 'State'])
.derive({
location: d => `${d.City}, ${d.Abbreviation}`
})
.orderby(aq.desc('Population'))
.dedupe('Abbreviation')
.view()
Insert cell
viewof abb = aq.from(raw_abb)
.view()
Insert cell
raw_abb = d3.csv('https://raw.githubusercontent.com/jasonong/List-of-US-States/master/states.csv')
Insert cell
file.name
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
clean = aq.from(raw_data)
.objects()
Insert cell
raw_data = file.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