NYC FareFinder is a web application designed to predict taxi fares in New York City using machine learning. Built with a modern tech stack, the app leverages an Extra Trees Regressor model (R² score of 0.94) to provide accurate fare predictions, helping users plan their trips efficiently.
Below are some screenshots showcasing the NYC FareFinder interface:
| Fare Prediction Form | Prediction Result |
|---|---|
![]() |
![]() |
- Accurate Fare Prediction: Predicts taxi fares using an Extra Trees Regressor (R² score: 0.94) based on factors like passenger count, traffic, weather conditions, pickup time, and distance.
- Responsive Design: Fully responsive layout using Tailwind CSS, with a glowing form border for user inputs.
- Frontend: Vite, React (TypeScript), Tailwind CSS
- Backend: Django (Python)
Before setting up the project, ensure you have the following installed:
- Node.js:
v22.14.0 - npm:
11.2.0 - Python:
3.11.9
The project is divided into three main directories:
fare-prediction-frontend/: Contains the React frontend.fare_prediction/: Contains the Django backend and ML models.notebooks/: Contains Jupyter notebooks for EDA, Preprocessing and Training of various Regressor models.
-
Option 1: Train the Model Yourself
- Download the dataset from this link.
- Navigate to the
notebooks/directory and run the Jupyter notebooks in order.
-
Option 2: Use the Pre-Trained Model
- Download our existing trained Extra Trees Regressor model from this link.
- Place the
Extra_Trees.pklfile in thefare_prediction/models/directory.
Clone the project repository to your local machine:
git clone https://github.com/mohababsa/nyc-farefinder.git
cd nyc-farefinderCreate and activate the virtual environment:
python -m venv fare_prediction_venv
.\fare_prediction_venv\Scripts\activate # Windows
# For macOS/Linux: source fare_prediction_venv/bin/activateInstall python dependencies:
pip install -r requirements.txtNavigate to the backend directory and run the Django development server to ensure the backend is working:
cd fare_prediction
python manage.py runserverThe backend should be accessible at http://localhost:8000.
Navigate to the Frontend Directory:
cd ../fare-prediction-frontendEnsure you have Node.js v22.14.0 and npm 11.2.0. Install the required packages:
npm installThe app uses icons from @heroicons/react/24/outline. Install it:
npm install @heroicons/reactVerify Tailwind CSS and Vite Configuration.
Start the React development server:
npm run devThe frontend should be accessible at http://localhost:5173.
Contributions are welcome! Please fork the repository, create a new branch, and submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
Built as part of an internship project at CellulaTechnologies.

