Jump to content
FelixINX

Montréal Transit Tracker

Recommended Posts

There is a new app in town!

Montreal realtime transit viewer is an application that I built that uses the different realtime data of transportation companies in the greater Montreal area to display all vehicles on a single map or a list. 

Goal of the app Have a quick overview of the current state of Montreal transit system and help transport enthusiasts (us) find particular buses.

What isn't the goal Replace sightings with a list of the application. It would be much easier but it would remove all the fun.

Supported agencies exo (trains) and STM (bus).

Feature :

  • Choose between a map view and a list view
  • Download the data (CSV, Excel or PDF)
  • Data is refreshed every 5 minutes
  • Data avaible: vehicle number, route, trip id (from GTFS), start date and time*, current stop sequence*, current status* and position.

*Not avaible for exo trains.

Now online : https://felixinx.github.io/mtl-gtfs-rt/

The data presented on the app should not be used for transportation purposes. The data may not be up to date. The app is not affiliated with any transportation organization.

 

ITDKJb9.png8XyAgm2.pngyZuU0fn.png

Share this post


Link to post
Share on other sites

Note: I would like to apologize to FelixINX and other board members for accidentally deleting the original thread and posts. I had hoped to merge them as requested and sadly in the process they were lost. 

Please continue to post all questions and concerns here. Let's all wish FelixINX the best of luck for this great new app. I wish this was around ten years ago!

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

v1.0.1 now online:

  • exo trains are now on the map
  • Current status is now displayed as text
  • The website now uses Google Analytics to measure hours of traffic in anticipation of an increase in refreshing time
  • The system now records statistics on the number of vehicles (data not shown)

Roadmap:

  • Button "show on map" in table
  • Loading indicator
  • Improve loading time
  • Auto refresh
  • Increase of refresh time during peak hours

If I missed something please tell me!

  • Thanks 1

Share this post


Link to post
Share on other sites

The changes are great. I really like the current status on text, as it makes the app so much more practical when wanting to know about its activity. Just out of curiosity, do buses on "service provisoire" recieve a status or a sort of special number when they are active? I am not completely familiar with GTFS.

Share this post


Link to post
Share on other sites
5 hours ago, ReusableNoseTissue said:

The changes are great. I really like the current status on text, as it makes the app so much more practical when wanting to know about its activity. 

To clarify, I'm pretty sure the current status is just if the bus is in motion or stopped. "In transit" means "in motion", so that's probably the field they use on the STM website when deciding to show the round bus logo or the bus logo with the directional arrow: 

Capture.thumb.PNG.acbe2b861a7f256e72240e10a3d2793d.PNG

We can't see buses that are "En Transit". 

I like it as a precursor to the button though: 

It might say "STOPPED_AT45.48017-73.59454" and I can just look up coordinates on google.

-

Would it be possible for us to select which fields we want to search on the search bar? The addition of "In transit" and "Stopped at" means we can't search for school or industrial extras anymore because "in transit" contains an "I" and "stopped at" contains an "E". Similarly, the trip field contains a lot of numbers that interfere when we want to search by route. If we could search by route only, it would solve that problem.

It's no big deal if you can't though, since it's easy to just download the excel file and search with that.

Share this post


Link to post
Share on other sites

The new version looks good!

Would it be possible to sort out route numbers like 10, 11, 12, etc. instead of 10, 100, 101, etc.?

Again, thanks for doing such a great work!

@GerbilIf I understand correctly "In transit to" and "Stopped at" are to tell if a vehicle is serving a stop or is en route to the next stop. I'm pretty sure even stopped bus display the arrow if they are along the route curve; those who are not on the curve (ex: on a detour) is a circle instead.

  • Thanks 1

Share this post


Link to post
Share on other sites

This is such an awesome tracker! This really makes commuting much easier! And it's really accurate for spotting unusual buses on a route, for instance, I got to see 38-006 on the 24 which is my first time seeing a 38-xxx on it.

  • Thanks 1

Share this post


Link to post
Share on other sites
15 hours ago, Gerbil said:

To clarify, I'm pretty sure the current status is just if the bus is in motion or stopped. "In transit" means "in motion", so that's probably the field they use on the STM website when deciding to show the round bus logo or the bus logo with the directional arrow: 

Capture.thumb.PNG.acbe2b861a7f256e72240e10a3d2793d.PNG

We can't see buses that are "En Transit". 

I like it as a precursor to the button though: 

It might say "STOPPED_AT45.48017-73.59454" and I can just look up coordinates on google.

You are right. It displays movements rather than its activity. Thanks for bringing it to my attention.

Share this post


Link to post
Share on other sites
15 hours ago, Gerbil said:

To clarify, I'm pretty sure the current status is just if the bus is in motion or stopped. "In transit" means "in motion", so that's probably the field they use on the STM website when deciding to show the round bus logo or the bus logo with the directional arrow: 

Capture.thumb.PNG.acbe2b861a7f256e72240e10a3d2793d.PNG

We can't see buses that are "En Transit". 

I like it as a precursor to the button though: 

It might say "STOPPED_AT45.48017-73.59454" and I can just look up coordinates on google.

-

Would it be possible for us to select which fields we want to search on the search bar? The addition of "In transit" and "Stopped at" means we can't search for school or industrial extras anymore because "in transit" contains an "I" and "stopped at" contains an "E". Similarly, the trip field contains a lot of numbers that interfere when we want to search by route. If we could search by route only, it would solve that problem.

It's no big deal if you can't though, since it's easy to just download the excel file and search with that.

You are right about STOPPED_AT and IN_TRANSIT_TO. I will add a notice about this in the info section in the next update. Depending on the driver, you can sometimes see "En Transit" buses, if the driver stays on the same route in the iBUS system.

-

I added your suggestion to my todo list it should be quite easy.

14 hours ago, Frozen Yogurt said:

Would it be possible to sort out route numbers like 10, 11, 12, etc. instead of 10, 100, 101, etc.?

With the current plug-in I use for the table, it dosen't look possible. This is cause by the École (E) and Industrie (I) trip wich make the table sort them in strings instead of numbers. I might put the École and Industrie in another collumn to solve this, would it be ok?

Share this post


Link to post
Share on other sites
2 hours ago, FelixINX said:

You are right about STOPPED_AT and IN_TRANSIT_TO. I will add a notice about this in the info section in the next update. Depending on the driver, you can sometimes see "En Transit" buses, if the driver stays on the same route in the iBUS system.

-

I added your suggestion to my todo list it should be quite easy.

With the current plug-in I use for the table, it dosen't look possible. This is cause by the École (E) and Industrie (I) trip wich make the table sort them in strings instead of numbers. I might put the École and Industrie in another collumn to solve this, would it be ok?

Maybe adding a zero in front of a two digit route would help sorting route numbers in the correct order? For instance instead of 36 it would be 036.

Share this post


Link to post
Share on other sites
14 hours ago, FelixINX said:

With the current plug-in I use for the table, it dosen't look possible. This is cause by the École (E) and Industrie (I) trip wich make the table sort them in strings instead of numbers. I might put the École and Industrie in another collumn to solve this, would it be ok?

Sure! Or maybe like anyfong said, a "0" can be added, whichever way works.

  • Like 1

Share this post


Link to post
Share on other sites

Update v1.1.0

  • Better list with improved search
  • Show on map button
  • Some improvement under the hood

In the next version the Ecole and Industrie will be moved to another column. The app will also be available under a “Progressive Web App” which will add cache (better loading time) and add to the home screen (for Android and desktop only). Auto refreshes is also coming. Also, the data will be pulled every 1 minute between 7 am-9 am and 5 pm-8 pm.

Since November 14th, the app now logs the number of bus and train each 5 minutes. Here is some highlights:

  • The more trains tracked simultaneously: 20 trains (the summit has been reached several times)
  • The more busses tracked simultaneously: 1094 buses, 20/11/2018 8:05 am
  • The fewer buses tracked simultaneously: 67 buses 15/11/2018 4:40 am
  • During a certain period each day, no bus is tracked. This period is between 3 am and 4:30 am. Exceptionally, it was between 0:10 am and 1:10 am November 21st. I am wondering if it’s a “break” for the iBUS system.
  • The average bus tracked simultaneously is 513.
  • Feel free to play with the data, the file is below!

count.csv

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

Hey FelixINX, good job for that update, I like how the table is now altering between gray and white rows, it's easier to read now.

Is it only me or the map has problem loading? I would now only get a tiny portion of the map loaded, and when I click on a bus the map goes to the top left side of the screen.

check 1.png

check 2.png

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, Frozen Yogurt said:

Hey FelixINX, good job for that update, I like how the table is now altering between gray and white rows, it's easier to read now.

Is it only me or the map has problem loading? I would now only get a tiny portion of the map loaded, and when I click on a bus the map goes to the top left side of the screen.

check 1.png

check 2.png

You are right it seems to be a problem. I'll try to push a fix tomorrow morning.

  • Thanks 1

Share this post


Link to post
Share on other sites
15 hours ago, FelixINX said:

You are right it seems to be a problem. I'll try to push a fix tomorrow morning.

The tiles appear when going fullscreen. Tested both on Opera 48.2.2331 (Android) and Firefox 63.0 (Debian-build). Seems to be a Leaflet-side issue with the buffer size.

Share this post


Link to post
Share on other sites

Sorry for the delay! The bug should now be fixed with version 1.1.1.

@Frozen Yogurt and @webfil please confirm that the problem is now fixed.

It was not a Leaflet issue, just a conflict between Leaflet and the tabs I use (Bootstrap). To fix this, the loading screen is now on top of the map.

Share this post


Link to post
Share on other sites

One issue I have been experiencing some times is when I sort by route ascending, I get 10, 100, 101 instead of 10, 11, 12 etc. Is it a glitch or am I doing something wrong?

Share this post


Link to post
Share on other sites
On 11/14/2018 at 4:16 PM, Frozen Yogurt said:

Would it be possible to sort out route numbers like 10, 11, 12, etc. instead of 10, 100, 101, etc.?

 

On 11/29/2018 at 11:38 PM, Matt Demers said:

One issue I have been experiencing some times is when I sort by route ascending, I get 10, 100, 101 instead of 10, 11, 12 etc. Is it a glitch or am I doing something wrong?

I agree that a sortable column route column would be a great addition. I don't know if it's as easy as it is in a GIS to create an integer column based on text values, but it is sure frustrating to see that king of sorting.

Share this post


Link to post
Share on other sites
6 hours ago, webfil said:
On 11/29/2018 at 11:38 PM, Matt Demers said:

One issue I have been experiencing some times is when I sort by route ascending, I get 10, 100, 101 instead of 10, 11, 12 etc. Is it a glitch or am I doing something wrong?

I agree that a sortable column route column would be a great addition. I don't know if it's as easy as it is in a GIS to create an integer column based on text values, but it is sure frustrating to see that king of sorting.

It's a known problem that is only present when school and industrial buses are present. For example, right now, the sorting is "normal". Technically, this is not a bug because when you have number and letters together, this king of sorting is normal. That being said, I am testing multiples solutions but I didn't find (yet) the best solution that don't compromise the data and the speed of the app.

Share this post


Link to post
Share on other sites

Christmas update is there! Nothing really big, but there are some preparation for the next update wich will most of what was requested. My final exams are this week, but expect a release after Christmas, by the end of the year.

Happy holidays to all!

Share this post


Link to post
Share on other sites

Good luck with the exams!

-

What do the symbols of the  green and red buses with the Santa hats mean?

 

Capture.PNG

  • Thanks 1

Share this post


Link to post
Share on other sites
10 hours ago, Gerbil said:

Good luck with the exams!

-

What do the symbols of the  green and red buses with the Santa hats mean?

 

Capture.PNG

Thanks !
 

The santa bus (or train) doesn't do much. It's a random vehicle each time you load the page. I had to make a function for the next update and to test it, I did use the christmas version. It a way for me to test if the function add loading time. But also, if you are on the santa bus, you're probably lucky 😉

Share this post


Link to post
Share on other sites

v1.2.0 is now live!

For 2019, enjoy a better version of your favorite app. On the menu :

  • New table engine, with better sorting (with ecole and industrie buses) and search by collumn
  • Trains now have the headsign (direction) and short_name (train number) in the popup. This will later be extended to buses, when the STM release a new GTFS version (the current one is too big)
  • The app is now a progressive web app wich means the app is now cached (better loading time) and can be added to homescreen (Windows and Android only)
  • Optional If you accept the prompt, the map will display your location on the map 
  • Featured images for a bit more color! Send me your pictures of your sightings and I will add them (with credits!)

Happy new year to everyone!

Share this post


Link to post
Share on other sites

Hmm I like some aspects of the update but also I wonder:

- Could we get back the ability to display 100 lines at once? I find it practical and use it all the time

- The trip column should be wider so that all items can be fully displayed

- Nitpick: the CPTDB link on the "help" tab is the deleted topic ^_^

Otherwise I really enjoyed using this app, I use it everyday! Thanks for sharing that and happy new year!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...