Skip to content
AhmedSYD edited this page Apr 22, 2021 · 5 revisions

Welcome to the Best Path to the Nearest Hospital wiki!

About Project

In this project, applications of using location data alongside map layers and trajectory processing features are going to be discussed. A GeoWeb for the city of Calgary will be created that will help to commute to the points of interest. To this end, Mapbox will be used as the basis for bringing up a map. For the list of the points of interest, the dataset of the city of Calgary is used.

Problem Stating

Finding the nearest point of interest and the best route to it is an important practice for everyday life. Whether it is a restaurant a user is looking for, or a hospital, in case of an emergency, it is always beneficial to find the best route to the point. The best route can be defined by different characteristics of the trajectory. A trajectory can be assigned as the best route if it has the shortest spatial length, is the fastest in terms of time, or has the least number of traffic signals on it.

Objectives

Given the location of the user, this project aims to find the best route, as defined above, to a given point of interest. For this project, the point of interest is defined to be a hospital. A user will enter their location by clicking on the map. The framework will take this location and initiate a query for the nearest hospitals to the user’s location. The user will be able to select a hospital from this list and the shortest path to that hospital will be shown on the map.

In this document, we are going to first show the requirements for setting up and accessing the website. Next, we will walk through the different functionalities and demonstrate how the user can benefit from them.

System requirement:

  • Any platform you like such as Windows, Linux, and so on.
  • Use any browsers (Firefox, Google Chrome,...) to display the html pages.
  • Python 3.6 or higher

Libraries required to install:

  • psycopg2==2.8.5
  • psycopg2-binary==2.8.6
  • SQLAlchemy==1.3.19
  • Flask==1.1.2
  • requests==2.24.0
  • Flask_SocketIO==5.0.1
  • Flask_JSGlue==0.3.1
  • Flask-Session==0.3.2
  • click==7.1.2
  • click-plugins==1.1.1
  • Jinja2==2.11.2
  • gunicorn==20.1.0
    You can find the libraries in the requirements.txt and install them by running this command pip3 install -r requirements.txt in the terminal window.

Tools and Resources are used:

Database Tables:

Three tables are created in our database:

  1. Users table and its attributes are: ID, First Name, Last Name, Username, and passwords.
  2. Hospitals/Clinics table and its attributes are: ID, Name, Type, Address, and Comm_code.
  3. Reviews table and its attributes are: Id, Rate, comment, User_id (foreign key for users table), and Hospital_id (foreign key for Hospitals/Clinics table)