Skip to content

A trip planning application, named as TSP Navigator, that recommends the shortest round-trip route covering all selected destinations. It is enriched with interactive maps and destination info.

License

Notifications You must be signed in to change notification settings

AkNegi924/TripPlanningApplication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo: https://www.youtube.com/watch?v=muAkncYRhTE

Screenshot (619)

Travel Recommender System and TSP Solver

This Python application utilizes Flask and various libraries to provide travel recommendations based on user preferences and generate the optimal path for a trip using the Traveling Salesman Problem (TSP) solver.

Screenshot (620)

Execution Steps

Prerequisites

Make sure you have the following installed:

  • Python (3.x recommended)
  • Required Python libraries (pip install):
    • Flask
    • NetworkX
    • Matplotlib
    • Pandas
    • Geopy
    • Folium
    • Requests
    • Wikipedia-API

Screenshot (621)

Execution

  1. Clone the repository or download the code files.

  2. Install the required dependencies:

    pip install flask networkx matplotlib pandas geopy folium requests wikipedia-api
  3. Run the application:

    Navigate to the directory where the code is located and execute:

    python main.py

    main.py is the name of the Python file where your Flask application is defined.

  4. Access the application:

    Open a web browser and go to http://localhost:5000 to access the application.

Screenshot (622)

Usage

  1. Visit the home page to initiate the travel recommendation process.
  2. Enter your preferences (budget, weather, distance) and location.
  3. Receive recommendations based on your preferences.
  4. Choose cities and view the optimal path or explore them on the map.

Files and Structure

  • main.py: The main Flask application file.
  • destinations1.xlsx: Excel file containing destination information.
  • templates: Directory containing HTML templates for web pages.
  • static: Directory for static files (CSS, images, etc.).

Important Functions

  • getrec: Retrieves recommended cities based on user preferences.
  • find_tsp: Finds the optimal path using the TSP algorithm.
  • generate_tsp_graph: Generates a visual representation of the optimal path using Matplotlib.
  • create_map: Creates an interactive map with recommended cities using Folium.

Screenshot (623)

Notes

  • The code utilizes destination data from an Excel file (destinations1.xlsx). Ensure the file is in the correct format and contains the necessary information.
  • Modify or replace the get_coordinates1 function to fetch actual coordinates or integrate with a live location service if needed.

Acknowledgements

This application uses various Python libraries and APIs to provide travel recommendations and solve the TSP. Credits to their respective developers and communities for their contributions.

About

A trip planning application, named as TSP Navigator, that recommends the shortest round-trip route covering all selected destinations. It is enriched with interactive maps and destination info.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published