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.

Cleaning funnel

Rows left after every cleaning rule, revived pipeline next to the counts printed by the 2021 notebook.

cleaning_funnel, page 1 of 2
stepINTEGERstageTEXTlabelTEXTruleTEXTrevived_rowsINTEGERnotebook_rowsINTEGERdifference_pctREAL
1RawRaw 2019 yellow-taxi records84598444843990190.236
2Round 1Drop rows with any missing value79297843792964370.002
3Round 1Trip distance must be positivetrip_distance > 078592625nullnull
4Round 1Passenger count between 1 and 6passenger_count BETWEEN 1 AND 677161380nullnull
5Round 1Known rate code (drops 99)RatecodeID BETWEEN 1 AND 677159577nullnull
6Round 1Fare must be positivefare_amount > 077003149nullnull
7Round 1Extra charge cannot be negativeextra >= 077002549nullnull
8Round 1MTA tax of $0.50 to $1mta_tax BETWEEN 0.5 AND 176696242nullnull
9Round 1Tolls cannot be negativetolls_amount >= 076696242nullnull
10Round 1Improvement surcharge equals $0.30improvement_surcharge = 0.3076688394nullnull
11Round 1Total amount must be positivetotal_amount > 076688394nullnull
12Round 1Congestion surcharge cannot be negativecongestion_surcharge >= 076688394nullnull
13Round 1Pickup between 2018-01-01 and 2019-12-31pickup_dt BETWEEN TIMESTAMP '2018-01-01 00:00:00' AND TIMESTAMP '2019-12-31 23:59:59'76687429nullnull
14Round 1Drop-off within 2019dropoff_dt BETWEEN TIMESTAMP '2019-01-01 00:00:00' AND TIMESTAMP '2019-12-31 23:59:59'76686279nullnull
15Round 1Drop unknown vendor 4 (end of round 1)VendorID != 476488807764874380.002
16Round 2Fare z-score at most 3fare <= mean + 3 sd = 296.1433 (notebook 296.1457)76488060764866910.002
17Round 2Drop exact duplicate rows76488057764866880.002
18Round 3Fare at least the $2.50 flag-fallfare_amount >= 2.576487706764863370.002
19Round 3Drop-off after pick-uptravel_time > 076484522nullnull
20Round 3At most 6 passengerspassenger_count <= 676484522nullnull
21Round 3Distance / minutes at most 50 (the 'mph' rule)trip_distance / travel_time <= 5076478068764755710.003
22Round 3Trip at most 180 minutestravel_time <= 18076271886762693920.003
23Round 3Tip at most half the farefare_amount >= 2 * tip_amount75675844756733630.003
24MergeJoin taxi zones; drop trips from zone 264 to zone 26575675163nullnull
25MergeDrop zones NA/NV; join weather (2019 pickups) and events75185703751832260.003