Giter Club home page Giter Club logo

hugonzb / drawing-bus-routes Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 40 KB

A Python program that takes bus route source and destination details then generates a .PNG file which visualizes city nodes and highlights the cheapest route. This was a solo etude for COSC326 as a solution for a given problem. This can be used for general purposes to visualize a shortest path between given nodes (not just bus routes).

Python 100.00%
python networkx networkx-graph

drawing-bus-routes's Introduction

Clone the repository: https://github.com/hugonzb/Drawing-Bus-Routes.git

Compile and run in a Unix terminal (input file as an argument): python3 DrawingBusRoutes.py example.txt

Use a .txt file that contains input which follows the same format as the test cases below. Feel free to simply copy and paste these test cases to use in your input file.

Example Test cases:

Christchurch, Dunedin
Christchurch, Rolleston, 5.5
Rolleston, Temuka, 15
Temuka, Timaru, 16.5
Timaru, Oamaru, 27
Oamaru, Palmerston, 21.5
Palmerston, Dunedin, 23
Christchurch, Palmerston, 85.5

Dunedin, Wanaka
Christchurch, Rolleston, 5.5
Rolleston, Temuka, 19
Temuka, Timaru, 10.5
Wanaka, Rolleston, 50
Dunedin, Rolleston, 20
Dunedin, Wanaka, 10

Timaru, Rolleston
Timaru, Christchurch, 10
Christchurch, Temuka, 15
Temuka, Timaru, 16.5
Temuka, Rolleston, 50
Dunedin, Rolleston, 20
Rolleston, Wanaka, 40

CityOne, CityFour
CityOne, CityThree, 70
CityThree, CityTwo, 10
CityTwo, CityFour, 5
CiyFour, CityFive, 7
CityFive, CitySix, 14
CitySix, CitySeven, 20

drawing-bus-routes's People

Contributors

hugonzb avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.