Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

The story behind SNCB alerts

115 views

Published on

Presentation by Pol Dellaiera at Open Belgium 2018 - http://2018.openbelgium.be/session/story-behind-sncbalerts

Published in: Data & Analytics
  • Be the first to comment

  • Be the first to like this

The story behind SNCB alerts

  1. 1. Open Belgium 2018 By Pol Dellaiera
  2. 2. Please raise your hand if...
  3. 3. Source: https://www.belate.be/
  4. 4. From door to door: ● In train: ~1h50 ● In car: ~1h15
  5. 5. 4h “lost” in public transportation
  6. 6. What to do ?
  7. 7. Sleeping
  8. 8. Reading
  9. 9. Listening to music/podcasts...
  10. 10. Working
  11. 11. Learning
  12. 12. In my case... I work.
  13. 13. How it began
  14. 14. Source: https://www.belate.be/
  15. 15. I had the idea to create a tool that would “alert” trains users of the delays.
  16. 16. SNCBAlerts (it just an ugly name) ● Open Source ● Using Symfony 4 ● Must rely on Git ● Must be pluggable
  17. 17. What is a delay ?
  18. 18. 1. the act of delaying; procrastination; loitering. 2. an instance of being delayed: there were many delays during the train trip. 3. the period or amount of time during which something is delayed: The ballet performance began after a half-hour delay. Definition of “delay”
  19. 19. Where to get the data ?
  20. 20. Liveboard ● Destinations ● Departures ● Delays ● Cancellations ● Line number
  21. 21. The idea behind SNCBAlerts is to provide informations about delays and alerts in a standardized way.
  22. 22. https://irail.be
  23. 23. Data to provide ● Departure station 🆗 ● Destination station 🆗 ● Train line ❎ ● Delay (in minutes) 🆗
  24. 24. My first idea was to create a matrix of 600 columns on 600 rows… and to do it manually.
  25. 25. https://github.com/iRail/iRail/issues/334
  26. 26. After some talks with Pieter Colpaert from irail.be, he showed how I could use wikidata to complete train stations data.
  27. 27. So I started to manually edit the ~600 stations in Belgium...
  28. 28. Added informations ● Irail.be identifier ● Adjacent stations ● Connected lines ● Name normalization
  29. 29. I created a temporary tool to show me the percentage of completion of that work.
  30. 30. December 24th 2017
  31. 31. Today
  32. 32. Today
  33. 33. Today
  34. 34. A NodeJS library has been written as well, just to feed the map.
  35. 35. Neo4J, a graph database platform, was used to display the relationships in between stations.
  36. 36. https://bl.ocks.org/drupol/03813f30032b90cf11a0a33f66a79ed7
  37. 37. http://bl.ocks.org/drupol/930f851017c44e1176d3aa0a1212c369
  38. 38. The result
  39. 39. 3 gateways ● Twitter (delays >= 15 min) ● Telegram (public channel) ● Telegram Bot (custom alerts)(for now)
  40. 40. Twitter ● @sncbalerts ● 28k tweets
  41. 41. https://twitter.com/sncbalerts
  42. 42. https://twitter.com/sncbalerts
  43. 43. Telegram ● Public channel ● Bot
  44. 44. https://t.me/sncbalerts
  45. 45. https://t.me/sncbalerts_bot
  46. 46. https://t.me/sncbalerts_bot
  47. 47. ● Symfony 4 ● NodeJS ● Wikidata ● SparQL ● Heroku ● Neo4J What I learned ?
  48. 48. ● A Twitter account spamming its subscribers with trains delays greater than 15 minutes. ● A Telegram channel spamming subscribers with delays greater than 1 minute ● A Telegram bot that subscribers are able to customize to receive their delays and alerts in “real time”. What I give back
  49. 49. The future
  50. 50. I’m taking my car to go to work.

×