Public
Edited
Oct 23, 2024
4 forks
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
taxiZones = d3.csv(
"https://raw.githubusercontent.com/columbia-data-club/data/refs/heads/main/nyc-taxi-data/taxi_zone_lookup.csv"
)
Insert cell
Insert cell
yellow_tripdata_202407First2m = FileAttachment(
"yellow_tripdata_2024-07-first-2m@2.parquet"
)
Insert cell
Insert cell
Insert cell
Insert cell
yellow_tb = aq.fromArrow(arrowTable)
Insert cell
yellow_tb.view(5)
Insert cell
Insert cell
yellow_tb.numRows()
Insert cell
Insert cell
tipPct = yellow_tb
.derive({ tipPct: (d) => d.tip_amount / d.fare_amount })
.column("tipPct")
Insert cell
avgTip = yellow_tb.rollup({ mean: (d) => op.mean(d.tip_amount) }).get("mean", 0)
Insert cell
Insert cell
Insert cell
fiveNum = (data, columnName) => {
const t = data
.select(columnName)
.orderby(columnName)
.rollup({
median: (d) => op.mean(d)
});
return t;
}
Insert cell
fiveNum(yellow_tb, "fare_amount").view()
Insert cell
Insert cell
Plot.dot(yellow_tb)
Insert cell
Insert cell
taxiZones_tb = aq.loadCSV(
"https://raw.githubusercontent.com/columbia-data-club/data/refs/heads/main/nyc-taxi-data/taxi_zone_lookup.csv"
)
Insert cell
taxiZones_tb.view()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more