Request a demo

Public dataset · Government, society and transport

NYC Taxi Trips in BigQuery

The new_york_taxi_trips dataset has NYC yellow taxi trips from 2011, green taxi trips from 2014 and for-hire vehicle trips for 2015 to 2017, one table per type and year, plus taxi zone polygons. Yellow tables run up to 47 GiB each, and SELECT * over all years reads 274 GiB, so query one year and name your columns.

bigquery-public-data.new_york_taxi_trips · NYC Taxi and Limousine Commission (TLC) · US · Sizes measured November 23, 2026

27tables
315 GiBlogical size
2,036,173,415rows
$1.92to scan every column once, on-demand

bigquery-public-data.new_york_taxi_trips holds trip records from the New York City Taxi and Limousine Commission (TLC), one table per vehicle type and year. The dataset description gives 2023-03-21 as the last data update. The yellow and green tables for 2023 were created then but are empty, so the data effectively ends in 2022.

tlc_yellow_trips_YYYY (2011 to 2022) and tlc_green_trips_YYYY (2014 to 2022) have one row per trip with pickup and dropoff time, distance, passenger count, rate code, payment type and every fare component (fare_amount, tip_amount, tolls_amount, total_amount). Places are identified by pickup_location_id and dropoff_location_id, which join to zone_id in taxi_zone_geom, a table of 263 zones with borough names and GEOGRAPHY polygons. tlc_fhv_trips_2015 to 2017 cover for-hire vehicles with the pickup time or date, dispatching base and pickup zone (the 2017 table adds dropoff date and zone), but no fares.

payment_type is the TLC code stored as a string: 1 is credit card and 2 is cash. None of the tables is partitioned or clustered; the split by year is the only built-in way to read less.

Tables and sizes

TableRowsSizeFull scanLayout
tlc_yellow_trips_2014
Yellow taxi trips, 2014.
275,921,95147.1 GiB$0.29None
tlc_yellow_trips_2012
Yellow taxi trips, 2012.
256,415,13044.9 GiB$0.27None
tlc_yellow_trips_2013
Yellow taxi trips, 2013.
185,787,44632.5 GiB$0.20None
tlc_yellow_trips_2011
Yellow taxi trips, 2011.
176,887,24831.0 GiB$0.19None
tlc_yellow_trips_2015
Yellow taxi trips, 2015.
146,039,22025.8 GiB$0.16None
tlc_yellow_trips_2016
Yellow taxi trips, 2016.
131,131,79423.2 GiB$0.14None
tlc_yellow_trips_2017
Yellow taxi trips, 2017.
113,500,31620.0 GiB$0.12None
tlc_yellow_trips_2018
Yellow taxi trips, 2018.
102,871,37618.3 GiB$0.11None
tlc_fhv_trips_2017
For-hire vehicle trips, 2017: base, dates and zones, no fares.
192,092,69815.6 GiB$0.10None
tlc_yellow_trips_2019
Yellow taxi trips, 2019.
84,598,43315.1 GiB$0.09None
tlc_yellow_trips_2022
Yellow taxi trips, 2022.
36,256,5397.0 GiB$0.04None
tlc_fhv_trips_2016
For-hire vehicle trips, 2016: base, dates and zones, no fares.
133,285,1416.3 GiB$0.04None
tlc_yellow_trips_2021
Yellow taxi trips, 2021.
30,904,2975.9 GiB$0.04None
tlc_yellow_trips_2020
Yellow taxi trips, 2020.
24,649,0814.4 GiB$0.03None
tlc_green_trips_2015
Green taxi trips, 2015.
19,233,7543.5 GiB$0.02None
tlc_fhv_trips_2015
For-hire vehicle trips, 2015: base, dates and zones, no fares.
63,867,6093.1 GiB$0.02None
tlc_green_trips_2016
Green taxi trips, 2016.
16,385,5303.0 GiB$0.02None
tlc_green_trips_2014
Green taxi trips, 2014.
15,836,9982.6 GiB$0.02None
tlc_green_trips_2017
Green taxi trips, 2017.
11,737,0482.1 GiB$0.01None
tlc_green_trips_2018
Green taxi trips, 2018.
8,899,7071.6 GiBunder $0.01None
tlc_green_trips_2019
Green taxi trips, 2019.
6,300,9741.1 GiBunder $0.01None
tlc_green_trips_2020
Green taxi trips, 2020.
1,734,165314 MiBunder $0.01None
tlc_green_trips_2021
Green taxi trips, 2021.
1,068,744192 MiBunder $0.01None
tlc_green_trips_2022
Green taxi trips, 2022.
767,953143 MiBunder $0.01None
taxi_zone_geom
263 taxi zones with borough and GEOGRAPHY polygon.
2632.3 MiBunder $0.01None
tlc_green_trips_2023
Empty.
00 Bunder $0.01None
tlc_yellow_trips_2023
Empty.
00 Bunder $0.01None

Full scan = every column of the table at the on-demand list price of $6.25 per TiB, before your free TiB each month. Selecting fewer columns costs proportionally less. See BigQuery pricing.

Example queries

Trips, average fare and distance per month in 2022

Scans 1.4 GiB · under $0.01 on-demand

One year's table and three columns.

SELECT
  DATE_TRUNC(DATE(pickup_datetime), MONTH) AS month,
  COUNT(*) AS trips,
  ROUND(AVG(fare_amount), 2) AS avg_fare,
  ROUND(AVG(trip_distance), 2) AS avg_miles
FROM `bigquery-public-data.new_york_taxi_trips.tlc_yellow_trips_2022`
GROUP BY month
ORDER BY month;

Trips over $500 across all yellow-taxi years with SELECT * (expensive)

Scans 274 GiB · $1.67 on-demand

The tlc_yellow_trips_* wildcard reads every yearly table, and SELECT * reads every column of each.

SELECT *
FROM `bigquery-public-data.new_york_taxi_trips.tlc_yellow_trips_*`
WHERE total_amount > 500;

The same trips counted per year, reading one column

Scans 23.3 GiB · $0.14 on-demand

Same filter, same tables, but only total_amount is read: about 12 times fewer bytes. Add WHERE _TABLE_SUFFIX BETWEEN '2019' AND '2022' to cut it further.

SELECT _TABLE_SUFFIX AS year, COUNT(*) AS trips
FROM `bigquery-public-data.new_york_taxi_trips.tlc_yellow_trips_*`
WHERE total_amount > 500
GROUP BY year
ORDER BY year;

Average tip share by payment type in 2022

Scans 1.2 GiB · under $0.01 on-demand

Cash tips are usually not recorded, so expect a share near zero for code 2.

SELECT
  payment_type,
  COUNT(*) AS trips,
  ROUND(AVG(SAFE_DIVIDE(tip_amount, fare_amount)), 3) AS avg_tip_share
FROM `bigquery-public-data.new_york_taxi_trips.tlc_yellow_trips_2022`
WHERE fare_amount > 0
GROUP BY payment_type
ORDER BY trips DESC;

Busiest pickup zones in 2022

Scans 167 MiB · under $0.01 on-demand

Joins trip location ids to the zone table. Both id columns are strings.

SELECT
  z.borough,
  z.zone_name,
  COUNT(*) AS pickups
FROM `bigquery-public-data.new_york_taxi_trips.tlc_yellow_trips_2022` AS t
JOIN `bigquery-public-data.new_york_taxi_trips.taxi_zone_geom` AS z
  ON t.pickup_location_id = z.zone_id
GROUP BY z.borough, z.zone_name
ORDER BY pickups DESC
LIMIT 20;

Querying it cheaply

  • Each yearly table is a coarse partition: query tlc_yellow_trips_2022, not the wildcard, when one year answers the question. With a wildcard, filter _TABLE_SUFFIX.
  • Within a table there is no partitioning or clustering, so a filter on pickup_datetime does not reduce bytes. Select only the columns you need.
  • The largest tables are yellow taxi 2012 and 2014 (45 and 47 GiB). The green and FHV tables are much smaller.
  • For repeated work on a few years, copy the columns you use into your own table partitioned by DATE(pickup_datetime) (see PARTITION BY).

FAQ

How much does it cost to query NYC taxi trips in BigQuery?

A query on one year with a few columns reads 1 to 2 GiB. Reading every column of every yellow taxi year reads 274 GiB, about $1.67 at the $6.25 per TiB on-demand list price before the free TiB. Most analysis fits easily in the free 1 TiB a month.

Is the NYC taxi dataset free?

Yes for storage: the data sits in the bigquery-public-data project and Google pays to store it. You pay for the queries you run from your own project. On-demand, the first 1 TiB scanned each month is free, then you pay per TiB scanned (see BigQuery pricing).

Which years does the BigQuery NYC taxi dataset cover?

Yellow taxi trips from 2011 to 2022, green taxi trips from 2014 to 2022 and for-hire vehicle trips from 2015 to 2017. The 2023 tables exist but are empty, and the last data update was 2023-03-21.

Does the dataset include Uber and Lyft trips?

Only through the for-hire vehicle tables for 2015 to 2017, which record the dispatching base, pickup time or date and zone, without fares or company names. There are no later for-hire trips in this dataset.

All public datasets · BigQuery cost queries · Pricing calculator

Cut BigQuery spend without guessing

Masthead attributes compute and storage cost to every project, user, pipeline and table, finds unused and dead-end tables, and shows where editions or on-demand pricing is cheaper. Mnemonic cut its BigQuery compute cost by 20% within 24 hours of onboarding.