Skip to content

Commit

Permalink
Version 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
pietercolpaert committed Dec 19, 2018
2 parents 5bfba13 + c08af7e commit e1a1120
Show file tree
Hide file tree
Showing 15 changed files with 5,781 additions and 3,490 deletions.
63 changes: 58 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ We try to maintain a list of all the stations in Belgium using CSV so everyone c
## Fields we collect

### stations.csv
This file describes all NMBS/SNCB stations in Belgium. A station can have multiple platforms (stops), which are described in `stops.csv`.

* `URI`: this is the URI where we can find more information (such as the real-time departures) about this station (this already contains the ID of the NMBS/SNCB as well)
* `longitude`: the longitude of the station
Expand All @@ -18,16 +19,68 @@ We try to maintain a list of all the stations in Belgium using CSV so everyone c
* `alternative-de`: alt. name in German, if available
* `alternative-en`: alt. name in English, if available
* `country-code`: the code of the country the station belongs to
* `avg_stop_times`: the average stop times per day in this station
* `avg_stop_times`: the average number of vehicles stopping each day in this station (_computed field_)
* `official_transfer_time`: the time needed for an average person to make a transfer in this station, according to official sources (NMBS/SNCB) (_computed field_)

### stops.csv

* `URI`: this is the URI where we can find more information about this stop/platform (exists out of URI of the parent station + '#' + platform code)
This file describes all NMBS/SNCB stops in Belgium. Each platform is a separate stop location. All fields are computed using `gtfs_data_extractor.php`.
* `URI`: this is the URI where we can find more information about this stop/platform (exists out of URI of the parent station + '#' + platform code)
* `parent_stop`: this is the URI of the parent stop defined in stations.csv
* `longitude`: the longitude of the stop
* `latitude`: the latitude of the stop
* `name`: parent station name
* `platform`: the platform code
* `name`: stop name
* `alternative-fr`: alt. name in French, if available
* `alternative-nl`: alt. name in Dutch, if available
* `alternative-de`: alt. name in German, if available
* `alternative-en`: alt. name in English, if available
* `platform`: the platform code (can also consist of letters, so do not treat this as a number!)

### facilities.csv
This file describes facilities available in NMBS/SNCB stations. All fields are computed using `web_facilities_extractor.php`.

* `URI`: The URI identifying this station.
* `name`: The name of this station.
* `street`: The street of this station's address.
* `zip`: The postal code of this station's address.
* `city`: The city of this station's address.
* `ticket_vending_machine`: Whether or not ticket vending machines are available. Note: Ticket vending machines might be located inside a building (and can be locked when the station is closed).
* `luggage_lockers`: Whether or not luggage lockers are available.
* `free_parking`: Whether or not free parking spots are available.
* `taxi`: Whether or not parking spots for taxis / waiting taxis are available.
* `bicycle_spots`: Whether or not bicycle parking spots are available.
* `blue-bike`: Whether or not the has blue-bikes (rental bikes).
* `bus`: Whether or not transferring to a bus line is possible in this station.
* `tram`: Whether or not transferring to a tram line is possible in this station.
* `metro`: Whether or not transferring to a metro line is possible in this station.
* `wheelchair_available`: Whether or not the station has wheelchairs available.
* `ramp`: Whether or not the station has a ramp for wheelchair users to board a train.
* `disabled_parking_spots`: The number of reserved parking spots for travellers with a disability.
* `elevated_platform`: Whether or not the station has elevated platforms.
* `escalator_up`: Whether or not the station has an ascending escalator from or to the platform(s).
* `escalator_down`: Whether or not the station has a descending escalator from or to the platform(s).
* `elevator_platform`: Whether or not the station has an elevator to the platform(s).
* `audio_induction_loop `: Whether or not an Audio induction loop (Dutch: Ringleiding) is available.
* `sales_open_monday` - `sales_open_sunday`: The time at which ticket boots open on this day of the week.
* `sales_close_monday` -`sales_close_sunday`:The time at which ticket boots close on this day of the week.

## How we collect data

This repository contains two PHP scripts which can load all data from the NMBS GTFS public data and the NMBS website. These scripts can be used to generate all CSV files from scratch, and to update existing files.

Manual changes and corrections can be made to `stations.csv`. It is recommended to use the `stations.csv` file in this repository as a starting point instead of using the scripts to generate this file, as the repository versions includes manual fixes to station names and translations.

**Any changes made to `stops.csv` or `facilities.csv` will be overwritten by the scripts.** Therefore, any pull requests with the sole purpose of updating/modifying these files won't be accepted

Missing stations and missing fields in `stations.csv` are automatically added when the gtfs_data_extractor tool runs.

### How to make a correction
Corrections to names, translations and locations can be made by adjusting fields in `stations.csv`:

* Names or translations will never be overwritten by the scripts.
* Names in `facilities.csv` or `stops.csv` are derived from the names in stations.csv, meaning you only need to update `stations.csv`.
* The GTFS data extractor script will warn on wrong locations, but won't correct them.

If you want to make a correction to `facilities.csv` or `stops.csv`, don't fix the files, but fix the scripts instead, and let these scripts run to update the file for you.

## Build the RDF or JSON-LD

Expand Down
12 changes: 9 additions & 3 deletions bin/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var program = require('commander');

console.error("irail-stations by Pieter Colpaert <pieter@iRail.be> - http://hello.irail.be - use --help to discover more functions");
program
.version('0.1.0')
.version('0.1.5')
.option('-f --format [json,trig,nquads]', 'Format', /^(json|trig|nquads)$/i)
.parse(process.argv);

Expand All @@ -35,8 +35,14 @@ var prefixes = {
//JSON-LD context for the JSON-LD serialisation
var context = {
"name": "http://xmlns.com/foaf/0.1/name",
"longitude":"http://www.w3.org/2003/01/geo/wgs84_pos#long",
"latitude":"http://www.w3.org/2003/01/geo/wgs84_pos#lat",
"longitude": {
"@id":"http://www.w3.org/2003/01/geo/wgs84_pos#long",
"@type":"http://www.w3.org/2001/XMLSchema#float"
},
"latitude": {
"@id":"http://www.w3.org/2003/01/geo/wgs84_pos#lat",
"@type":"http://www.w3.org/2001/XMLSchema#float"
},
"alternative":"http://purl.org/dc/terms/alternative",
"country":{
"@type" : "@id",
Expand Down
216 changes: 0 additions & 216 deletions bin/facility_scraper.php

This file was deleted.

Loading

0 comments on commit e1a1120

Please sign in to comment.