TfNSW real-time map

Great app. Any chance you can share how you are displaying the routes on the map?

Thanks Ben. The route lines are found in the GTFS dataset, along with all the information about trips, stops, routes and stopping patterns. If you’re interested, check out Google’s documentation on GTFS

Thanks @jxeeno, forgive me if I am missing something, but in the docs I can’t see any examples on actually using the data. Are you manually parsing the datasets and drawing via the Google Maps JS API or is there a more direct implementation?

Yes, I’m parsing the data myself. If you have any other questions about using the datasets, it might be best to open a new thread on the forum so others can help too :slight_smile:

1 Like

A recent paper in Journal of Transport Geography, entitled “Constructing a routable retrospective transit timetable from a real-time vehicle location feed and GTFS” contains a rather cool map of average deviations that enables the user to visualise the “hot-spots” for delays in a transit system [NextBus in Toronto].

Is there any way that TfNSW real-time GTFS feed can be used to produce such maps?

Geoff Lambert

2 Likes

If anyone does do this please let us know! I just had a scan through the paper (Constructing a routable retrospective transit timetable from a real-time vehicle location feed and GTFS - ScienceDirect) – looks very interesting and insightful.

2 Likes

Hi Jxeeno,

any thoughts why buses are reported 73 minutes late and then miraculously are nearly back on time.
I am assuming a replacement bus has started the trip part way through the trip to sort of run on time at the end of the trip. Is there any way to show what is happening?

Hey @Halfabee, do you remember what route number this was? I’ll take a look at the underlying data to try and work out what’s going on.

Hi @jxeeno,
it was a 418 #423716

I thought I was doing something wrong and was glad you had the same results.

Halfabee

@jxeeno @Halfabee we’re looking into this, can you please confirm what date this occurred on? or trip id for the bus in the screenshot? Also, was it happening for a lot of buses or just that one?

Thanks,
Alex

Hey @alejandro.felman,

I notice it every now. The trip id @Halfabee was referring to there was 423716 on 16th June. At this stage, I haven’t gone and restored the data to check what was going on. I’ll let you know once I do :slight_smile:

Another one was a 370 service (trip id 427706) on the 18th June. This second service is due to an intermittent problems with the reported coordiantes from the on-board GPS, but both result in the same problem: stop time predictions being generated for stops already passed or skipped by the bus vehicle.

Thanks @jxeeno, we’ll investigate this further. If you find anything please let me know.

Looks fantastic.
May i know what technologies you use?
I am planning on similar app with C#.net to run as Cron job to get data and push into MySQL DB.
And RESTful service developed in C#.Net with website developed in Angular.
Bit struggling with understanding real-time data received from TfNSW APIs for Trains, any help would be much appreciated.
Thanks in advance.

Hey @jxeeno is this project open source? Would love to have a peek under the hood

1 Like

Hi everyone,
This is awesome @jxeeno and exactly what I was looking for. Thank you!!!
I work in NSW health planning, I am trying advocate for a bus stop and route to be modified to better service a new public park/sporting facility/education precinct to encourage active transport/reduce car dependency. This data may help build a case that the current bus route is underutilised and patronage could be improved by redirecting the route to pass the education precinct and park. I hope to access some historic data too when its available.

@yvonne.lee - now that I have the data, what would be the next step for the local council and myself to advocate for this bus route to be reviewed? is there a local rep from TfNSW ? Sorry I am new in this field so am not sure how the process works so if you could direct me to someone who could answer this this would be appreciated.

Thank you
Queeny

Unfortunately not. I might look at open sourcing the original implementation but it’s not high on my priority at the moment.

Continuing discussion here: Real-time data format - #6 by Muthu

Hi @Queeny - let us ask around and find out. I suspect we need to talk to the Transport planners. The council probably also has some way of communicating this too. We have an Active Transport division who may also be able to assist in this.

What historic data are you after as we probably already have that on the hub? Otherwise follow the details on the blog post about how to request data 5 Ways To Request More Data | TfNSW Open Data Hub and Developer Portal

Hi @jxeeno . The application looks ausome. our company is currently developing a similar application specifically for the ferries. I was wondering how exactly did you manage to show that trip had changed sides on the warf ? Capture

The GTFS specificiation implements realtime trip updates, which contains updates to the scheduled trip. It supports delays, cancelling and adding stops (and the whole trip), and fair bit more. The Realtime Trip Updates full specification can be found at the GTFS website.

@llui85 yes but how did they get the arrival time. the realtime timetable doesnt reflect the updates and the realtime trip updates api only include the arrival times and departure times once the ferry has entered the respective status.