This project provides a web interface for uploading vehicle trajectory data, processing it with a Hidden Markov Model (HMM), and displaying the results on an interactive map.
- Python 3.7+
- pip (Python package installer)
- git
Follow these steps to set up and run the project:
-
Clone the Repository:
https://github.com/shivas1516/map-matching.git cd map-matching-hmm
-
Create a Virtual Environment:
python -m venv venv
-
Activate the Virtual Environment:
- On Windows:
venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
-
Install the Required Packages:
pip install -r requirements.txt
-
Run the Flask Application:
python app.py
-
Open the Web Application:
Open your web browser and go to
http://127.0.0.1:5000/
.
-
Prepare Your CSV Data File:
Ensure your CSV file contains at least
lat
(latitude) andlon
(longitude) columns, along with optional additional columns liketimestamp
. -
Upload and Process Data:
- On the web interface, click on the "Choose File" button and select your CSV file.
- Click the "Run Map Matching" button to upload the file and process the data.
- The processed map will display both the original and matched points.
Here's an example of how your CSV file might look:
Download as CSV
Save this as trajectory_data.csv and upload it through the web interface to see the results.