SlideShare ist ein Scribd-Unternehmen logo
1 von 55
Open Belgium 2018
By Pol Dellaiera
Please raise your hand if...
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.
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 ?
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.
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.
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.

Weitere ähnliche Inhalte

Mehr von Open Knowledge Belgium

Mehr von Open Knowledge Belgium (20)

Open Data Stories You haven't heard!
Open Data Stories You haven't heard!Open Data Stories You haven't heard!
Open Data Stories You haven't heard!
 
A​ FUNUMENTARY:​ Take what you can, give nothing back...​ ​(NOT)
A​ FUNUMENTARY:​ Take what you can, give nothing back...​ ​(NOT)A​ FUNUMENTARY:​ Take what you can, give nothing back...​ ​(NOT)
A​ FUNUMENTARY:​ Take what you can, give nothing back...​ ​(NOT)
 
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
 

KĂĽrzlich hochgeladen

7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
ibrahimabdi22
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
ahmedjiabur940
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
gajnagarg
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptx
chadhar227
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
nirzagarg
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
SayantanBiswas37
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
gajnagarg
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
HyderabadDolls
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
gajnagarg
 

KĂĽrzlich hochgeladen (20)

Aspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - AlmoraAspirational Block Program Block Syaldey District - Almora
Aspirational Block Program Block Syaldey District - Almora
 
7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt7. Epi of Chronic respiratory diseases.ppt
7. Epi of Chronic respiratory diseases.ppt
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
Nirala Nagar / Cheap Call Girls In Lucknow Phone No 9548273370 Elite Escort S...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
Digital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham WareDigital Transformation Playbook by Graham Ware
Digital Transformation Playbook by Graham Ware
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In bhavnagar [ 7014168258 ] Call Me For Genuine Models...
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
 
Gartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptxGartner's Data Analytics Maturity Model.pptx
Gartner's Data Analytics Maturity Model.pptx
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
 
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about them
 
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
Jodhpur Park | Call Girls in Kolkata Phone No 8005736733 Elite Escort Service...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Charbagh + Female Escorts Service in Lucknow | Starting â‚ą,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting â‚ą,5K To @25k with A/C...Charbagh + Female Escorts Service in Lucknow | Starting â‚ą,5K To @25k with A/C...
Charbagh + Female Escorts Service in Lucknow | Starting â‚ą,5K To @25k with A/C...
 

The story behind SNCB alerts

Hinweis der Redaktion

  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 ?