Skip to content
TAXI NYC ’19, home

Optional

AI settings

Everything on this site works without AI. To try “Ask the data”, paste your own API key. Your browser sends it straight to the provider you pick. It is never sent to this site's server, never logged, and calls are billed to your account.

Provider
AI provider

Default. Cheapest and fastest; $1 / $5 per million input / output tokens.

No key saved for this provider. Create one at platform.claude.com. A key with a low spending limit is a good idea.

MAST30034 Applied Data Science · Project 1 · University of Melbourne

2021 Semester 2 · revived 2026

Where, when and how long.

Every New York yellow-cab ride of 2019 (84.6M records in TLC's current files, 84.4M in the 2021 download), cleaned with the rules I wrote for a 2021 data-science project, joined to weather, street events and car crashes, and fitted with a regression that predicts how many minutes a trip will take.

Map of New York City's taxi zones shaded by 2019 yellow-taxi pickups: busiest in Manhattan below Central Park and at the two airports.
2019 pickups by taxi zone, darker = busier74,910,889 trips
Raw trip records
84.6M
12 TLC files · notebook: 84.4M
After four cleaning rounds
74.9M
notebook: 74.9M
Variance explained (R²)
0.367
10-fold CV, 2021 notebook · folds 0.365–0.368
Typical error (RMSE)
9.17 min
same folds · 9.17–9.18

The brief

What the coursework asked

Project 1 of MAST30034 was an individual quantitative analysis of the New York Taxi & Limousine Commission trip records: pick a question, clean a very large real dataset, explore it visually and back the answer with a statistical model.

I chose 2019 and a practical question: can we tell a passenger how long a yellow-cab ride will take, from where and when it starts and what the city is doing that day?

The build

What I built in 2021

A PySpark notebook that cleaned 84 million rows in four documented rounds, joined NOAA Central Park weather, NYC permitted events and NYPD collisions, drew Folium choropleths of every zone and fitted an elastic-net linear regression with a hand-written 10-fold cross-validation, because Spark's own CrossValidator would not run on my laptop.

This site re-runs those exact rules with DuckDB on TLC's current files. After the first step it lands within 0.003% of every row count the notebook printed.

The findings

What the data said

Manhattan is the taxi system: 86% of cleaned trips start and end there, and the busiest pickup zone is Upper East Side South. Rides are slowest from 4 pm (mean 17.2 min) and quickest from 2 am (11.3 min).

The model kept 83 of 579 features. Airports dominate it: a LaGuardia pickup adds 14.3 minutes and JFK 12.0. Every weather variable was shrunk to zero; only collisions (+0.035 min each) survived. It explains about 37% of the variance, an honest result for a straight-line model.

Explore the lines

About this project

A 2021 notebook,
back on the road

Subject
MAST30034 Applied Data Science
University
The University of Melbourne
When
2021 Semester 2, Project 1 (submitted August 2021)
Team
Individual project by Sunchuangyu (Rin) Huang
Credits
Download scripts adapted from MAST30034 tutorial material; the manual cross-validation loop adapted from the Anant CaSparkExtension notebook (both noted in the original).
Original stack vs revived stack
Layer20212026
Trip data12 monthly CSVs from TLC's S3 bucket (now gone)TLC's 2019 Parquet re-issue on CloudFront
EnginePySpark 3.1.2 on a laptop under WSL, 32 GB driverThe same rules as DuckDB SQL in uv scripts; no JVM or Spark session
CleaningNotebook cells with staged CSVsThe same rules in SQL, every count logged next to the notebook's
MapsFolium with Stamen tiles (discontinued)MapLibre GL with OpenFreeMap tiles and a bundled fallback
ModelSpark MLlib elastic net, maxIter 10, manual 10-fold CV2021 coefficients scored on the revived folds, plus a converged refit
DeliveryA 22 MB notebookNext.js 16, a 15 MB read-only SQLite file, Vercel

Academic integrity: the 2021 notebook, scripts and figures are preserved unchanged in the repository's coursework/ folder for reference. The assignment brief and the course-provided material are not reproduced here. If you are taking MAST30034, please do your own project.