Skip to content

CodingRookie97/ICT1008Proj1

Repository files navigation

ICT1008 AY2019/20 Data Structures & Algorithms Project

Group P2-3

Project Title: It's all about Punggol West!

Developing a program to route the shortest path from a selected start point to a selected end point using different modes of transportation. This program only covers a selected area of Punggol West.

JSON FILE Dataset

This program uses data stored in .json files for the majority of its operations.

JSON files used for this program:

Location Data:

Coordinates for HDB blocks and major landmarks in the area of interest.
Stored within the Buildings folder.

  1. General Landmarks Dataset: general_buildings.json
  2. HDB Landmarks Dataset: residential_buildings.json

MRT Data:

Coordinates for all MRT stations and data on train paths.
Stored within the MRT folder.

  1. MRT/LRT Stations Dataset: mrt.json
  2. Entire Punggol West LRT Line Path Dataset: train.geojson

Bus Data:

Coordinates for all bus stops and data on bus services and the bus routes taken by each of these services. Also contains additional road coordinates to help the program plot better paths in a visual format.
Stored in Bus_Stops, Bus_Services and Bus_Path respectively.

  1. Bus Stops Dataset: bus_stop.json
  2. Bus Services Dataset: Bus_XX_from.json
  3. Road Dataset

Combined Data:

A combined data set with major information from each to make accessing data easier for the program.
Stored within the Combined folder.

  1. Combined Landmarks + MRT + Bus Datasets: nodes.json

Prerequisite Downloads

In order to run the application successfully, you are strongly encouraged to download and install the packages listed below:

1. Python 3.x: Python version 3.x or up is required.

Latest version is recommended.
Download from: https://www.python.org/downloads/

2. PyQt5: Python's GUI framework

Run this command through the command line:
pip install PyQt5

3. PyQtWebEngine: A set of Python bindings for The Qt Company’s Qt WebEngine framework.

Run this command through the command line:
pip install PyQtWebEngine

4. Folium: Parsed Open Street Map API to display the Leaflet map in Python.

Run this command through the command line:
pip install folium

5. Haversine: Dynamically calculates the distance (in km) between 2 coordinates that can be used for Dijkstra Algorithm.

Run this command through the command line:
pip install haversine

Main Functions

The main functions of this program:

  • Displaying 4 different kinds of nodes into the folium map that is represented by different logos for different landmarks
  • Allowing users to select any starting and ending location to determine the shortest path to reach their destination
  • Displaying bus routes for the bus services that ply through Punggol West
  • Displaying the shortest walking path, fastest bus path, fastest train path via different colours in the map
  • Algorithm Used

    This program uses Dijkstra's algorithm to determine:

    1. Shortest Walking Path
    2. Fastest Bus Path
    3. Fastest Train Path

    Data Structures Used

    This program uses these data structures:

    1. Ordered Dictionary: To store node information for the paths.
    2. List: To store relevant node information from our datasets.

    References

    These are the websites that we have referenced from during our research & development phase:

    1. Folium (Python parser to parse map from HTML to Python): https://python-visualization.github.io/folium/
    2. GeoJSON (Manual plotting of the nodes, area of interest outline, bus service routes): http://geojson.io/
    3. OneMapSG (Plotting of several residential nodes): https://www.onemap.sg/main/v2/
    4. PyQt5 (For GUI purposes): https://pypi.org/project/PyQt5/
    5. Overpass Turbo EU (To query the results to retrieve selected coordinates from Open Street Map: https://overpass-turbo.eu/
    6. Bus Router SG (Plotting out the bus routes and deciding on bus stop coordinates): https://busrouter.sg/
    7. Dijkstra Algorithm: https://dev.to/mxl/dijkstras-algorithm-in-python-algorithms-for-beginners-dkc
    8. Dijkstra's shortest path algorithm: https://www.bogotobogo.com/python/python_Dijkstras_Shortest_Path_Algorithm.php
    9. How to include Folium map into PyQt5 Window: https://stackoverflow.com/questions/60437182/how-to-include-folium-map-into-pyqt5-application-window

    About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published