Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

brail2stoptimes

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brail2stoptimes

Scrapes the Belgian Railway company's website for stoptimes

  • 0.0.1
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Belgian Rail 2 stoptimes

This project generates a stream of real stoptimes between 2 time intervals for a list of stops

A stoptime?

Yes! A stoptime is 1 arrival and departure of 1 train on 1 location (a platform or station).

We particularly use the term "stoptime", as we use the stoptime ontology defined by the Open Knowledge Open Transport Working Group.

1 stoptime looks something like this:

{ "stop" : "http://irail.be/stations/NMBS/008821121#10",
  "departureTime" : "2014-12-15T18:02:00Z",
  "headsign" : "Antwerpen-Centraal",
  "@id" : "http://irail.be/stations/NMBS/008821121/stoptimes/201411115IC4517#stoptime",
  "arrivalTime" : "2014-12-15T18:00:00Z",
  "provenance" : "Charleroi-Sud"
}

How do I use it?

Easy! You install this repo using npm in your own project and you can start doing fun things:

npm install brail2stoptimes --save

And now use it in your project as follows:

var BRail2StopTimesStream = require("brail2stoptimes");
//you can find these identifiers in our https://github.com/iRail/stations repository or check the bin/example.js file
var stations = ["008718201","008718206","008500010","008832664"];
var stoptimesstream = new BRail2StopTimesStream(stations, "en", new Date(), new Date() + 2); //get for 2 days
stoptimesstream.on("data", function (data) {
  //do something with it:
  console.log(data);
});

What now?

You can ingest this data in e.g., mongodb (check the bin directory) or start creating data dumps such as a GTFS dump. If you've done something, please let me know through the issue tracker.

FAQs

Package last updated on 17 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc