...yes, that is the project name. Keep it simple. It's originally called "Is there any bus for this route near me?" but it's too long.
This is a simple-to-use bus tracker that utilizes the GTFS realtime feed from the open data by Malaysian Government, which is then used to track buses. Data is provided by Prasarana via data.gov.my.
| Provider | Data source | Status | Remarks |
|---|---|---|---|
| rapidPenang | data.gov.my GTFS-Realtime data (Direct) |
Available (static only) | Station stop data is inaccurate due to stop estimation between current coordinates and static station data |
| rapidKL | data.gov.my GTFS-Realtime data (Direct) |
Available | Station stop data is inaccurate due to stop estimation between current coordinates and static station data |
| rapidKuantan | data.gov.my GTFS-Realtime data (Direct) |
Available (static only) | Station stop data is inaccurate due to stop estimation between current coordinates and static station data |
| myBAS Johor Bahru | data.gov.my |
Planned |
Do note that data refresh rate for this is hardcoded to the 30th second and the initial second of every minute (0), which follows this specification from data.gov.my.
"Direct" means that this web app will fetch the available API endpoints on data.gov.my instead of relying on external APIs.
- rapidKL: It is unsure about which bus routes are currently in operation as the data returns all bus routes, including the non-operating ones. Possible temporary fix to detect bus stations from the
routes.jsonfile will be implemented soon. - Migration: If a user visits the
b.ntyx.devinstance before the migration to bus? v2, the data will not be loaded and the Settings page returns a blank screen. If you face this problem, please clear cookies on your mobile device, or visit through other browser or Incognito Mode. A fix that checks the difference between cookie data of bus? v2 and bus? v1 will be available soon.- A temporary fix has been applied for language and display method as these options are only available on bus? v2. If the cookie variable is not detected, it creates the cookie variables with the default value under the Home component.
- Global: Station info inaccurate for some stations (previous, current, next). Please see myRapid PULSE app for accurate info. Location data is accurate.
- Known ones include: rapidPenang (for mainland and loop). Please do help me confirm about accuracy of rapidKL and rapidKuantan data.
- Global: Some data shows "unknown location" for all 3 station placeholders. This is due to some bugs on the
getNearestcode. - Global: If the array is blank (no data), nothing will be shown except for "Bus info". There will be a placeholder soon.
- Global: Searching for loop routes will result in
getNearestcounting the first appearance of the station instead of the second appearance. - rapidPenang and rapidKuantan: No realtime data available through this web app due to parsing reasons. Refer to myRapid PULSE for realtime bus data for these providers.
- Global: Unable to parse days through static data, which I do not understand how trip IDs work in this case
- Global: Search for static data does not work
For these issues, please open an issue immediately if you see it.
- "temporary datacard placeholders so no rate limits will be applied for this one" shows up instead of the normal card
Do note that the data here is not completely accurate - it is recommended to check for myRapid PULSE (dynamic) or Google Maps (static) for more accurate info for bus arrival times.
Station names (including route names) are stored as a static JSON file under the data/stnInfo directory, while the file names being [PROVIDER]_[ROUTE_NUMBER][DIRECTION].json. For the direction:
-
Ais the forward position. (example:301Adirects toJETI - RELAUin rapidPenang) -
Bis the reverse position. (example:301Bdirects toRELAU - JETIin rapidPenang)Data includes:
-
Station name is stored under
stop_name. -
Latitude and Longitude of the station are stored respectively under
stop_latandstop_long. -
Stop ID are stored under
stop_id. -
Station sequence are stored under
stop_sequence. These data are originally from the open data mentioned as a GTFS data ZIP file (converted to JSON from CSV and removed duplicate entries for easy conversion).
See here for more information on the structure for static data.
- Crowdsourced bus information (including bus type and others)
- Crowdsources bus status, which user can report if the bus gets delayed and other info
- Pin favorite bus routes so it will appear when web app launched
- Framework-based app for Android
- Geolocation, which requires an large update on route data
- Reverse searching (search for station instead of routes), which (also) requires an large update on route data
Currently in beta - which can be accessed via https://b.ntyx.dev. The current instance hosted under this domain is bus? v2, which is hosted with Cloudflare Pages.
If you prefer the original bus? version, it is accessible on https://bqm.vercel.app.
- Data sourced from
data.gov.my(see documentation here) - Icons sourced from Font Awesome's icon library via react-icons
getNearestalgorithm fromhttps://www.geodatasource.com, which the original license statement can be found on thedistancefunction under/src/appComponents/getNearest.jsx.- openrouteservice API is the instance of OSRM that this project is currently using (for bus? v2 - which for the original version (v1) it's using the OSRM demo server)