New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide line number in liveboard for departures and arrivals #334

Closed
drupol opened this Issue Dec 5, 2017 · 8 comments

Comments

Projects
None yet
3 participants
@drupol

drupol commented Dec 5, 2017

Hello,

Would it be possible to add in the departures, information regarding the train line.

Ex: Train IC1234 from Mons to Brussels: Line 96 (wikipedia)

I've checked the sncb site and this information is never show to the visitor.
Therefore, do you think we should hardcode it ourself per station ?

Here's the full list.

Thanks.

@drupol drupol changed the title from Provide line number in liveboard departures and arrivals to Provide line number in liveboard for departures and arrivals Dec 5, 2017

@Bertware Bertware added the Question label Dec 5, 2017

@drupol

This comment has been minimized.

Show comment
Hide comment
@drupol

drupol Dec 24, 2017

Hello,

After some discussion with @pietercolpaert on Gitter, we are using Wikidata and store using the "Exact Match" property the irail station identifier (URL) for each station

We have to make sure that every stations has basically 4 properties:

  1. Part of: contains lines that pass through the station, nowadays in use or not (past and current)
  2. Connecting lines: contains lines that pass through the station, nowadays in use only (current only)
  3. Exact match: an URL (in HTTP only!) to the station on irail.be domain. ex: http://irail.be/stations/NMBS/008884541
  4. Adjacent stations: According to me, adjacent stations are the first stations you find if you go in any directions from the current station.

Then, it's possible to retrieve the list of associated stations to a line using a sparql query:

  1. http://tinyurl.com/yca8pywf (without aggregation)
  2. http://tinyurl.com/yaxk7oaw (with aggregation)

The bad news is that we have to fill in those information ourselves in Wikidata.

In order to speed up the process, I built a small tool that update automatically in background as we complete the data in wikidata.

screenshot-young-cliffs-90300 herokuapp com-2017-12-26-01-42-24

This map shows stations that has been linked to irail.be. A lot has already been done, but there are still some work to do and you are welcome to help.

  • Green markers: Station is linked to irail and has proper adjacent stations.
  • Yellow markers: Station is linked to irail and has no proper adjacent stations.
  • Red markers: Station is not linked to irail.

During the update of a station, I also take care of naming. Exemple before/after:

Before (mind the case)
screenshot-www wikidata org-2017-12-24-11-15-07

After (Case is fixed)
screenshot-www wikidata org-2017-12-24-11-15-37

I've got some questions:

  1. Why some stations like: Ronse, Herne, Viane-Moerbeke, Lierde... are not available in Wikidata? Should we create them ourselves ?

drupol commented Dec 24, 2017

Hello,

After some discussion with @pietercolpaert on Gitter, we are using Wikidata and store using the "Exact Match" property the irail station identifier (URL) for each station

We have to make sure that every stations has basically 4 properties:

  1. Part of: contains lines that pass through the station, nowadays in use or not (past and current)
  2. Connecting lines: contains lines that pass through the station, nowadays in use only (current only)
  3. Exact match: an URL (in HTTP only!) to the station on irail.be domain. ex: http://irail.be/stations/NMBS/008884541
  4. Adjacent stations: According to me, adjacent stations are the first stations you find if you go in any directions from the current station.

Then, it's possible to retrieve the list of associated stations to a line using a sparql query:

  1. http://tinyurl.com/yca8pywf (without aggregation)
  2. http://tinyurl.com/yaxk7oaw (with aggregation)

The bad news is that we have to fill in those information ourselves in Wikidata.

In order to speed up the process, I built a small tool that update automatically in background as we complete the data in wikidata.

screenshot-young-cliffs-90300 herokuapp com-2017-12-26-01-42-24

This map shows stations that has been linked to irail.be. A lot has already been done, but there are still some work to do and you are welcome to help.

  • Green markers: Station is linked to irail and has proper adjacent stations.
  • Yellow markers: Station is linked to irail and has no proper adjacent stations.
  • Red markers: Station is not linked to irail.

During the update of a station, I also take care of naming. Exemple before/after:

Before (mind the case)
screenshot-www wikidata org-2017-12-24-11-15-07

After (Case is fixed)
screenshot-www wikidata org-2017-12-24-11-15-37

I've got some questions:

  1. Why some stations like: Ronse, Herne, Viane-Moerbeke, Lierde... are not available in Wikidata? Should we create them ourselves ?
@pietercolpaert

This comment has been minimized.

Show comment
Hide comment
@pietercolpaert

pietercolpaert Dec 24, 2017

Member

Yes! Creating them ourselves with the right type and line information :)

Member

pietercolpaert commented Dec 24, 2017

Yes! Creating them ourselves with the right type and line information :)

@drupol

This comment has been minimized.

Show comment
Hide comment
@drupol

drupol Dec 26, 2017

Updating the tools, add a visual marker when a station has no adjacent stations.

drupol commented Dec 26, 2017

Updating the tools, add a visual marker when a station has no adjacent stations.

@drupol

This comment has been minimized.

Show comment
Hide comment
@drupol

drupol Dec 29, 2017

Most of the stations are done.

screenshot-young-cliffs-90300 herokuapp com-2017-12-29-09-09-43

Now we need to create the missing stations in Wikipedia and then, in Wikidata.

Useful links:

  1. Lijst van NMBS-stations in België
  2. http://users.telenet.be/pk/lijnen.htm

drupol commented Dec 29, 2017

Most of the stations are done.

screenshot-young-cliffs-90300 herokuapp com-2017-12-29-09-09-43

Now we need to create the missing stations in Wikipedia and then, in Wikidata.

Useful links:

  1. Lijst van NMBS-stations in België
  2. http://users.telenet.be/pk/lijnen.htm
@drupol

This comment has been minimized.

Show comment
Hide comment
@drupol

drupol Dec 29, 2017

Ok, all stations from Belgium are covered!

screenshot-young-cliffs-90300 herokuapp com-2017-12-29-22-54-08

Finally!

drupol commented Dec 29, 2017

Ok, all stations from Belgium are covered!

screenshot-young-cliffs-90300 herokuapp com-2017-12-29-22-54-08

Finally!

@drupol

This comment has been minimized.

Show comment
Hide comment
@drupol

drupol Dec 30, 2017

It is also possible, with a simple BFS algo to find the route between two stations, thanks to all these new data (esp. the adjacent station property)

screenshot_20171230_110213

drupol commented Dec 30, 2017

It is also possible, with a simple BFS algo to find the route between two stations, thanks to all these new data (esp. the adjacent station property)

screenshot_20171230_110213

@pietercolpaert

This comment has been minimized.

Show comment
Hide comment
@pietercolpaert

pietercolpaert Jan 2, 2018

Member

That’s some great work @drupol! Do you think this issue can now be closed?

Member

pietercolpaert commented Jan 2, 2018

That’s some great work @drupol! Do you think this issue can now be closed?

@drupol

This comment has been minimized.

Show comment
Hide comment
@drupol

drupol Jan 2, 2018

Sure we can close it now.

As an outcome of this issue, the NodeJS package irail-api is able to retrieve stations from iRail, lines and adjacent stations from Wikidata.

drupol commented Jan 2, 2018

Sure we can close it now.

As an outcome of this issue, the NodeJS package irail-api is able to retrieve stations from iRail, lines and adjacent stations from Wikidata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment