Stack: Python Β· FastAPI Β· React Β· Recharts Β· scikit-learn
Dataset: NYC Yellow Taxi Trip Data (2025β2026)
TaxiIQ is a full-stack Mobility Intelligence and Decision Support System built on top of NYC Yellow Taxi trip data. It goes far beyond a basic prediction notebook β it is an end-to-end operational platform that combines machine learning, spatial analytics, and real-time heuristics to help drivers, fleet managers, and operators make smarter decisions.
The system provides:
- ETA prediction with uncertainty intervals and delay risk scoring
- Transparent fare band estimation with explainable pricing drivers
- A nearby price finder to identify cheaper pickup zones within a budget
- Corridor reliability intelligence to detect delay-prone routes
- Interactive spatial heatmaps for demand, speed, price, and volatility
- Real-time ML model performance monitoring
taxi_project/
βββ backend/
β βββ full_pipeline.py β Run this first to download data, clean, and train models
β βββ train_clustering.py β Trains K-Means clustering for zone/corridor intelligence
β βββ requirements.txt
β βββ app/
β βββ main.py
β βββ routers/
β βββ predict.py β ETA + Price prediction APIs
β βββ analytics.py β Zone, Corridor, and Heatmap APIs
β βββ nearby.py β Nearby Price Finder logic
βββ data/
β βββ plots/ β 17 auto-generated EDA plots
β βββ taxi_clean.parquet β Cleaned dataset
β βββ zone_metrics.parquet β Zone-level analytics
β βββ corridor_metrics.parquet β Corridor-level analytics
β βββ zone_summary.parquet β Used by Nearby Price feature
βββ models_saved/
β βββ RandomForest.pkl
β βββ GradientBoosting.pkl
β βββ LinearRegression.pkl
β βββ metrics.json
β βββ features.json
βββ frontend/
β βββ src/
β βββ api/client.js
β βββ pages/
β βββ Dashboard.jsx
β βββ ETASimulator.jsx
β βββ PriceSimulator.jsx
β βββ NearbyPrice.jsx
β βββ CorridorDashboard.jsx
β βββ ZoneHeatmap.jsx
β βββ Admin.jsx
βββ start_windows.bat
βββ start_mac_linux.sh
βββ render.yaml
cd backend
python -m venv .venv
# Windows
.venv\Scripts\activate
# Mac/Linux
source .venv/bin/activate
pip install -r requirements.txt# Run from project root
python backend/full_pipeline.py
python backend/train_clustering.pyThis will:
- Download NYC Yellow Taxi 2025 & 2026 trip data
- Clean and engineer features
- Generate 17 EDA plots β saved to
data/plots/ - Train three regression models: LinearRegression, RandomForest, GradientBoosting
- Save trained models to
models_saved/ - Build zone-level and corridor-level analytics tables
- Train K-Means clustering models for zone and corridor intelligence
β³ Estimated time: 5β15 minutes depending on internet speed.
Terminal 1 β Backend:
cd backend
uvicorn app.main:app --reload
# Available at: http://localhost:8000
# Swagger docs: http://localhost:8000/docsTerminal 2 β Frontend:
cd frontend
npm install
npm run dev
# Available at: http://localhost:5173The main overview page that displays live operational KPIs at a glance:
- Average Trip Time β Median trip duration across recent trips
- Average Speed β Traffic flow indicator in mph
- Rush Hour Load β Percentage of trips occurring during peak hours
- Trips Analyzed β Total cleaned trip records the models are trained on
- Average Fare β Baseline fare across all zones
- Price Spikes β Percentage of trips currently experiencing surge pricing
- Traffic Status β Whether traffic is normal or elevated, with an estimated time to the next rush hour
- Live Weather Widget β Current temperature, conditions, humidity, and wind speed for NYC
- Quick Access Cards β One-click shortcuts to all major sections of the platform
An interactive form that predicts trip duration using a multi-model ensemble.
Inputs:
- Trip distance (miles)
- Pickup hour
- Pickup and dropoff borough
- Whether it is a weekend or rush hour
Outputs:
- P50 ETA β The median (most likely) trip duration
- P90 ETA β The worst-case duration estimate (90th percentile)
- Confidence Score β A 0β1 score indicating how certain the model is
- Delay Risk β Categorized as Low, Medium, or High based on corridor and time patterns
- Intelligence Insights β Contextual notes explaining what is driving the prediction
This feature helps drivers plan shifts and gives passengers accurate arrival windows.
A tool for estimating the fare range for a given trip with full pricing transparency.
Inputs:
- Pickup and dropoff zone
- Trip distance
- Hour of travel
Outputs:
- MinβMax Fare Band β The expected price range for the trip
- Pricing Drivers β Explainable factors such as zone demand, congestion, and airport surcharges
- Surge Spike Indicator β Whether the current supply/demand ratio is causing a price spike
This feature supports dynamic pricing management and helps passengers understand why a fare is what it is.
A key differentiating feature that helps users find cheaper pickup alternatives near their current location with real-time budget intelligence.
How to use:
- Type any NYC zone name β autocomplete is supported
- Optionally enter a maximum budget in USD
- Click Find Cheapest Nearby Zones
Key Logic & Smart Alerts:
- Live System Integration β Passes current hour to backend for time-sensitive pricing
- Budget Auto-Fix β If no zones match your budget, it automatically suggests the nearest available options
- Price Threshold Alerts β Notifies users if prices are high (>$20) or "Too Much" (>$50)
- Visual Mapping β See cheaper alternatives as interactive markers on the map
- Live Status Badge β Pulse indicator showing real-time connectivity to the intelligence layer
An interactive spatial map that visualizes trip metrics across all 260+ NYC taxi zones.
Switchable metrics:
- Activity β Trip volume and demand density by zone
- Price β Average fare per zone
- Speed β Average traffic speed indicating congestion levels
- Volatility β Risk of price or duration variation within a zone
This feature helps operators identify "hot zones" where demand is high but vehicle availability is low, enabling strategic repositioning to maximize utilization.
A detailed route-level analysis panel for understanding the reliability of specific Pickup β Dropoff pairs.
Data provided per corridor:
- Trip Volume β How frequently this route is taken
- Delay Ratio β How much slower the route is compared to the theoretical fastest case
- Status Labels β Automated classification as Reliable, Volatile, or Slow based on K-Means clustering
Charts and filters:
- Sort corridors by volume, delay ratio, or volatility
- View historical delay patterns over time
- Identify bottleneck corridors that consistently underperform
This feature allows drivers to choose alternate routes and set appropriate time buffers for known unreliable corridors.
Displays real-time route conditions for active corridors, combining historical analytics with live traffic heuristics to flag routes that are currently performing below expected baselines.
A high-level spatial view highlighting zones with above-average demand at the current time of day, updated dynamically based on historical patterns for the current hour and day of week.
A summary view of all major corridors in the system, ranked and filterable. Provides a comparative snapshot of route performance without diving into the full Corridor Intelligence detail panel.
A monitoring panel for technical oversight of the underlying ML models.
Metrics displayed:
- MAE (Mean Absolute Error) β Average prediction error in minutes
- RMSE (Root Mean Square Error) β Penalizes large prediction errors more heavily
- RΒ² Score β Overall explanatory power of the model (closer to 1.0 is better)
These metrics are shown per model (Linear Regression, Random Forest, Gradient Boosting) so the team can identify when a model needs retraining.
| Model | Description |
|---|---|
| Linear Regression | Baseline model for interpretability |
| Random Forest | Ensemble of 150 decision trees with max depth 12 |
| Gradient Boosting | 150 estimators with a learning rate of 0.1 |
| K-Means Clustering | Intelligence layer for zone, corridor, and time-based segmentation |
Features used for prediction:
trip_distance, pickup_hour, pickup_weekday, is_weekend, is_rush_hour, pickup_is_manhattan, dropoff_is_manhattan, pickup_is_airport, dropoff_is_airport, congestion_factor, corridor_volatility, pickup_month, speed
Prediction output fields:
eta_p50β Median trip duration estimateeta_p90β Worst-case trip duration estimateconfidenceβ Model confidence score (0β1)delay_riskβ Low / Medium / High classification
The pipeline auto-generates the following exploratory data analysis plots, saved to data/plots/:
- Trip Duration Distribution
- Speed Distribution
- Duration by Hour of Day
- Demand by Hour
- Weekend vs Weekday Duration
- Average Duration by Borough
- Top 10 Pickup Zones
- Top 10 Delay-Prone Zones
- Top 10 Slowest Corridors
- Most Unstable Corridors
- Price vs Distance
- Price / Expected Ratio
- Price by Traffic Level
- Delay vs Traffic Level
- Duration Variability by Hour
- Model Residuals
- Feature Importances
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/predict-eta |
Returns ETA P50, P90, confidence score, and delay risk for a given trip |
| POST | /api/estimate-price |
Returns fare band, explainable pricing drivers, and spike indicator |
| GET | /api/nearby-price?zone=Midtown&budget=30 |
Returns cheapest nearby zones ranked by savings |
| GET | /api/zone-stats |
Returns analytics for all 260+ NYC taxi zones |
| GET | /api/corridor-stats |
Returns route-level delay, volume, and reliability metrics |
| GET | /api/heatmap-data?metric=avg_price |
Returns spatial metric data for the heatmap |
| GET | /api/eda-summary |
Returns summary statistics from the cleaned dataset |
| GET | /api/model-metrics |
Returns MAE, RMSE, and RΒ² for all trained models |
| GET | /api/zone-list |
Returns all zone names for autocomplete fields |
Full interactive documentation is available at http://localhost:8000/docs (Swagger UI) after starting the backend.
- Operational Efficiency β Reduce empty cruising time by moving vehicles toward demand zones
- Revenue Optimization β Identify best-paying zones and time windows
- Customer Satisfaction β Provide accurate ETAs and transparent fare breakdowns
- Data-Driven Strategy β Replace intuition-based driving with intelligence-backed routing
- Real-time traffic feed integration for live corridor updates
- Quantile regression for statistically improved prediction intervals
- Automated model retraining pipeline triggered by performance degradation
- User authentication with saved routes and personalized history
- Live monitoring alerts for price spikes and corridor failures
| Layer | Technology |
|---|---|
| Backend | Python, FastAPI, uvicorn |
| ML / Data | scikit-learn, pandas, NumPy, pyarrow |
| Frontend | React, Vite, Recharts |
| Deployment | Render (backend), Vercel (frontend) |
| Data Format | Parquet (efficient columnar storage) |
Codebase_Technical_Documentation.mdβ In-depth code architecture referenceData_Analysis_Documentation.mdβ Feature engineering and EDA methodologydashboard_explanation.mdβ Dashboard component breakdownDataset_Exploration.ipynbβ Jupyter notebook for dataset exploration
https://drive.google.com/file/d/1E7VeSW8hYbZrXloq4_AOp9qm7nJGcvtO/view?usp=sharing
Built by Surbhi Agarwal & Triveni Reddy | NYC Taxi Intelligence Platform