A month and a half back, I made a map of bus routes in Colombo that became a surprise hit. This, coupled with the number of calls Himal was getting asking which bus to take, made me think that a website that tells you which buses to take from location A to location B would be pretty useful. With my beginner-level knowledge of SQL, JavaScript and PHP, I was able to cobble together a website that helps you find the bus route to your destination.
The system is far from perfect (it has only 25 or so bus routes, from the 70 odd listed in the Colombo bus routes Wikipedia article), and so it could do with some improvement, which is why I'm releasing the source code and the database SQL under the GNU GPL. :) So, I hope someone who's better with buses and code can take this to the next level. So, do feel free to modify, change, and host as you please, and please excuse the n00bish code, I'm kinda new to this! :D
A better algorithm for finding buses would be really nice, since all buses are not created equal. Waiting for a 135 that never came on a Sunday afternoon in Narahenpita, or getting late for an appointment because some fool recommended you take a 255 (worst bus ever!!!) from Kottawa to Mount Lavinia, is uncool. A better system with some sort of ranking algorithm would solve this problem, me thinks. :)
Hope you guys find the system useful. There is a mobile version of the site, but my stupid web host won't let me automatically redirect users to it using htaccess. :( A special Thank You to all my friends who helped me with this, and especially Mr. Inosh Perera, who helped me with the 187 bus route and also suggested I add Google Maps geolocations to bus halts. :)
Update: Bus Route Finder on GitHub (Thanks, John!) :D
nice!
ReplyDeleteI know nothing about codes and shit and close to nothing about bus routes , for all the time I've lived in colombo I can still get easily lost but this sounds so coool ! xoxo. keep it up.
ReplyDeleteNeat and nice! :)
ReplyDeleteNice work man- esp liked the minimalist design.
ReplyDeleteI'm a product of ur alma mater(!) currently working in software engineering (expat). Here's the transport timetable site we have[http://metlinkmelbourne.com.au/]- hope you get an idea or two to improve your work
sorry, your host isn't letting me download the code. Throw it up on github instead?
ReplyDeleteThis will make it easier for people to patch or clone, and for your selected license - it is completely free.
Shabith and Ishan - Thanks, guys! :D
ReplyDeleteMiddle Child - Thank you. Hope you find it useful! :D
Anon 1 - Thank you! :D That is pretty neat. Hope this system will be up to that standard in usefulness. :)
Anon 2 - Tried to get it on Github, with no success. :D Hopefully one of my friends will do it and I'll be able to share the link. The download link should work now, though. :)
Thanks for the comments, everyone! :D
This is fucking awesome!
ReplyDeleteChanux - Thanks, man! :D
ReplyDeleteAWESOMELY COOL :)
ReplyDeleteWow.. I'm amazed by it's usability.. Good work dude.. +1 to your effort and making it opensource. I simply feel you have done the majority of the work which doesn't need improvement. But I hope requirements will grow and everyone can chip in to improve it.. Again, good work..
ReplyDeleteBro, this is a freaking awesome tool
ReplyDeleteNice work!!!
ReplyDeletegreat work dude!
ReplyDeleteits a peach!
ReplyDeletegood dude but please update other information such as jaffna to colombo, and other places...
ReplyDeletecooool
s.saththiyan
MD/CEO IDM JAFFNA
MD/CEO Softnet
CAO Intermatriexs
This is the best thing that has happened. Would like to see if you can integrate the map you designed along side of Google maps as well. (like they do on the London transport website)
ReplyDeleteGreat work... really useful
ReplyDeletereally nice work.. thumbs up.. exactly the one that i was searching for ages..
ReplyDeletethanx buddy..
small suggestion: better to add some alternate buses/routes
This is really wonderful and a brilliant idea... and kudos for making it open source!
ReplyDeleteThanks, guys! :D Thank you for the feature requests and suggestions as well. Will hopefully be able to make the system better together with the other developers. :)
ReplyDeletegood stuff. you should ask all the tourism sites to integrate this to their sites. foreigners would love this too.
ReplyDeletesome more suggestions, for anyone interested in further development:
ReplyDeletea. include bus fares (will need to update frequently ;))
b. integrate with a gps device/ maps- for mobiles( to insert locations)
c. approx time for the journey
d. improvements in best route selection (eg. panadura to delkanda: dehiwala-nugegoda route is better)
e. add alternate routes
f. bus time tables
dnt think i'm asking too much, this is to make it more handy..
azure-0:
ReplyDeletefor a, do you have a fare table for buses? it has been a few years since I traveled on a bus, but I remember there is a base fare and then additions at every major junction. Give me examples for a few routes and i can try to figure it out from there.
Except c, d and f, the other things are either doable or already done. c depends on too many factors [can provide a wildly inaccurate guess], d is difficult but being worked on (why do you think your route is "better" is an interesting question?), f - I don't have a clue. never traveled on buses with a timetable in this country.
btw: I am not the original author, just made a few changes and shared them back. it is an interesting problem to try to solve for me :)
Just a suggestion, try integrating this with the LiFE Location Code Navigator from ICTA - http://repository.icta.lk/LIFe/navigate
ReplyDeleteThis is some genius work! You gotta improve it. Try considering suggestions by "azure-0" too.
ReplyDeleteSmart work! Appreciate the fact that you made it open source.
ReplyDeleteTry adding few options like shortest part / fastest path. E.g. It may be faster to pick a 138 and take a borella bus from town hall rather than waiting for 135 Bus to go to Borella from Thimbirigasyaya.
This is really cool stuff!!! Works like a charm! keep it up!
ReplyDeleteGreat idea... really cool..
ReplyDeleteKeep up the good work!!
Thanks everyone! :D
ReplyDeleteAzure-0: Thanks for those suggestions. I think Thimal commented below you, and his code is available at https://github.com/thimal/Bus-Route-Finder, where he's implementing a lot of route based options, ranking and suggestions. :D
K - Thanks! :D Yeah, we need to improve the suggestions, and crowd-sourcing that data would be the best way to go, methinks. :)
Thanks for the comments, everyone. :D I haven't been able to mess with the code in a while because of other work, but hopefully when I get holidays in October, I can begin contributing again. :D
good idea.
ReplyDeleteSome suggestions: Let users to add routes. That will be more scalable than one adding all routes.
An Android app for this will be of greater use than a website.
Thanks everyone. :) Hopefully I can do some more work on it, especially make an extension for people to add their own routes, and an API. For some reason this app feel like "ugh noooooo!" whenever I try to work with it, which is weird coz I work with much more complicated apps usually. :S
ReplyDeleteYou should get this app done for mobile platforms. I cant stand these bus routes. This is the only thing I have for a correct solution.
ReplyDeleteIf we could plot the bus stop locations to their GPS coords, we could get Google maps to work with this. Like from to directions pointed from the map and we select the nearest bus stations to get the route.
I still dont get your logic in selection overlapping intersection points for two stage buses. Is it OK to develop this for android if I get the idea?
Well, the logic in that was, that unlike all these theoretical routing algorithms (shortest path, minimum cost spanning tree stuff etc) where switching between routes doesn't cost anything, switching from bus to bus is an inconvenience for the user, and we need to reduce the number of bus routes he has to take as much as possible. The simplest mechanism I could find to do this was having changeover points (but there might be better ways of doing it).
ReplyDeleteYou might be interested in the Android app for this that Aloka is building. He will (hopefully) be demoing it at the next Refresh Colombo. :D
Just checked the beta app! I love the usability of this app!
ReplyDeleteThanks, mate. :D
ReplyDeleteThe information on bus route finder is totally up to date and I liked lot of essentail aspects about it. Thanks for sharing it.
ReplyDeleteHi
ReplyDeleteFirst of all thank you for the Great work!
I am not sure how far you guys got with this, I am more than happy to contribute my knowledge if you needed.
Also What is the name of the app that you developed? I am developing a SL Map app with some few more features so it would be good if we can include this as well(btw I'm using Djikstra's algorithm)
Sanj