SlideShare a Scribd company logo
Open Belgium 2018
By Pol Dellaiera
Please raise your hand if...
The story behind SNCB alerts
Source: https://www.belate.be/
From door to door:
● In train: ~1h50
● In car: ~1h15
4h “lost” in public
transportation
What to do ?
Sleeping
Reading
Listening to music/podcasts...
Working
Learning
In my case...
I work.
The story behind SNCB alerts
How it began
Source: https://www.belate.be/
I had the idea to create a
tool that would “alert”
trains users of the delays.
SNCBAlerts
(it just an ugly name)
● Open Source
● Using Symfony 4
● Must rely on Git
● Must be pluggable
What is a delay ?
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”
Where to get the data ?
The story behind SNCB alerts
Liveboard
● Destinations
● Departures
● Delays
● Cancellations
● Line number
The idea behind
SNCBAlerts is to provide
informations about delays
and alerts in a
standardized way.
https://irail.be
Data to provide
● Departure station 🆗
● Destination station 🆗
● Train line ❎
● Delay (in minutes) 🆗
My first idea was to create
a matrix of 600 columns
on 600 rows… and to do it
manually.
The story behind SNCB alerts
https://github.com/iRail/iRail/issues/334
After some talks with Pieter
Colpaert from irail.be, he
showed how I could use
wikidata to complete train
stations data.
So I started to manually edit
the ~600 stations in
Belgium...
Added
informations
● Irail.be identifier
● Adjacent stations
● Connected lines
● Name normalization
I created a temporary tool to
show me the percentage of
completion of that work.
December 24th 2017
Today
Today
Today
A NodeJS library has been
written as well, just to feed
the map.
The story behind SNCB alerts
Neo4J, a graph database
platform, was used to
display the relationships in
between stations.
https://bl.ocks.org/drupol/03813f30032b90cf11a0a33f66a79ed7
http://bl.ocks.org/drupol/930f851017c44e1176d3aa0a1212c369
The result
3 gateways
● Twitter (delays >= 15 min)
● Telegram (public channel)
● Telegram Bot (custom alerts)(for now)
Twitter ● @sncbalerts
● 28k tweets
https://twitter.com/sncbalerts
https://twitter.com/sncbalerts
Telegram ● Public channel
● Bot
https://t.me/sncbalerts
https://t.me/sncbalerts_bot
https://t.me/sncbalerts_bot
● Symfony 4
● NodeJS
● Wikidata
● SparQL
● Heroku
● Neo4J
What I learned ?
● 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
The future
I’m taking my car to go to work.

More Related Content

More from Open Knowledge Belgium

Smarter by Open Data: Process and Practice in Flevoland (NL)
Smarter by Open Data: Process and Practice in Flevoland (NL)Smarter by Open Data: Process and Practice in Flevoland (NL)
Smarter by Open Data: Process and Practice in Flevoland (NL)
Open Knowledge Belgium
 
Open Knowledge for Social Innovation
Open Knowledge for Social InnovationOpen Knowledge for Social Innovation
Open Knowledge for Social Innovation
Open Knowledge Belgium
 
Smart Flanders: Tackling urban challenges through Open Data
Smart Flanders: Tackling urban challenges through Open DataSmart Flanders: Tackling urban challenges through Open Data
Smart Flanders: Tackling urban challenges through Open Data
Open Knowledge Belgium
 
EIF and NIFO connecting public administrations, businesses, and citizens
EIF and NIFO connecting public administrations, businesses, and citizensEIF and NIFO connecting public administrations, businesses, and citizens
EIF and NIFO connecting public administrations, businesses, and citizens
Open Knowledge Belgium
 
Connecting Open data for solving the fiscal transparency puzzle in the EU
Connecting Open data for solving the fiscal transparency puzzle in the EUConnecting Open data for solving the fiscal transparency puzzle in the EU
Connecting Open data for solving the fiscal transparency puzzle in the EU
Open Knowledge Belgium
 
Open Government and Networked European Democracy
Open Government and Networked European DemocracyOpen Government and Networked European Democracy
Open Government and Networked European Democracy
Open Knowledge Belgium
 
Mundaneum Factories for Open Tokenomics
Mundaneum Factories for Open TokenomicsMundaneum Factories for Open Tokenomics
Mundaneum Factories for Open Tokenomics
Open Knowledge Belgium
 
MIRVA: The European Open Recognition Project
MIRVA: The European Open Recognition ProjectMIRVA: The European Open Recognition Project
MIRVA: The European Open Recognition Project
Open Knowledge Belgium
 
Bike for Brussels - Open Summer of Code 2017
Bike for Brussels - Open Summer of Code 2017Bike for Brussels - Open Summer of Code 2017
Bike for Brussels - Open Summer of Code 2017
Open Knowledge Belgium
 
Traffic safety - answering tough questions with open data
Traffic safety - answering tough questions with open dataTraffic safety - answering tough questions with open data
Traffic safety - answering tough questions with open data
Open Knowledge Belgium
 
Eliminating data roadbloacks to get by traffic roadblocks without pain
Eliminating data roadbloacks to get by traffic roadblocks without painEliminating data roadbloacks to get by traffic roadblocks without pain
Eliminating data roadbloacks to get by traffic roadblocks without pain
Open Knowledge Belgium
 
Linked Open Data in limbo: Open cultural heritage resources
Linked Open Data in limbo: Open cultural heritage resourcesLinked Open Data in limbo: Open cultural heritage resources
Linked Open Data in limbo: Open cultural heritage resources
Open Knowledge Belgium
 
A journey to Linked Open Touristic Data
A journey to Linked Open Touristic DataA journey to Linked Open Touristic Data
A journey to Linked Open Touristic Data
Open Knowledge Belgium
 
How we use the massive open lidar dataset for the benfit of our clients
How we use the massive open lidar dataset for the benfit of our clientsHow we use the massive open lidar dataset for the benfit of our clients
How we use the massive open lidar dataset for the benfit of our clients
Open Knowledge Belgium
 
mu.semte.ch: A transitional architecture for Linked Data
mu.semte.ch: A transitional architecture for Linked Datamu.semte.ch: A transitional architecture for Linked Data
mu.semte.ch: A transitional architecture for Linked Data
Open Knowledge Belgium
 
Linked Open Chatbots
Linked Open ChatbotsLinked Open Chatbots
Linked Open Chatbots
Open Knowledge Belgium
 
The role and value of making data inventories
The role and value of making data inventoriesThe role and value of making data inventories
The role and value of making data inventories
Open Knowledge Belgium
 
Open for Business
Open for BusinessOpen for Business
Open for Business
Open Knowledge Belgium
 
Building arguments on Open Data
Building arguments on Open DataBuilding arguments on Open Data
Building arguments on Open Data
Open Knowledge Belgium
 
Linked Open Data from an industry perspective
Linked Open Data from an industry perspectiveLinked Open Data from an industry perspective
Linked Open Data from an industry perspective
Open Knowledge Belgium
 

More from Open Knowledge Belgium (20)

Smarter by Open Data: Process and Practice in Flevoland (NL)
Smarter by Open Data: Process and Practice in Flevoland (NL)Smarter by Open Data: Process and Practice in Flevoland (NL)
Smarter by Open Data: Process and Practice in Flevoland (NL)
 
Open Knowledge for Social Innovation
Open Knowledge for Social InnovationOpen Knowledge for Social Innovation
Open Knowledge for Social Innovation
 
Smart Flanders: Tackling urban challenges through Open Data
Smart Flanders: Tackling urban challenges through Open DataSmart Flanders: Tackling urban challenges through Open Data
Smart Flanders: Tackling urban challenges through Open Data
 
EIF and NIFO connecting public administrations, businesses, and citizens
EIF and NIFO connecting public administrations, businesses, and citizensEIF and NIFO connecting public administrations, businesses, and citizens
EIF and NIFO connecting public administrations, businesses, and citizens
 
Connecting Open data for solving the fiscal transparency puzzle in the EU
Connecting Open data for solving the fiscal transparency puzzle in the EUConnecting Open data for solving the fiscal transparency puzzle in the EU
Connecting Open data for solving the fiscal transparency puzzle in the EU
 
Open Government and Networked European Democracy
Open Government and Networked European DemocracyOpen Government and Networked European Democracy
Open Government and Networked European Democracy
 
Mundaneum Factories for Open Tokenomics
Mundaneum Factories for Open TokenomicsMundaneum Factories for Open Tokenomics
Mundaneum Factories for Open Tokenomics
 
MIRVA: The European Open Recognition Project
MIRVA: The European Open Recognition ProjectMIRVA: The European Open Recognition Project
MIRVA: The European Open Recognition Project
 
Bike for Brussels - Open Summer of Code 2017
Bike for Brussels - Open Summer of Code 2017Bike for Brussels - Open Summer of Code 2017
Bike for Brussels - Open Summer of Code 2017
 
Traffic safety - answering tough questions with open data
Traffic safety - answering tough questions with open dataTraffic safety - answering tough questions with open data
Traffic safety - answering tough questions with open data
 
Eliminating data roadbloacks to get by traffic roadblocks without pain
Eliminating data roadbloacks to get by traffic roadblocks without painEliminating data roadbloacks to get by traffic roadblocks without pain
Eliminating data roadbloacks to get by traffic roadblocks without pain
 
Linked Open Data in limbo: Open cultural heritage resources
Linked Open Data in limbo: Open cultural heritage resourcesLinked Open Data in limbo: Open cultural heritage resources
Linked Open Data in limbo: Open cultural heritage resources
 
A journey to Linked Open Touristic Data
A journey to Linked Open Touristic DataA journey to Linked Open Touristic Data
A journey to Linked Open Touristic Data
 
How we use the massive open lidar dataset for the benfit of our clients
How we use the massive open lidar dataset for the benfit of our clientsHow we use the massive open lidar dataset for the benfit of our clients
How we use the massive open lidar dataset for the benfit of our clients
 
mu.semte.ch: A transitional architecture for Linked Data
mu.semte.ch: A transitional architecture for Linked Datamu.semte.ch: A transitional architecture for Linked Data
mu.semte.ch: A transitional architecture for Linked Data
 
Linked Open Chatbots
Linked Open ChatbotsLinked Open Chatbots
Linked Open Chatbots
 
The role and value of making data inventories
The role and value of making data inventoriesThe role and value of making data inventories
The role and value of making data inventories
 
Open for Business
Open for BusinessOpen for Business
Open for Business
 
Building arguments on Open Data
Building arguments on Open DataBuilding arguments on Open Data
Building arguments on Open Data
 
Linked Open Data from an industry perspective
Linked Open Data from an industry perspectiveLinked Open Data from an industry perspective
Linked Open Data from an industry perspective
 

Recently uploaded

Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
rightmanforbloodline
 
Celebrity Girls Call Noida 9873940964 Unlimited Short Providing Girls Service...
Celebrity Girls Call Noida 9873940964 Unlimited Short Providing Girls Service...Celebrity Girls Call Noida 9873940964 Unlimited Short Providing Girls Service...
Celebrity Girls Call Noida 9873940964 Unlimited Short Providing Girls Service...
ginni singh$A17
 
The Rise of Python in Finance,Automating Trading Strategies: _.pdf
The Rise of Python in Finance,Automating Trading Strategies: _.pdfThe Rise of Python in Finance,Automating Trading Strategies: _.pdf
The Rise of Python in Finance,Automating Trading Strategies: _.pdf
Riya Sen
 
DU degree offer diploma Transcript
DU degree offer diploma TranscriptDU degree offer diploma Transcript
DU degree offer diploma Transcript
uapta
 
potential development of the A* search algorithm specifically
potential development of the A* search algorithm specificallypotential development of the A* search algorithm specifically
potential development of the A* search algorithm specifically
huseindihon
 
New Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service And N...
New Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service And N...New Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service And N...
New Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service And N...
tanupasswan6
 
Cyber Insurance Mathematical Model & Pricing
Cyber Insurance Mathematical Model & PricingCyber Insurance Mathematical Model & Pricing
Cyber Insurance Mathematical Model & Pricing
BaraDaniel1
 
New Girls Call Noida 9873940964 Unlimited Short Providing Girls Service Avail...
New Girls Call Noida 9873940964 Unlimited Short Providing Girls Service Avail...New Girls Call Noida 9873940964 Unlimited Short Providing Girls Service Avail...
New Girls Call Noida 9873940964 Unlimited Short Providing Girls Service Avail...
kinni singh$A17
 
🚂🚘 Premium Girls Call Guwahati 🛵🚡000XX00000 💃 Choose Best And Top Girl Servi...
🚂🚘 Premium Girls Call Guwahati  🛵🚡000XX00000 💃 Choose Best And Top Girl Servi...🚂🚘 Premium Girls Call Guwahati  🛵🚡000XX00000 💃 Choose Best And Top Girl Servi...
🚂🚘 Premium Girls Call Guwahati 🛵🚡000XX00000 💃 Choose Best And Top Girl Servi...
kuldeepsharmaks8120
 
Verified Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servic...
Verified Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servic...Verified Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servic...
Verified Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servic...
revolutionary575
 
PyData Sofia May 2024 - Intro to Apache Arrow
PyData Sofia May 2024 - Intro to Apache ArrowPyData Sofia May 2024 - Intro to Apache Arrow
PyData Sofia May 2024 - Intro to Apache Arrow
Uwe Korn
 
Exclusive Girls Call Noida 🎈🔥9873940964 🔥💋🎈 Provide Best And Top Girl Service...
Exclusive Girls Call Noida 🎈🔥9873940964 🔥💋🎈 Provide Best And Top Girl Service...Exclusive Girls Call Noida 🎈🔥9873940964 🔥💋🎈 Provide Best And Top Girl Service...
Exclusive Girls Call Noida 🎈🔥9873940964 🔥💋🎈 Provide Best And Top Girl Service...
sheetal singh$A17
 
Celebrity Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service...
Celebrity Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service...Celebrity Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service...
Celebrity Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service...
tanupasswan6
 
VVIP Girls Call Noida 9873940964 Provide Best And Top Girl Service And No1 in...
VVIP Girls Call Noida 9873940964 Provide Best And Top Girl Service And No1 in...VVIP Girls Call Noida 9873940964 Provide Best And Top Girl Service And No1 in...
VVIP Girls Call Noida 9873940964 Provide Best And Top Girl Service And No1 in...
Ak47
 
社内勉強会資料_TransNeXt: Robust Foveal Visual Perception for Vision Transformers
社内勉強会資料_TransNeXt: Robust Foveal Visual Perception for Vision Transformers社内勉強会資料_TransNeXt: Robust Foveal Visual Perception for Vision Transformers
社内勉強会資料_TransNeXt: Robust Foveal Visual Perception for Vision Transformers
NABLAS株式会社
 
Celonis Busniess Analyst Virtual Internship.pptx
Celonis Busniess Analyst Virtual Internship.pptxCelonis Busniess Analyst Virtual Internship.pptx
Celonis Busniess Analyst Virtual Internship.pptx
AnujaGaikwad28
 
potential usefulness of multi-agent maze-solving in general
potential usefulness of multi-agent maze-solving in generalpotential usefulness of multi-agent maze-solving in general
potential usefulness of multi-agent maze-solving in general
huseindihon
 
Celebrity Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servi...
Celebrity Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servi...Celebrity Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servi...
Celebrity Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servi...
revolutionary575
 
Histology of Muscle types histology o.ppt
Histology of Muscle types histology o.pptHistology of Muscle types histology o.ppt
Histology of Muscle types histology o.ppt
SamanArshad11
 
Towards an Analysis-Ready, Cloud-Optimised service for FAIR fusion data
Towards an Analysis-Ready, Cloud-Optimised service for FAIR fusion dataTowards an Analysis-Ready, Cloud-Optimised service for FAIR fusion data
Towards an Analysis-Ready, Cloud-Optimised service for FAIR fusion data
Samuel Jackson
 

Recently uploaded (20)

Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
 
Celebrity Girls Call Noida 9873940964 Unlimited Short Providing Girls Service...
Celebrity Girls Call Noida 9873940964 Unlimited Short Providing Girls Service...Celebrity Girls Call Noida 9873940964 Unlimited Short Providing Girls Service...
Celebrity Girls Call Noida 9873940964 Unlimited Short Providing Girls Service...
 
The Rise of Python in Finance,Automating Trading Strategies: _.pdf
The Rise of Python in Finance,Automating Trading Strategies: _.pdfThe Rise of Python in Finance,Automating Trading Strategies: _.pdf
The Rise of Python in Finance,Automating Trading Strategies: _.pdf
 
DU degree offer diploma Transcript
DU degree offer diploma TranscriptDU degree offer diploma Transcript
DU degree offer diploma Transcript
 
potential development of the A* search algorithm specifically
potential development of the A* search algorithm specificallypotential development of the A* search algorithm specifically
potential development of the A* search algorithm specifically
 
New Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service And N...
New Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service And N...New Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service And N...
New Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service And N...
 
Cyber Insurance Mathematical Model & Pricing
Cyber Insurance Mathematical Model & PricingCyber Insurance Mathematical Model & Pricing
Cyber Insurance Mathematical Model & Pricing
 
New Girls Call Noida 9873940964 Unlimited Short Providing Girls Service Avail...
New Girls Call Noida 9873940964 Unlimited Short Providing Girls Service Avail...New Girls Call Noida 9873940964 Unlimited Short Providing Girls Service Avail...
New Girls Call Noida 9873940964 Unlimited Short Providing Girls Service Avail...
 
🚂🚘 Premium Girls Call Guwahati 🛵🚡000XX00000 💃 Choose Best And Top Girl Servi...
🚂🚘 Premium Girls Call Guwahati  🛵🚡000XX00000 💃 Choose Best And Top Girl Servi...🚂🚘 Premium Girls Call Guwahati  🛵🚡000XX00000 💃 Choose Best And Top Girl Servi...
🚂🚘 Premium Girls Call Guwahati 🛵🚡000XX00000 💃 Choose Best And Top Girl Servi...
 
Verified Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servic...
Verified Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servic...Verified Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servic...
Verified Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servic...
 
PyData Sofia May 2024 - Intro to Apache Arrow
PyData Sofia May 2024 - Intro to Apache ArrowPyData Sofia May 2024 - Intro to Apache Arrow
PyData Sofia May 2024 - Intro to Apache Arrow
 
Exclusive Girls Call Noida 🎈🔥9873940964 🔥💋🎈 Provide Best And Top Girl Service...
Exclusive Girls Call Noida 🎈🔥9873940964 🔥💋🎈 Provide Best And Top Girl Service...Exclusive Girls Call Noida 🎈🔥9873940964 🔥💋🎈 Provide Best And Top Girl Service...
Exclusive Girls Call Noida 🎈🔥9873940964 🔥💋🎈 Provide Best And Top Girl Service...
 
Celebrity Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service...
Celebrity Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service...Celebrity Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service...
Celebrity Girls Call Delhi 🎈🔥9711199171 🔥💋🎈 Provide Best And Top Girl Service...
 
VVIP Girls Call Noida 9873940964 Provide Best And Top Girl Service And No1 in...
VVIP Girls Call Noida 9873940964 Provide Best And Top Girl Service And No1 in...VVIP Girls Call Noida 9873940964 Provide Best And Top Girl Service And No1 in...
VVIP Girls Call Noida 9873940964 Provide Best And Top Girl Service And No1 in...
 
社内勉強会資料_TransNeXt: Robust Foveal Visual Perception for Vision Transformers
社内勉強会資料_TransNeXt: Robust Foveal Visual Perception for Vision Transformers社内勉強会資料_TransNeXt: Robust Foveal Visual Perception for Vision Transformers
社内勉強会資料_TransNeXt: Robust Foveal Visual Perception for Vision Transformers
 
Celonis Busniess Analyst Virtual Internship.pptx
Celonis Busniess Analyst Virtual Internship.pptxCelonis Busniess Analyst Virtual Internship.pptx
Celonis Busniess Analyst Virtual Internship.pptx
 
potential usefulness of multi-agent maze-solving in general
potential usefulness of multi-agent maze-solving in generalpotential usefulness of multi-agent maze-solving in general
potential usefulness of multi-agent maze-solving in general
 
Celebrity Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servi...
Celebrity Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servi...Celebrity Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servi...
Celebrity Girls Call Andheri 9930245274 Unlimited Short Providing Girls Servi...
 
Histology of Muscle types histology o.ppt
Histology of Muscle types histology o.pptHistology of Muscle types histology o.ppt
Histology of Muscle types histology o.ppt
 
Towards an Analysis-Ready, Cloud-Optimised service for FAIR fusion data
Towards an Analysis-Ready, Cloud-Optimised service for FAIR fusion dataTowards an Analysis-Ready, Cloud-Optimised service for FAIR fusion data
Towards an Analysis-Ready, Cloud-Optimised service for FAIR fusion data
 

The story behind SNCB alerts

Editor's Notes

  1. Hello everyone, welcome to this session. First I’d like to thanks to the organizers for letting me present a small project I’ve been working on the past 3 months.
  2. Before going deep into the subject, I would like to start by asking a question to everyone here… Who’s relying on public transportation to go to work ?
  3. If some of you are using the trains in Belgium, I guess, sadly, that you are used to this kind of liveboard… If not, let me tell you about my own experience.
  4. I used to live in Mons for 36 years and as you can see, and since a couple of days ago, I was living in the worst part of Belgium when it comes to punctuality of trains.
  5. It used to take me almost 2 hours per day to go to work with trains… and 1h15 by car if I leave home early in the morning around 6h00.
  6. If you do the math, it’s 4 hours lost in public transportation.
  7. If some of you are like me and hate wasting time doing nothing, then the question that I’d like to ask is… What to do when you waste 4h every day to go to work ?
  8. Some of you might say: Sleeping. Which is a very good idea, I love sleeping. But in my train, it’s most of the time, impossible. The line 97/96 which is the one I was using are equipped with old trains, without automatic doors and not well isolated agains all kind of noises.
  9. The second choice is reading. Either to learn stuff or to just relax.
  10. The third option is to listen to music or podcasts. Of course with a reasonable volume to not disturb your neighbors. Trust me, this never happend.
  11. The fourth option is to work, this is my favorite option, because it allows you to focus on something else quickly.
  12. The last option is to learn stuff by reading.
  13. In my case, my favorite activity in the train besides sleeping when it’s not too noisy, is working on my personal projects.
  14. Being a long time contributor to the Drupal OpenSource community, I usually maintain and develop my personal modules. Drupal is a framework/cms written in PHP and created by Dries Buytaert a fellow belgian.
  15. So, how the story of my project began ?
  16. Just because of this. I was tired to not have a practical way to check if my trains were late or not. Tired of the lack of consistency in these data. We are at the edge of 2020 and we still do not have a way to check if a train will be late or not in a consistent way.
  17. So, I had the idea to create a tool that would send users the trains delays and alerts.
  18. So I created SNCBAlerts which is a platform that gather delays and alerts of belgian trains, then this send those data to different gateways. SNCBAlerts is OpenSource, using Symfony 4, relies on Git for many things, and is pluggable.
  19. Before going further, the main question that everyone should ask himself is, “what, in the end, is a delay” ?
  20. According to the internet, this is the definition of a delay. But in our case, my case, a train delay is when the train doesn’t leave at the right time. According to SNCB, a delay is when your train has more than 15 minutes of late. Which is completely unfair, but it’s not the main subject of the presentation.
  21. Where to get those delays ? Are they available somewhere ?
  22. Of course, you can find them on the liveboard of each stations in Belgium.
  23. A liveboard provides information about destinations, departures, delays, cancellations… and unfortunately, it doesn’t provides the train line.
  24. But… the idea of SNCBAlerts is to provide informations about delays and alerts in a standardized way.
  25. This is why it relies on irail.be from Pieter Colpaert to get its data.
  26. Irail.be provides information about the departure, the destination, the delays, the cancellations, but not the train line. So, the first version of SNCBAlerts was not having those train line information.
  27. In order to get these information, as I didn’t find it anywhere on the internet, was to create a matrix of ~600 columns on ~600 rows, which makes about ~36000 cells and to complete that grid manually. Of course, if you think about it, it would only require the half of the cells because the train line from a station A to B is the same as from B to A. But still … 18000 cells.
  28. To be honest, I started the document on Google Docs… and it was completely unmaintainable. I had to find another way to do this.
  29. So, I created an issue on the irail project on Github to have some feedback.
  30. And after a talk with Pieter Colpaert, I deleted the Google Doc I was creating to use Wikidata. A tool that I didn’t even know it existed.
  31. So, I started to edit the ~600 stations in Belgium on Wikidata… even if it’s a lot, it much better than filling 18000 cells in a spreadsheet.
  32. The added informations on Wikidata are the following… As each station on irail.be has an identifier, I filled a property on each station on wikidata with the station identifier from irail. I also added adjacent stations, connected lines and also normalized some stations names.
  33. I had no way to have the big picture of what is done and what is left to do… so I created a small map with informations from irail and wikidata. The map is showing belgian stations on a map. Based on the state of completion, the markers were red meaning that most of the informations were missing. Yellow, meaning that there were missing informations, and green meaning that everything was ok.
  34. This is a screenshot of the tool… as you can see, most of the stations were already done.
  35. Today the map looks like this. Most of the belgian stations are green, some of them are still in yellow. In this case, it doesn’t means that there are missing information, it just means that they only have one adjacent station, they are the last stations on a line.
  36. Here’s a glimpse of the information that you can get when you click on a station with a yellow marker. As you can see, there is only one adjacent station.
  37. If you click on a green marker, you can see that all the information are there.
  38. In order to display this live map, I wrote a nodejs library just to feed the map. This library has been extended since and can be used to query irail.be and cross those data with wikidata quite easily.
  39. The nodejs/npm package is Opensource and available for everyone, the name is irail-api.
  40. The tools you’ve seen were great, but it was not enough to visually check the consistency of the “adjacent stations” property.
  41. What you see here is a map showing belgian railway stations and their link in between each others. To draw the map, Neo4J and D3 were used.
  42. I really enjoyed doing that part, it’s actually the part I liked the most. I liked it so much that I did the same for the metro stations in London. It’s not possible to do it for the Brussels metro, a lot of informations are missing on Wikidata.
  43. So, enough talking, what’s the result of all of this ?
  44. 3 gateways or plugins are available and Open Source: The twitter account, the Telegram channel and a Telegram bot.
  45. The twitter account SNCBAlerts is up since the 6 of December and now has more than 28 thousands tweets so far.
  46. Here’s a message from @sncbalerts on Twitter when it was the first version.
  47. And thanks to the data on Wikidata, we can now get the line information in the message.
  48. The telegram gateway provides a public channel that everyone can join and see “real time” alerts and delays. This is very hard to follow what is going on there because there’s so much information that it’s unusable. This is why I created a bot that users can customize at will.
  49. Here’s a screenshot of the Telegram web application and the SNCB Alerts public channel.
  50. And here’s a screenshot of the Telegram web application and the SNCB Alerts bot. As you can see, you can query it inline.
  51. If you’re using Telegram, you can use the bot today by following the url that you can find on the Twitter bio.
  52. What are the things that I learned by doing this ?
  53. What about the future ?