Skip to content

Commit

Permalink
Update README with latest news
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard de Labareyre authored and espadrine committed Jun 21, 2017
1 parent 591e23c commit 29d1c0a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 12 deletions.
5 changes: 4 additions & 1 deletion Gemfile.lock
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
minitest (5.6.0)
minitest (5.6.1)
stringex (2.5.2)

PLATFORMS
Expand All @@ -10,3 +10,6 @@ PLATFORMS
DEPENDENCIES
minitest (~> 5.6.0)
stringex (~> 2.5.2)

BUNDLED WITH
1.14.3
6 changes: 5 additions & 1 deletion Makefile
@@ -1,3 +1,7 @@
# Run the tests
.PHONY: install test

install:
bundle install

test:
ruby test_data.rb
44 changes: 34 additions & 10 deletions README.md
Expand Up @@ -21,9 +21,18 @@ Data come from the following sources:

All these sources were released under ODbL or compatible licences.

## Tests

If you're going to modify the file, don't forget to run the automated tests to ensure consistency of the information provided. This script is used in the build triggered by merge requests.

```bash
make install
make test
```

## The Data

The file `stations.csv` contains all our data representing train stations. The file is UTF-8 encoded text file and Comma Separated Value (CSV) formatted – although a semi-colon `;` is used to delimitate fields.
The file `stations.csv` contains all our data representing train stations and cities. The file is UTF-8 encoded text file and Comma Separated Value (CSV) formatted – although a semi-colon `;` is used to delimitate fields. Boolean flags are represented with t/f (true/false) values.

### Columns

Expand All @@ -37,17 +46,19 @@ Column Name | Notes
`longitude` | Coordinates as decimal value.
`latitude` | Coordinates as decimal value.
`parent_station_id` | A station can belong to a _meta station_ whose `id` is this value, i.e. _Paris Gare d’Austerlitz_ belongs to the metastation _Paris_.
`is_city` | This value is unreliable.
`country` | 2 letters, [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
`is_main_station` | This value is unreliable.
`time_zone` | [Continent/Country ISO codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
`is_suggestable` | Can the user input this station.
`is_city` | This value is unreliable.
`is_main_station` | This value is unreliable.
`is_airport` | Specify if the station is related to an airport.
`is_suggestable` | Specify if the user can input this station.
`country_hint` | Specify if the country should be displayed to disambiguate the station's name.
`sncf_self_service_machine` | Presence of a SNCF self-service machine at the station.
`same_as` | Some systems allow stations to be split in two, with two `id` values. If provided, the station identified by the given value should be considered as the actual station.

#### Operator Specific

Operator specific columns contain identifiers and values specific to the operator. Columns are prefixed with a name unique to the operator.
Operator specific columns contain identifiers and values specific to the operator. Columns are prefixed with a name unique to the operator. `rt*` columns are about ids used in realtime APIs.

Column Name | Notes
----------- | -----
Expand All @@ -63,12 +74,24 @@ Column Name | Notes
`hkx_is_enabled` |
`busbud_id` |
`busbud_is_enabled` |
`flixbus_id` |
`flixbus_is_enabled` |
`ouigo_id` |
`ouigo_is_enabled` |
`trenitalia_id` |
`trenitalia_is_enabled` |
`trenitalia_rtvt_id` |
`ntv_id` |
`ntv_is_enabled` |
`ntv_rtiv_id` |
`hkx_id` |
`hkx_is_enabled` |
`renfe_id` |
`renfe_is_enabled` |
`atoc_id` |
`atoc_is_enabled` |
`benerail_id` |
`benerail_is_enabled` |

#### Internationalisation

Expand All @@ -82,9 +105,10 @@ Column Name | Notes
`info:de` |
`info:it` |

## Tests
## Productivity tools

```bash
bundle install
ruby test_data.rb
```
#### For internationalisation

To facilitate the internationalisation of city names, we use and maintain a script querying [Geonames API](http://www.geonames.org/) to look for city name translations.

The project is hosted [on Github](https://github.com/mgalibert/geonames) and contains its own documentation.

0 comments on commit 29d1c0a

Please sign in to comment.