New York City Taxi Data
Real-Time Dashboards
A real-time replay of 146,393,317 taxi rides, carrying 238,016,495 passengers across New York City in 2015.
Taxis in transit
An estimate of how many taxis were carrying passengers at this time, eight years ago today.
SELECTcount()FROMtripsWHEREpickup_datetimeBETWEENdateadd('h',-2,dateadd('y', 2015 - year(now()),now()))ANDdateadd('y', 2015 - year(now()),now())AND dropoff_datetime > dateadd('y', 2015 - year(now()),now())SAMPLE BY 2h
Passengers in transit
An estimate of how many passengers were in transit by taxi at this time eight years ago.
select sum(passenger_count) from tripsWHEREpickup_datetimeBETWEENdateadd('h', -2, dateadd('y', 2015 - year(now()), now()))ANDdateadd('y', 2015 - year(now()), now())AND dropoff_datetime > dateadd('y', 2015 - year(now()), now())SAMPLE BY 2h
Total fare today
Total fare accumulated since midnight on this day eight years ago.
SELECTsum(fare_amount) revenueFROMtripsWHEREpickup_datetime BETWEENdateadd('y', 2015 - year(now()), timestamp_floor('d', now()))AND dateadd('y', 2015 - year(now()), now())
Trips today
Total taxi fares on this calendar day eight years ago, from midnight to the current time.
SELECTcount() tripsFROMtripsWHEREpickup_datetime BETWEENdateadd('y', 2015 - year(now()), timestamp_floor('d', now()))AND dateadd('y', 2015 - year(now()), now())
Geodata
Generate deep business insights by combining locations and timestamps.
Dropoffs (last 2 min)
A heatmap of taxi dropoffs in New York City in the past two minutes, eight years ago today.
SELECTdropoff_datetime,dropoff_latitude,dropoff_longitudeFROMtripsWHEREpickup_datetime BETWEENdateadd('h', -4, dateadd('y', 2015 - year(now()), now()))AND dateadd('y', 2015 - year(now()), now())AND dropoff_datetime BETWEENdateadd('m', -2, dateadd('y', 2015 - year(now()), now()))AND dateadd('y', 2015 - year(now()), now())
Pickups (last 2 min)
A heatmap of taxi pickups in New York City in the last two minutes, eight years ago today.
SELECTpickup_datetime,pickup_latitude,pickup_longitudeFROMtripsWHEREpickup_datetime BETWEENdateadd('m', -2, dateadd('y', 2015 - year(now()), now()))AND dateadd('y', 2015 - year(now()), now())
Insights
Discover trends in your data using modern SQL analytics.
Tip / fare correlation
A scatterplot correlating tips to total fare of a NYC taxi trip. Points in purple indicate those correlating to fixed percentages of the total fare -- 10%, 15%, 20%, etc., with a 1% tolerance.
SELECTtip_amount,fare_amount,(abs(tip_amount / fare_amount - 0.1) < 0.01OR abs(tip_amount / fare_amount -0.15) < 0.01OR abs(tip_amount / fare_amount - 0.2) < 0.01OR abs(tip_amount / fare_amount - 0.3) < 0.01) percent_tipFROMtripsWHEREpickup_datetime BETWEENdateadd('m', -30, dateadd('y', 2015 - year(now()), now()))AND dateadd('y', 2015 - year(now()), now())AND fare_amount < 70AND tip_amount < 15AND tip_amount > 0;
Fare average
Utilising window functions to compute average taxi fares, since midnight (UTC) of today's calendar day and now (relative to eight years ago).
WITH x AS (SELECTpickup_datetime,avg(fare_amount) OVER (ROWS BETWEEN UNBOUNDED PRECEDINGAND CURRENT ROW) avgFare,avg(fare_amount) OVER (ORDER BYpickup_datetime RANGE BETWEEN 10 MINUTE PRECEDINGAND CURRENT ROW) avgFareHourlyMavgFROM tripsWHEREpickup_datetime BETWEENdateadd('y', 2015 - year(now()), timestamp_floor('d', now()))AND dateadd('y', 2015 - year(now()), now()))SELECTx.pickup_datetime,last(avgFare) average_fare_since_midnight,last(avgFareHourlyMavg) average_fare_last_last_hourFROM xSAMPLE BY 1m
Build your own on QuestDB
High performance ingest & slick visualizations.
Perfect for analytics.
Download QuestDB