Parses GTFS data into usable structures using streams


2.1.04 years ago5 years agoMinified + gzip package size for @ltbuses/gtfs-parser in KB


LTBuses GTFS Parse

This is a simple parser the takes a stream containing a GTFS-formatted zip file, and extracts the data relevant to the LTBuses applications.

It uses unzip-stream to extract the data on the fly, without having to completely unpack the entire zip file.

The current result format is very specific to what is needed for the LTBuses apps, which currently only supports the LTC buses in London, Ontario.


npm install @ltbuses/gtfs-parser


const fs = require('fs');
const GtfsParser = require('@ltbuses/gtfs-parser');

const transitZip = fs.createReadStream('google_transit.zip');
const gtfsParser = new GtfsParser(transitZip);

gtfsParser.getData().then((gtfs) => {

See the developer documentation for full details.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.