This project is a comprehensive real-time bus tracking application that leverages modern web technologies and big data processing to provide live bus location tracking and analytics.
- Frontend: Leaflet.js for interactive mapping
- Backend: Python, Flask
- Big Data Processing: Apache Hadoop / HDFS
-
Clone the repository
git clone https://github.com/IMvision12/Real-time-tracking cd Real-time-tracking
-
Set up Python virtual environment
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` pip install -r requirements.txt
-
Navigate to your Hadoop installation directory
-
Locate and edit the configuration files:
etc/hadoop/core-site.xmletc/hadoop/hdfs-site.xml- Ensure network and storage paths are correctly specified
-
Start Hadoop Services
- Open a terminal with administrator privileges
- Run the Hadoop cluster startup command:
start-all.cmd - Verify Hadoop services are running:
- Check NameNode and DataNode status
- Confirm no startup errors in the console
-
Start Data Collection Service
- Update the API key in
config.pyandleaf.jsfiles - Open a new terminal
- Navigate to the project's
srcdirectory:cd Real-time-tracking/src - Launch the MTA Bus API data fetching script:
python main.py - Verify data ingestion is working correctly
- Check console logs for successful API connections
- Monitor initial data retrieval process
- Update the API key in
-
Launch Flask Web Application
- pen another terminal
- Ensure you're in the
Real-time-trackingproject directory - Start the Flask web application:
python app.py
