Ask about NYC yellow taxi trips from 2011 to today. A Gemini agent
writes and runs BigQuery SQL to answer, estimates fares with a
random forest, and forecasts future trips with histogram gradient
boosting.
See the code.
The data
Every yellow taxi trip since 2011
Public trip records from the NYC Taxi & Limousine Commission,
aggregated in BigQuery, and updated automatically each week by a
scheduled Cloud Run job, with CI/CD through Cloud Build.
ETL routinely combines BigQuery's public taxi tables (2011–2022)
with the TLC's current monthly published files.
Fare estimates
What would a trip cost?
Predicts metered fares with distance, pickup time, trip length, and
number of passengers.
A random forest trained on 1.3 million sampled trips from 2011 to 2026.
On held-out trips the model was off by $0.54 on average (R² = 0.94).
Forecasts
How busy will it be?
Forecasts trips and average fares for future hours, days, weeks, or
months.
Histogram gradient-boosted models trained on hourly data since
2023 purposely to avoid COVID-era ride changes and NYC fare
changes.
On the last 3 months, held out, trip counts were off by 7.9% per
hour, beating a “same week last year” guess (10.6%).
Try one of these, or ask your own:
Each visitor can ask 5 questions a day. Answers come from a language
model and can be wrong.