cheeaun / busrouter-sg

BusRouter SG: Singapore Bus Routes Explorer

Home Page:https://busrouter.sg/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[feature request] Add NUS bus routes data

davidchoo12 opened this issue · comments

Data can be retrieved from:
http://nextbus.comfortdelgro.com.sg/testMethod.asmx/GetBusStops?output=json
and
http://nextbus.comfortdelgro.com.sg/testMethod.asmx/GetShuttleService?busstopname=COM2
Bus routes data can be retrieved from:
http://www.nus.edu.sg/oca/Transport/Getting-around-NUS.html

I am a frequent user of your website, and I appreciate the work. It would be great if you can integrate the internal shuttle buses into your website as well. Thanks 😄

I'm willing to work on this if pointed in the right direction. 😄

Hmm this looks like a 3-step work @liaujianjie

  1. Bus stops - can start by writing the scraper script, like tasks/fetchStopsLTA.js (or any tasks/fetchStops*** files), which by right should generate a file like data/3/stops.nus.json with almost the same data format. I think if these bus stops are not in the current list of stops, maybe will need to put in more info like bus stop names. The rest of the work I'll handle it :)
  2. Bus arrivals - will need to be done on https://github.com/cheeaun/arrivelah instead. Should be straightforward if can map all the values together.
  3. Bus routes - Looks like the link has moved to https://uci.nus.edu.sg/oca/transport-logistics-carpark/getting-around-nus/ 🤔 - also I don't see any routes info with coordinates. This might be a little bit difficult...

Bus routes - Looks like the link has moved to https://uci.nus.edu.sg/oca/transport-logistics-carpark/getting-around-nus/ 🤔 - also I don't see any routes info with coordinates. This might be a little bit difficult...

I created 2 maps for the nus bus routes. Google My Maps limit layers with driving routes so I had to split to 2. The maps use bus stop coordinates from http://nextbus.comfortdelgro.com.sg/testMethod.asmx/GetBusStops?output=json and the routes are made by manually linking the stops of each one using the "add driving route" feature. Note that the maps were made 10 months ago, so some of the routes might be outdated.
https://drive.google.com/open?id=12_j-wc4SFZ6buYzA5BMopj9iK4H-dbkR&usp=sharing
https://drive.google.com/open?id=111X4zI5LSVSB7eUwNEX3XR6M_NwAm-ZT&usp=sharing

Let me know how I can help 😃

P.S. Hi fellow CS2103 student @liaujianjie

@hidingmode Thanks, that's super helpful!

@cheeaun Since the routes data isn't provided as an API from elsewhere, should I just plonk the data from @hidingmode into data/3/routes/nus/...?

Edit:

Also, the data from the API above doesn't provide the road name. So my current implementation re-use the bus stop name for the road name:

{
	"LT13-OPP": {
		"BusStopCode": "LT13-OPP",
		"RoadName": "Ventus (Opp LT13)",
		"Description": "Ventus (Opp LT13)",
		"Latitude": 1.29530000686646,
		"Longitude": 103.770599365234
	}
}

Are we ok with this?

@liaujianjie data/3/routes/nus/... looks good to me 👍

Seems fine to me also if you use the road name as the stop name, since it's better than no names at all 😄

Hey guys. I'm the 40th NUSSU EXCO Deputy Welfare Secretary for Internal Shuttle Bus matters. This seems like a very interesting project - do let me know if I can help in any way at depwelfare.ryan@nussu.org.sg!

By the way, you guys might want to check out the UCI website. They've updated the maps yesterday, replacing the previous graphic (which was just a list of stops) with an actual diagram overlaying the route and stops onto a street map.

I've been pretty busy with school and work lately, gonna try wrap this up this week!

@RyanChng Hey, thanks for offering to help! I can't seem to find the map you mentioned about on the UCI website. Do you mind sharing the link to it? Also, it would be great if there's an official API for the bus routes, is there any?

Oh, the link I’m referring to is https://uci.nus.edu.sg/oca/transport-logistics-carpark/getting-around-nus/ (sorry posting from mobile); you’ll need to click “internal shuttle bus” and then hit the links for the bus routes (uploaded as PDF maps). For API for bus route I’m still not sure. Might exist but on comfortdelgro's end.

Also, it would be great if there's an official API for the bus routes, is there any

@liaujianjie looking at http://nextbus.comfortdelgro.com.sg there seems to be an endpoint named GetActiveBus for routes, but it requires a token to access. Not sure if @RyanChng has access with the token?

Oh @hidingmode sorry I wouldn't have it, probably only an employee of CDG would!

seemed like not much progress from here, can i work on this one?

Closing this (and the PR).

  1. The API seems like no longer there?
  2. The data collection work has been ejected to a separate repository 👉 https://github.com/cheeaun/sgbusdata
  3. Anyone looking forward to work on this can start a new issue/discussion there.

Thanks 🙇