node-gtfs
Import GTFS transit data into SQLite and query routes, stops, times, fares and more.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.3%) to scientific vocabulary
Keywords
Repository
Import GTFS transit data into SQLite and query routes, stops, times, fares and more.
Basic Info
Statistics
- Stars: 474
- Watchers: 22
- Forks: 156
- Open Issues: 12
- Releases: 173
Topics
Metadata Files
README.md
➡️
Installation |
Quick Start |
TypeScript Support |
Configuration |
Query Methods
⬅️
Import and Export GTFS transit data into SQLite. Query or change routes, stops, times, fares and more.
node-GTFS loads transit data in GTFS format into a SQLite database and provides some methods to query for agencies, routes, stops, times, fares, calendars and other GTFS data. It also offers spatial queries to find nearby stops, routes and agencies and can convert stops and shapes to geoJSON format. Additionally, this library can export data from the SQLite database back into GTFS (csv) format.
The library also supports importing GTFS-Realtime data into the same database. In order to keep the realtime database fresh, it uses SQLITE REPLACE which makes it very effective.
You can use it as a command-line tool or as a node.js module.
This library has four parts: the GTFS import script, GTFS export script and GTFS-Realtime update script and the query methods
Installation
To use this library as a command-line utility, install it globally with npm:
npm install gtfs -g
This will add the gtfs-import and gtfs-export scripts to your path.
If you are using this as a node module as part of an application, include it in your project's package.json file.
npm install gtfs
Quick Start
Command-line examples
gtfs-import --gtfsUrl http://www.bart.gov/dev/schedules/google_transit.zip
or
gtfs-import --gtfsPath /path/to/your/gtfs.zip
or
gtfs-import --gtfsPath /path/to/your/unzipped/gtfs
or
gtfs-import --configPath /path/to/your/custom-config.json
gtfs-export --configPath /path/to/your/custom-config.json
Code example
```js import { importGtfs } from 'gtfs'; import { readFile } from 'fs/promises'; import path from 'node:path';
const config = JSON.parse( await readFile(path.join(import.meta.dirname, 'config.json'), 'utf8') );
try { await importGtfs(config); } catch (error) { console.error(error); } ```
Example Applications
| GTFS-to-HTML uses `node-gtfs` for downloading, importing and querying GTFS data. It provides a good example of how to use this library and is used by over a dozen transit agencies to generate the timetables on their websites. | |
| GTFS-to-geojson creates geoJSON files for transit routes for use in mapping. It uses `node-gtfs` for downloading, importing and querying GTFS data. It provides a good example of how to use this library. | |
| GTFS-to-chart generates a stringline chart in D3 for all trips for a specific route using data from an agency's GTFS. It uses `node-gtfs` for downloading, importing and querying GTFS data. | |
| GTFS Accessibility Validator checks for accessiblity-realted fields and files and flags any issues. It uses `node-gtfs` for downloading, importing and querying GTFS data. | |
| GTFS-Text-to-Speech app tests GTFS stop name pronunciation for text-to-speech. It uses `node-gtfs` for loading stop names from GTFS data. | |
| Transit Departures Widget creates a realtime transit departures widget from GTFS and GTFS-Realtime data. |
Command-Line Usage
The gtfs-import command-line utility will import GTFS into SQLite3.
The gtfs-export command-line utility will create GTFS from data previously imported into SQLite3.
gtfs-import Command-Line options
configPath
Allows specifying a path to a configuration json file. By default, node-gtfs will look for a config.json file in the directory it is being run from. Using a config.json file allows you specify more options than CLI arguments alone - see below.
gtfs-import --configPath /path/to/your/custom-config.json
gtfsPath
Specify a local path to GTFS, either zipped or unzipped.
gtfs-import --gtfsPath /path/to/your/gtfs.zip
or
gtfs-import --gtfsPath /path/to/your/unzipped/gtfs
gtfsUrl
Specify a URL to a zipped GTFS file.
gtfs-import --gtfsUrl http://www.bart.gov/dev/schedules/google_transit.zip
TypeScript Support
Basic TypeScript typings are included with this library. Please open an issue if you find any inconsistencies between the declared types and underlying code.
Configuration
Copy config-sample.json to config.json and then add your projects configuration to config.json.
cp config-sample.json config.json
| option | type | description |
| ----------------------------------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| agencies | array | An array of GTFS files to be imported, and which files to exclude. |
| csvOptions | object | Options passed to csv-parse for parsing GTFS CSV files. Optional. |
| db | database instance | An existing database instance to use instead of relying on node-gtfs to connect. Optional. |
| downloadTimeout | integer | The number of milliseconds to wait before throwing an error when downloading GTFS. Optional. |
| exportPath | string | A path to a directory to put exported GTFS files. Optional, defaults to gtfs-export/<agency_name>. |
| gtfsRealtimeExpirationSeconds | integer | Amount of time in seconds to allow GTFS-Realtime data to be stored in database before allowing to be deleted. Optional, defaults to 0. |
| ignoreDuplicates | boolean | Whether or not to ignore unique constraints on ids when importing GTFS, such as trip_id, calendar_id. Optional, defaults to false. |
| ignoreErrors | boolean | Whether or not to ignore errors during the import process. If true, failed files will be skipped while the rest are processed. Optional, defaults to false. |
| sqlitePath | string | A path to an SQLite database. Optional, defaults to using an in-memory database. |
| verbose | boolean | Whether or not to print output to the console. Optional, defaults to true. |
agencies
{Array} Specify the GTFS files to be imported in an agencies array. GTFS files can be imported via a url or a local path.
For GTFS files that contain more than one agency, you only need to list each GTFS file once in the agencies array, not once per agency that it contains.
agencies options
| option | type | description |
| -------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| url | string | The URL to a zipped GTFS file. Required if path not present. |
| path | string | A path to a zipped GTFS file or a directory of unzipped .txt files. Required if url is not present. |
| headers | object | An object of HTTP headers in key:value format to use when fetching GTFS from the url specified. Optional. |
| prefix | string | A prefix to be added to every ID field maintain uniqueness when importing multiple GTFS from multiple agencies. Optional. |
| exclude | array | An array of GTFS file names (without .txt) to exclude when importing. Optional. |
| realtimeAlerts | object | An object containing a url field for GTFS-Realtime alerts and a headers field in key:value format to use when fetching GTFS-Realtime data. Optional. |
| realtimeTripUpdates | object | An object containing a url field for GTFS-Realtime trip updates and a headers field in key:value format to use when fetching GTFS-Realtime data. Optional. |
| realtimeVehiclePositions | object | An object containing a url field for GTFS-Realtime vehicle positions and a headers field in key:value format to use when fetching GTFS-Realtime data. Optional. |
- Specify a
urlto download GTFS:
json
{
"agencies": [
{
"url": "https://www.bart.gov/dev/schedules/google_transit.zip"
}
]
}
- Specify a download URL with custom headers using the
headersfield:
json
{
"agencies": [
{
"url": "https://www.bart.gov/dev/schedules/google_transit.zip",
"headers": {
"Content-Type": "application/json",
"Authorization": "bearer 1234567890"
}
}
]
}
- Specify a
pathto a zipped GTFS file:
json
{
"agencies": [
{
"path": "/path/to/the/gtfs.zip"
}
]
}
- Specify a
pathto an unzipped GTFS file:
json
{
"agencies": [
{
"path": "/path/to/the/unzipped/gtfs/"
}
]
}
- If you don't want all GTFS files to be imported, you can specify an array of files to
exclude. This can save a lot of time for larger GTFS.
json
{
"agencies": [
{
"path": "/path/to/the/unzipped/gtfs/",
"exclude": ["shapes", "stops"]
}
]
}
- Specify urls for GTFS-Realtime updates.
realtimeAlerts,realtimeTripUpdatesandrealtimeVehiclePositionsfields accept an object with aurland optionalheadersfield to specify HTTP headers to include with the request, usually for authorization purposes.
json
{
"agencies": [
{
"url": "https://www.bart.gov/dev/schedules/google_transit.zip",
"realtimeAlerts": {
"url": "https://api.bart.gov/gtfsrt/alerts.aspx",
"headers": {
"Authorization": "bearer 123456789"
}
},
"realtimeTripUpdates": {
"url": "https://api.bart.gov/gtfsrt/tripupdate.aspx",
"headers": {
"Authorization": "bearer 123456789"
}
},
"realtimeVehiclePositions": {
"url": "https://api.bart.gov/gtfsrt/vehiclepositions.aspx",
"headers": {
"Authorization": "bearer 123456789"
}
}
}
]
}
- Specify multiple agencies to be imported into the same database
json
{
"agencies": [
{
"path": "/path/to/the/gtfs.zip"
},
{
"path": "/path/to/the/othergtfs.zip"
}
]
}
- When importing multiple agencies their IDs may overlap. Specify a
prefixto be added to every ID field to maintain uniqueness.
json
{
"agencies": [
{
"path": "/path/to/the/gtfs.zip",
"prefix": "A"
},
{
"path": "/path/to/the/othergtfs.zip",
"prefix": 10000
}
]
}
csvOptions
{Object} Add options to be passed to csv-parse with the key csvOptions. This is an optional parameter.
For instance, if you wanted to skip importing invalid lines in the GTFS file:
json
"csvOptions": {
"skip_lines_with_error": true
}
See full list of options.
db
{Database Instance} When passing configuration to importGtfs in javascript, you can pass a db parameter with an existing database instance. This is not possible using a json configuration file Optional.
```js // Using better-sqlite3 to open database import { importGtfs } from 'gtfs'; import Database from 'better-sqlite3';
const db = new Database('/path/to/database');
importGtfs({ agencies: [ { path: '/path/to/the/unzipped/gtfs/', }, ], db: db, }); ```
``js
// UsingopenDb` from node-gtfs to open database
import { importGtfs, openDb } from 'gtfs';
const db = openDb({ sqlitePath: '/path/to/database', });
importGtfs({ agencies: [ { path: '/path/to/the/unzipped/gtfs/', }, ], db: db, }); ```
downloadTimeout
{Integer} A number of milliseconds to wait when downloading GTFS before throwing an error. Optional.
json
{
"agencies": [
{
"path": "/path/to/the/unzipped/gtfs/"
}
],
"downloadTimeout": 5000
}
exportPath
{String} A path to a directory to put exported GTFS files. If the directory does not exist, it will be created. Used when running gtfs-export script or exportGtfs(). Optional, defaults to gtfs-export/<agency_name> where <agency_name> is a sanitized, snake-cased version of the first agency_name in agency.txt.
json
{
"agencies": [
{
"path": "/path/to/the/unzipped/gtfs/"
}
],
"exportPath": "~/path/to/export/gtfs"
}
gtfsRealtimeExpirationSeconds
{Integer} Amount of time in seconds to allow GTFS-Realtime data to be stored in database before allowing to be deleted. Defaults to 0 (old GTFS-Realtime is deleted immediately when new data arrives). Note that if new data arrives for the same trip update, vehicle position or service alert before the expiration time, it will overwrite the existing data. The gtfsRealtimeExpirationSeconds only affects when data is deleted.
json
{
"agencies": [
{
"url": "https://www.bart.gov/dev/schedules/google_transit.zip",
"realtimeAlerts": {
"url": "https://api.bart.gov/gtfsrt/alerts.aspx"
},
"realtimeTripUpdates": {
"url": "https://api.bart.gov/gtfsrt/tripupdate.aspx"
},
"realtimeVehiclePositions": {
"url": "https://api.bart.gov/gtfsrt/vehiclepositions.aspx"
}
}
],
"gtfsRealtimeExpirationSeconds": false
}
ignoreDuplicates
{Boolean} If you don't want node-GTFS to throw an error when it encounters a duplicate id on GTFS import. If true, it will skip importing duplicate records where unique constraints are violated, such astrip_id, stop_id, calendar_id. Useful if importing GTFS from multiple sources into one SQlite database that share routes or stops. Defaults to false.
json
{
"agencies": [
{
"path": "/path/to/the/unzipped/gtfs/"
}
],
"ignoreDuplicates": false
}
ignoreErrors
{Boolean} Controls error handling behavior during GTFS import. When true, the import process will continue even when encountering errors, logging them instead of stopping execution. Defaults to false.
When enabled, ignoreErrors will:
- Continue processing other GTFS files when one file fails
- Log error messages instead of throwing exceptions
- Skip problematic records within files while importing valid ones
- Handle various error types including:
- Invalid CSV data or malformed records
- JSON parsing errors (for GeoJSON files)
- Database constraint violations
- File read/write errors
- GTFS-Realtime API failures
Use cases: - Importing from multiple GTFS sources where some may have data quality issues - Processing large datasets where minor errors shouldn't halt the entire import - Development/testing scenarios where you want to see all errors at once
⚠️ Important considerations:
- Errors are logged but not thrown, so you may miss critical data issues
- Partial imports may result in incomplete or inconsistent data
- Consider using the exclude config option to skip problematic files entirely instead of ignoring errors
json
{
"agencies": [
{
"path": "/path/to/the/unzipped/gtfs/"
}
],
"ignoreErrors": true
}
sqlitePath
{String} A path to an SQLite database. Optional, defaults to using an in-memory database with a value of :memory:.
json
"sqlitePath": "/dev/sqlite/gtfs"
verbose
{Boolean} If you don't want the import script to print any output to the console, you can set verbose to false. Defaults to true.
json
{
"agencies": [
{
"path": "/path/to/the/unzipped/gtfs/"
}
],
"verbose": false
}
If you want to route logs to a custom function, you can pass a function that takes a single text argument as logFunction. This can't be defined in config.json but instead passed in a config object to importGtfs(). For example:
```js import { importGtfs } from 'gtfs';
const config = { agencies: [ { url: 'https://www.bart.gov/dev/schedules/google_transit.zip', exclude: ['shapes'], }, ], logFunction: function (text) { // Do something with the logs here, like save it or send it somewhere console.log(text); }, };
await importGtfs(config); ```
gtfs-import Script
The gtfs-import script reads from a JSON configuration file and imports the GTFS files specified to a SQLite database. Read more on setting up your configuration file.
Run the gtfs-import script from command-line
gtfs-import
By default, it will look for a config.json file in the project root. To specify a different path for the configuration file:
gtfs-import --configPath /path/to/your/custom-config.json
Use importGtfs script in code
Use importGtfs() in your code to run an import of a GTFS file specified in a config.json file.
```js import { importGtfs } from 'gtfs'; import { readFile } from 'fs/promises'; import path from 'node:path';
const config = JSON.parse( await readFile(path.join(import.meta.dirname, 'config.json'), 'utf8') );
await importGtfs(config); ```
Configuration can be a JSON object in your code
```js import { importGtfs } from 'gtfs';
const config = { sqlitePath: '/dev/sqlite/gtfs', agencies: [ { url: 'https://www.bart.gov/dev/schedules/google_transit.zip', exclude: ['shapes'], }, ], };
await importGtfs(config); ```
gtfsrealtime-update Script
The gtfsrealtime-update script requests GTFS-Realtime data and importings into a SQLite database. GTFS-Realtime data can compliment GTFS Static data. Read more about GTFS-Realtime configuration.
Run the gtfsrealtime-update script from command-line
gtfsrealtime-update
By default, it will look for a config.json file in the project root. To specify a different path for the configuration file:
gtfsrealtime-update --configPath /path/to/your/custom-config.json
Use updateGtfsRealtime script in code
Use updateGtfsRealtime() in your code to run an update of a GTFS-Realtime data specified in a config.json file.
```js import { updateGtfsRealtime } from 'gtfs'; import { readFile } from 'fs/promises'; import path from 'node:path';
const config = JSON.parse( await readFile(path.join(import.meta.dirname, 'config.json'), 'utf8') );
await updateGtfsRealtime(config); ```
gtfs-export Script
The gtfs-export script reads from a JSON configuration file and exports data in GTFS format from a SQLite database. Read more on setting up your configuration file.
This could be used to export a GTFS file from SQLite after changes have been made to the data in the database manually.
Make sure to import GTFS data into SQLite first
Nothing will be exported if there is no data to export. See the GTFS import script.
Run the gtfs-export script from Command-line
gtfs-export
By default, it will look for a config.json file in the project root. To specify a different path for the configuration file:
gtfs-export --configPath /path/to/your/custom-config.json
Command-Line options
Specify path to config JSON file
You can specify the path to a config file to be used by the export script.
gtfs-export --configPath /path/to/your/custom-config.json
Show help
Show all command-line options
gtfs-export --help
Use exportGtfs script in code
Use exportGtfs() in your code to run an export of a GTFS file specified in a config.json file.
```js import { exportGtfs } from 'gtfs';
const config = { sqlitePath: '/dev/sqlite/gtfs', agencies: [ { url: 'https://www.bart.gov/dev/schedules/google_transit.zip', exclude: ['shapes'], }, ], };
await exportGtfs(config); ```
Query Methods
This library includes many methods you can use in your project to query GTFS data. In addition to standard static GTFS, node-gtfs supports the following extensions to GTFS:
- GTFS-Realtime - Realtime alerts, vehicle positions and predictions
- GTFS-Ride - Passenger counts
- Operational Data Standard (ODS) - Deadheads and personnel info
- GTFS-Timetables - Information for creating human-readable timetables
There are also methods for retrieving stops and shapes in geoJSON format.
Most query methods accept three optional arguments: query, fields, sortBy and options.
For more advanced queries, you can use advancedQuery or raw SQL queries using query method from better-sqlite3.
Database Setup
To use any of the query methods, first open the database using openDb before making any queries:
```js import { openDb } from 'gtfs'; import { readFile } from 'fs/promises'; import path from 'node:path';
const config = JSON.parse( await readFile(path.join(import.meta.dirname, 'config.json'), 'utf8') );
const db = openDb(config); ```
If you no longer need a database (especially if using an in-memory database) you can use closeDb:
```js import { closeDb, openDb } from 'gtfs'; const db = openDb(config);
// Do some stuff here
// Close database connection when done. closeDb(db); ```
Deleting a Database
You can use deleteDb to delete a sqlite3 database from the filesystem.
```js import { deleteDb, openDb } from 'gtfs'; const db = openDb(config);
// Do some stuff here
// Delete the database deleteDb(db); ```
Examples
For example, to get a list of all routes with just route_id, route_short_name and route_color sorted by route_short_name:
```js import { closeDb, openDb, getRoutes } from 'gtfs'; import { readFile } from 'fs/promises'; import path from 'node:path';
const config = JSON.parse( await readFile(path.join(import.meta.dirname, 'config.json'), 'utf8') );
const db = openDb(config); const routes = getRoutes( {}, // No query filters ['routeid', 'routeshortname', 'routecolor'], // Only return these fields [['routeshortname', 'ASC']], // Sort by this field and direction { db: db }, // Options for the query. Can specify which database to use if more than one are open );
closeDb(db); ```
To get a list of all trip_ids for a specific route:
```js import { closeDb, openDb, getTrips } from 'gtfs'; import { readFile } from 'fs/promises'; import path from 'node:path';
const config = JSON.parse( await readFile(path.join(import.meta.dirname, 'config.json'), 'utf8') );
const db = openDb(config); const trips = getTrips( { routeid: '123', }, ['tripid'], );
closeDb(db); ```
To get a few stops by specific stop_ids:
```js import { closeDb, openDb, getStops } from 'gtfs'; import { readFile } from 'fs/promises'; import path from 'node:path';
const config = JSON.parse( await readFile(path.join(import.meta.dirname, 'config.json'), 'utf8') ); const db = openDb(config); const stops = getStops( { stop_id: [ '123', '234' '345' ] } );
closeDb(db); ```
Static GTFS Files
getAgencies(query, fields, sortBy, options)
Returns an array of agencies that match query parameters. Details on agency.txt
```js import { getAgencies } from 'gtfs';
// Get all agencies const agencies = getAgencies();
// Get a specific agency const agencies = getAgencies({ agency_id: 'caltrain', }); ```
getAreas(query, fields, sortBy, options)
Returns an array of areas that match query parameters. Details on areas.txt
```js import { getAreas } from 'gtfs';
// Get all areas const areas = getAreas();
// Get a specific area const areas = getAreas({ area_id: 'area1', }); ```
getAttributions(query, fields, sortBy, options)
Returns an array of attributions that match query parameters. Details on attributions.txt
```js import { getAttributions } from 'gtfs';
// Get all attributions const attributions = getAttributions();
// Get a specific attribution const attributions = getAttributions({ attribution_id: '123', }); ```
getBookingRules(query, fields, sortBy, options)
Returns an array of booking rules that match query parameters. Details on booking_rules.txt
```js import { getBookingRules } from 'gtfs';
// Get all booking rules const bookingRules = getBookingRules();
// Get a specific booking rule const bookingRules = getBookingRules({ bookingruleid: '1234', }); ```
getRoutes(query, fields, sortBy, options)
Returns an array of routes that match query parameters. Details on routes.txt
```js import { getRoutes } from 'gtfs';
// Get all routes, sorted by routeshortname const routes = getRoutes({}, [], [['routeshortname', 'ASC']]);
// Get a specific route const routes = getRoutes({ route_id: 'Lo-16APR', });
/*
* getRoutes allows passing a stop_id as part of the query. This will
* query stoptimes and trips to find all routes that serve that stop_id.
*/
const routes = getRoutes(
{
stopid: '70011',
},
[],
[['stopname', 'ASC']],
);
```
getStops(query, fields, sortBy, options)
Returns an array of stops that match query parameters. Details on stops.txt
```js import { getStops } from 'gtfs';
// Get all stops const stops = getStops();
// Get a specific stop by stopid const stops = getStops({ stopid: '70011', });
/*
* getStops allows passing a route_id in the query and it will
* query trips and stoptimes to find all stops served by that route_id.
*/
const stops = getStops({
route_id: 'Lo-16APR',
});
/*
* getStops allows passing a trip_id in the query and it will query
* stoptimes to find all stops on that trip_id.
*/
const stops = getStops({
trip_id: '37a',
});
/*
* getStops allows passing a shape_id in the query and it will query
* trips and stoptimes to find all stops that use that shape_id.
*/
const stops = getStops({
shapeid: 'calsf_tam',
});
/*
* getStops allows passing a bounding_box_side_m value in the options
* parameter object. If included, it will return all stops within a square
* bounding box around the stop_lat and stop_lon parameters passed to
* the query using the size in meters specified.
*/
const stops = getStops(
{
stoplat: 37.58764,
stoplon: -122.36265,
},
[],
[],
{
boundingboxside_m: 1000
}
);
```
getStopsAsGeoJSON(query, options)
Returns geoJSON object of stops that match query parameters. Stops will include all properties of each stop from stops.txt and stop_attributes.txt if present. All valid queries for getStops() work for getStopsAsGeoJSON().
```js import { getStopsAsGeoJSON } from 'gtfs';
// Get all stops for an agency as geoJSON const stopsGeojson = getStopsAsGeoJSON();
// Get all stops for a specific route as geoJSON const stopsGeojson = getStopsAsGeoJSON({ route_id: 'Lo-16APR', });
// Get all stops within a 1000m bounding box as geoJSON const stopsGeojson = getStopsAsGeoJSON( { stoplat: 37.58764, stoplon: -122.36265, }, { boundingboxside_m: 1000, }, ); ```
getStoptimes(query, fields, sortBy, options)
Returns an array of stop_times that match query parameters. Details on stop_times.txt
```js import { getStoptimes } from 'gtfs';
// Get all stoptimes const stoptimes = getStoptimes();
// Get all stoptimes for a specific stop const stoptimes = getStoptimes({ stop_id: '70011', });
// Get all stoptimes for a specific trip, sorted by stopsequence const stoptimes = getStoptimes( { tripid: '37a', }, [], [['stop_sequence', 'ASC']], );
// Get all stoptimes for a specific stop and serviceid const stoptimes = getStoptimes({ stopid: '70011', service_id: 'CT-16APR-Caltrain-Weekday-01', });
/*
* getStoptimes allows passing a date in the query to return only
* stoptimes for a specific service date.
*/
const stoptimes = getStoptimes({
stop_id: '70011',
date: 20160704
});
/*
* getStoptimes allows passing a start_time and/or and
* end_time in the query to return only stoptimes after
* starttime and before endtime. This can be combined with the
* date parameter to get upcoming stoptimes.
*/
const stoptimes = getStoptimes({
stopid: '70011',
date: 20160704,
starttime: '11:30:00',
end_time: '11:45:00'
});
/*
* ⚠️ By default, when using the date parameter in a query, it will NOT
* include stoptimes for trips whose service date is the previous day but
* whose stoptimes occur after midnight (i.e., times greater than 24:00:00
* in GTFS, such as 25:15:00 for 1:15 AM the next day).
*
* To retrieve all stoptimes for a calendar date including those from
* trips assigned to the previous service date but occurring after
* midnight:
* 1. Call getStoptimes with the target date:
* 2. Call getStoptimes with the previous date and start_time: '24:00:00':
* 3. Combine both results for a complete set of stoptimes for July 5th.
*
* This approach ensures you include:
* - All stoptimes for trips whose service date is July 4th but whose
* stoptimes occur after midnight (i.e., in the early hours of July 5th)
* - All stoptimes for trips whose service date is July 5th (which can
* include trips with stoptimes that occur on July 6th after midnight )
*/
const stoptimesToday = getStoptimes({ date: 20240705 });
const stoptimesYesterdayAfterMidnight = getStoptimes({ date: 20240704, start_time: '24:00:00' })
const mergedStoptimes = [
...stoptimesToday,
...stoptimesYesterdayAfterMidnight
];
```
getTrips(query, fields, sortBy, options)
Returns an array of trips that match query parameters. Details on trips.txt
```js import { getTrips } from 'gtfs';
// Get all trips const trips = getTrips();
// Get trips for a specific route and direction const trips = getTrips({ routeid: 'Lo-16APR', directionid: 0 });
// Get trips for direction '' or null const trips = getTrips({ routeid: 'Lo-16APR', directionid: null });
// Get trips for a specific route and direction limited by a serviceid const trips = getTrips({ routeid: 'Lo-16APR', directionid: 0, serviceid: ' });
/*
* getTrips allows passing a date in the query to return only trips
* for a specific service date.
*/
const trips = getTrips({
route_id: 'Bu-16APR',
date: 20170416
});
```
getShapes(query, fields, sortBy, options)
Returns an array of shapes that match query parameters. Details on shapes.txt
```js import { getShapes } from 'gtfs';
// Get all shapes for an agency const shapes = getShapes();
/*
* getShapes allows passing a route_id in the query and it will query
* trips to find all shapes served by that route_id.
*/
const shapes = getShapes({
route_id: 'Lo-16APR',
});
/*
* getShapes allows passing a trip_id in the query and it will query
* trips to find all shapes served by that trip_id.
*/
const shapes = getShapes({
trip_id: '37a',
});
/*
* getShapes allows passing a service_id in the query and it will query
* trips to find all shapes served by that service_id.
*/
const shapes = getShapes({
service_id: 'CT-16APR-Caltrain-Sunday-02',
});
```
getShapesAsGeoJSON(query, options)
Returns a geoJSON object of shapes that match query parameters. Shapes will include all properties of each route from routes.txt and route_attributes.txt if present. All valid queries for getShapes() work for getShapesAsGeoJSON().
```js import { getShapesAsGeoJSON } from 'gtfs';
// Get geoJSON of all routes in an agency const shapesGeojson = getShapesAsGeoJSON();
// Get geoJSON of shapes for a specific route const shapesGeojson = getShapesAsGeoJSON({ route_id: 'Lo-16APR', });
// Get geoJSON of shapes for a specific trip const shapesGeojson = getShapesAsGeoJSON({ trip_id: '37a', });
// Get geoJSON of shapes for a specific service_id
const shapesGeojson = getShapesAsGeoJSON({
service_id: 'CT-16APR-Caltrain-Sunday-02',
});
// Get geoJSON of shapes for a specific shape_id
const shapesGeojson = getShapesAsGeoJSON({
shapeid: 'calsf_tam',
});
```
getCalendars(query, fields, sortBy, options)
Returns an array of calendars that match query parameters. Details on calendar.txt
```js import { getCalendars } from 'gtfs';
// Get all calendars for an agency const calendars = getCalendars();
// Get calendars for a specific service_id
const calendars = getCalendars({
service_id: 'CT-16APR-Caltrain-Sunday-02',
});
```
getServiceIdsByDate(date, options)
Returns an array of serviceids for a specified date. It queries both calendars.txt and calendardates.txt to calculate which service_ids are effective for that date, including exceptions. The date field is an integer in yyyymmdd format.
```js import { getServiceIdsByDate } from 'gtfs';
// Get service_ids for a specifc date const serviceIds = getServiceIdsByDate(20240704); ```
getCalendarDates(query, fields, sortBy, options)
Returns an array of calendar_dates that match query parameters. Details on calendar_dates.txt
```js import { getCalendarDates } from 'gtfs';
// Get all calendar_dates for an agency const calendarDates = getCalendarDates();
// Get calendardates for a specific `serviceid
const calendarDates = getCalendarDates({
service_id: 'CT-16APR-Caltrain-Sunday-02',
});
``
getFareAttributes(query, fields, sortBy, options)
Returns an array of fare_attributes that match query parameters. Details on fare_attributes.txt
```js import { getFareAttributes } from 'gtfs';
// Get all fare_attributes for an agency
const fareAttributes = getFareAttributes();
// Get fare_attributes for a specific fare_id
const fareAttributes = getFareAttributes({
fare_id: '123',
});
```
getFareLegRules(query, fields, sortBy, options)
Returns an array of farelegrules that match query parameters. Details on farelegrules.txt
```js import { getFareLegRules } from 'gtfs';
// Get all fare leg rules const fareLegRules = getFareLegRules();
// Get fare leg rules for a specific fare product const fareLegRules = getFareLegRules({ fareproductid: 'product1', }); ```
getFareMedia(query, fields, sortBy, options)
Returns an array of fare_media that match query parameters. Details on fare_media.txt
```js import { getFareMedia } from 'gtfs';
// Get all fare media const getFareMedia = getFareMedia();
// Get a specific fare media const fareMedia = getFareMedia({ faremediaid: 'media1', }); ```
getFareProducts(query, fields, sortBy, options)
Returns an array of fare_products that match query parameters. Details on fare_products.txt
```js import { getFareProducts } from 'gtfs';
// Get all fare products const fareProducts = getFareProducts();
// Get a specific fare product const fareProducts = getFareProducts({ fareproductid: 'product1', }); ```
getFareRules(query, fields, sortBy, options)
Returns an array of fare_rules that match query parameters. Details on fare_rules.txt
```js import { getFareRules } from 'gtfs';
// Get all fare_rules for an agency
const fareRules = getFareRules();
// Get farerules for a specific route const fareRules = getFareRules({ routeid: 'Lo-16APR', }); ```
getFareTransferRules(query, fields, sortBy, options)
Returns an array of faretransferrules that match query parameters. Details on faretransferrules.txt
```js import { getFareTransferRules } from 'gtfs';
// Get all fare transfer rules const fareTransferRules = getFareTransferRules();
// Get a all fare transfer rules for a specific fare product const fareTransferRules = getFareTransferRules({ fareproductid: 'product1', }); ```
getFeedInfo(query, fields, sortBy, options)
Returns an array of feed_info that match query parameters. Details on feed_info.txt
```js import { getFeedInfo } from 'gtfs';
// Get feed_info const feedInfo = getFeedInfo(); ```
getFrequencies(query, fields, sortBy, options)
Returns an array of frequencies that match query parameters. Details on frequencies.txt
```js import { getFrequencies } from 'gtfs';
// Get all frequencies const frequencies = getFrequencies();
// Get frequencies for a specific trip const frequencies = getFrequencies({ trip_id: '1234', }); ```
getLevels(query, fields, sortBy, options)
Returns an array of levels that match query parameters. Details on levels.txt
```js import { getLevels } from 'gtfs';
// Get all levels const levels = getLevels(); ```
getLocationGroups(query, fields, sortBy, options)
Returns an array of location groups that match query parameters. Details on location_groups.txt
```js import { getLocationGroups } from 'gtfs';
// Get all location groups const locationGroups = getLocationGroups();
// Get a specific location group const locationGroups = getLocationGroups({ locationgroupid: '1234', }); ```
getLocationGroupStops(query, fields, sortBy, options)
Returns an array of location group stops that match query parameters. Details on locationgroupstops.txt
```js import { getLocationGroupStops } from 'gtfs';
// Get all location group stops const locationGroupStops = getLocationGroupStops();
// Get location group stops for a specific stopid const locationGroups = getLocationGroupStops({ stopid: '1234', }); ```
getLocations(query, fields, sortBy, options)
Returns an array of locations that match query parameters. Each location is text that can be parsed into a geojson object. Details on locations.geojson
```js import { getLocations } from 'gtfs';
// Get all locations const locations = getLocations(); ```
getPathways(query, fields, sortBy, options)
Returns an array of pathways that match query parameters. Details on pathways.txt
```js import { getPathways } from 'gtfs';
// Get all pathways const pathways = getPathways(); ```
getTimeframes(query, fields, sortBy, options)
Returns an array of timeframes that match query parameters. Details on timeframes.txt
```js import { getTimeframes } from 'gtfs';
// Get all timeframes const timeframes = getTimeframes(); ```
getTransfers(query, fields, sortBy, options)
Returns an array of transfers that match query parameters. Details on transfers.txt
```js import { getTransfers } from 'gtfs';
// Get all transfers const transfers = getTransfers();
// Get transfers for a specific stop const transfers = getTransfers({ fromstopid: '1234', }); ```
getTranslations(query, fields, sortBy, options)
Returns an array of translations that match query parameters. Details on translations.txt
```js import { getTranslations } from 'gtfs';
// Get all translations const translations = getTranslations(); ```
getStopAreas(query, fields, sortBy, options)
Returns an array of stop_areas that match query parameters. Details on stop_areas.txt
```js import { getStopAreas } from 'gtfs';
// Get all stop areas const stopAreas = getStopAreas(); ```
getNetworks(query, fields, sortBy, options)
Returns an array of networks that match query parameters. Details on networks.txt
```js import { getNetworks } from 'gtfs';
// Get all networks const networks = getNetworks();
// Get networks for a specific networkid const networks = getNetworks({ networkid: '1234', }); ```
getRouteNetworks(query, fields, sortBy, options)
Returns an array of route_networks that match query parameters. Details on route_networks.txt
```js import { getRouteNetworks } from 'gtfs';
// Get all route_networks const routeNetworks = getRouteNetworks();
// Get routenetworks for a specific networkid const routeNetworks = getRouteNetworks({ network_id: '1234', }); ```
GTFS-Timetables files
getTimetables(query, fields, sortBy, options)
Returns an array of timetables that match query parameters. This is for the non-standard timetables.txt file used in GTFS-to-HTML. Details on timetables.txt
```js import { getTimetables } from 'gtfs';
// Get all timetables for an agency const timetables = getTimetables();
// Get a specific timetable const timetables = getTimetables({ timetable_id: '1', }); ```
getTimetableStopOrders(query, fields, sortBy, options)
Returns an array of timetablestoporders that match query parameters. This is for the non-standard timetable_stop_order.txt file used in GTFS-to-HTML. Details on timetablestoporder.txt
```js import { getTimetableStopOrders } from 'gtfs';
// Get all timetablestoporders const timetableStopOrders = getTimetableStopOrders();
// Get timetablestoporders for a specific timetable const timetableStopOrders = getTimetableStopOrders({ timetable_id: '1', }); ```
getTimetablePages(query, fields, sortBy, options)
Returns an array of timetablepages that match query parameters. This is for the non-standard `timetablepages.txt` file used in GTFS-to-HTML. Details on timetable_pages.txt
```js import { getTimetablePages } from 'gtfs';
// Get all timetable_pages for an agency const timetablePages = getTimetablePages();
// Get a specific timetablepage const timetablePages = getTimetablePages({ timetablepage_id: '2', }); ```
getTimetableNotes(query, fields, sortBy, options)
Returns an array of timetablenotes that match query parameters. This is for the non-standard `timetablenotes.txt` file used in GTFS-to-HTML. Details on timetable_notes.txt
```js import { getTimetableNotes } from 'gtfs';
// Get all timetable_notes for an agency const timetableNotes = getTimetableNotes();
// Get a specific timetablenote const timetableNotes = getTimetableNotes({ noteid: '1', }); ```
getTimetableNotesReferences(query, fields, sortBy, options)
Returns an array of timetablenotesreferences that match query parameters. This is for the non-standard timetable_notes_references.txt file used in GTFS-to-HTML. Details on timetablenotesreferences.txt
```js import { getTimetableNotesReferences } from 'gtfs';
// Get all timetablenotesreferences for an agency const timetableNotesReferences = getTimetableNotesReferences();
// Get all timetablenotesreferences for a specific timetable const timetableNotesReferences = getTimetableNotesReferences({ timetable_id: '4', }); ```
GTFS-Realtime
In order to use GTFS-Realtime query methods, you must first run the GTFS-Realtime update script or function to pull data into your database.
getServiceAlerts(query, fields, sortBy, options)
Returns an array of GTFS Realtime service alerts that match query parameters. Note that this does not refresh the data from GTFS-Realtime feeds, it only fetches what is stored in the database. In order to fetch the latest service alerts from GTFS-Realtime feeds and store in your database, use the GTFS-Realtime update script or function.
More details on Service Alerts
```js import { getServiceAlerts } from 'gtfs';
// Get service alerts const serviceAlerts = getServiceAlerts(); ```
getTripUpdates(query, fields, sortBy, options)
Returns an array of GTFS Realtime trip updates that match query parameters. Note that this does not refresh the data from GTFS-Realtime feeds, it only fetches what is stored in the database. In order to fetch the latest trip updates from GTFS-Realtime feeds and store in your database, use the GTFS-Realtime update script or function.
```js import { getTripUpdates } from 'gtfs';
// Get all trip updates const tripUpdates = getTripUpdates(); ```
getStopTimeUpdates(query, fields, sortBy, options)
Returns an array of GTFS Realtime stop time updates that match query parameters. Note that this does not refresh the data from GTFS-Realtime feeds, it only fetches what is stored in the database. In order to fetch the latest stop time updates from GTFS-Realtime feeds and store in your database, use the GTFS-Realtime update script or function.
More details on Stop Time Updates
```js import { getStopTimeUpdates } from 'gtfs';
// Get all stop time updates const stopTimeUpdates = getStopTimeUpdates(); ```
getVehiclePositions(query, fields, sortBy, options)
Returns an array of GTFS Realtime vehicle positions that match query parameters. Note that this does not refresh the data from GTFS-Realtime feeds, it only fetches what is stored in the database. In order to fetch the latest vehicle positions from GTFS-Realtime feeds and store in your database, use the GTFS-Realtime update script or function.
More details on Vehicle Positions
```js import { getVehiclePositions } from 'gtfs';
// Get all vehicle position data const vehiclePositions = getVehiclePositions(); ```
GTFS+ Files
getCalendarAttributes(query, fields, sortBy, options)
Returns an array of calendar_attributes that match query parameters.
```js import { getCalendarAttributes } from 'gtfs';
// Get all calendar attributes const calendarAttributes = getCalendarAttributes();
// Get calendar attributes for specific service const calendarAttributes = getCalendarAttributes({ service_id: '1234', }); ```
getDirections(query, fields, sortBy, options)
Returns an array of directions that match query parameters.
```js import { getDirections } from 'gtfs';
// Get all directions const directions = getDirections();
// Get directions for a specific route const directions = getDirections({ route_id: '1234', });
// Get directions for a specific route and direction const directions = getDirections({ routeid: '1234', directionid: 1, }); ```
getRouteAttributes(query, fields, sortBy, options)
Returns an array of route_attributes that match query parameters.
```js import { getRouteAttributes } from 'gtfs';
// Get all route attributes const routeAttributes = getRouteAttributes();
// Get route attributes for specific route const routeAttributes = getRouteAttributes({ route_id: '1234', }); ```
getStopAttributes(query, fields, sortBy, options)
Returns an array of stop_attributes that match query parameters.
```js import { getStopAttributes } from 'gtfs';
// Get all stop attributes const stopAttributes = getStopAttributes();
// Get stop attributes for specific stop const stopAttributes = getStopAttributes({ stop_id: '1234', }); ```
GTFS-Ride Files
See full documentation of GTFS Ride.
getBoardAlights(query, fields, sortBy, options)
Returns an array of board_alight that match query parameters. Details on board_alight.txt
```js import { getBoardAlights } from 'gtfs';
// Get all board_alight const boardAlights = getBoardAlights();
// Get boardalight for a specific trip const boardAlights = getBoardAlights({ tripid: '123', }); ```
getRideFeedInfo(query, fields, sortBy, options)
Returns an array of ridefeedinfo that match query parameters. Details on ridefeedinfo.txt
```js import { getRideFeedInfo } from 'gtfs';
// Get all ridefeedinfo const rideFeedInfos = getRideFeedInfo(); ```
getRiderTrips(query, fields, sortBy, options)
Returns an array of rider_trip that match query parameters. Details on rider_trip.txt
```js import { getRiderTrips } from 'gtfs';
// Get all rider_trip const riderTrips = getRiderTrips();
// Get ridertrip for a specific trip const riderTrips = getRiderTrips({ tripid: '123', }); ```
getRidership(query, fields, sortBy, options)
Returns an array of ridership that match query parameters. Details on ridership.txt
```js import { getRidership } from 'gtfs';
// Get all ridership const riderships = getRidership();
// Get ridership for a specific route const riderships = getRidership({ route_id: '123', }); ```
getTripCapacities(query, fields, sortBy, options)
Returns an array of trip_capacity that match query parameters. Details on trip_capacity.txt
```js import { getTripCapacities } from 'gtfs';
// Get all trip_capacity const tripCapacities = getTripCapacities();
// Get tripcapacity for a specific trip const tripCapacities = getTripCapacities({ tripid: '123', }); ```
Operational Data Standard (ODS) Files
getDeadheads(query, fields, sortBy, options)
Returns an array of deadheads that match query parameters. Details on deadheads.txt
```js import { getDeadheads } from 'gtfs';
// Get all deadheads const deadheads = getDeadheads();
// Get deadheads for a specific block const deadheads = getDeadheads({ block_id: '123', }); ```
getDeadheadTimes(query, fields, sortBy, options)
Returns an array of deadhead_times that match query parameters. Details on deadhead_times.txt
```js import { getDeadheadTimes } from 'gtfs';
// Get all deadhead_times const deadheadTimes = getDeadheadTimes();
// Get deadheadtimes for a specific deadhead const deadheadTimes = getDeadheadTimes({ deadheadid: '123', }); ```
getOpsLocations(query, fields, sortBy, options)
Returns an array of ops_locations that match query parameters. Details on ops_locations.txt
```js import { getOpsLocations } from 'gtfs';
// Get all ops_locations const opsLocations = getOpsLocations();
// Get a specific opslocations const opsLocations = getOpsLocations({ opslocation_id: '123', }); ```
getRunsPieces(query, fields, sortBy, options)
Returns an array of runs_pieces that match query parameters. Details on runs_pieces.txt
```js import { getRunsPieces } from 'gtfs';
// Get all runs_pieces const runsPieces = getRunsPieces(); ```
getRunEvents(query, fields, sortBy, options)
Returns an array of run_events that match query parameters. Details on run_events.txt
```js import { getRunEvents } from 'gtfs';
// Get all run_events const runEvents = runEvents();
// Get a runevents for a specific piece const runEvents = runEvents({ pieceid: '123', }); ```
Other Non-standard GTFS Files
getTripsDatedVehicleJourneys(query, fields, sortBy, options)
Returns an array of tripsdatedvehiclejourney that match query parameters. This is for the non-standard `tripsdatedvehiclejourney.txt` file. Details on tripsdatedvehicle_journey.txt
```js import { getTripsDatedVehicleJourneys } from 'gtfs';
// Get all tripsdatedvehicle_journey const tripsDatedVehicleJourneys = getTripsDatedVehicleJourneys(); ```
Advanced Query Methods
advancedQuery(table, advancedQueryOptions)
Queries the database with support for table joins and custom tables and returns an array of data.
```js import { advancedQuery } from 'gtfs';
// Example advancedQuery joining stoptimes with trips.
const advancedQueryOptions = {
query: {
'stoptimes.tripid': tripId,
},
fields: ['stoptimes.tripid', 'arrivaltime'],
join: [
{
type: 'INNER',
table: 'trips',
on: 'stoptimes.tripid=trips.trip_id',
},
],
};
const stoptimes = advancedQuery('stop_times', advancedQueryOptions); ```
Raw SQLite Query
Use the openDb function to get the db object, and then use any query method from better-sqlite3 to query GTFS data.
```js import { openDb } from 'gtfs'; const db = openDb(config);
// Get a specific trip const trip = db.prepare('SELECT * FROM trips WHERE trip_id = ?').get('123');
// Get all stops const stops = db.prepare('SELECT * from stops').all();
// Get all calendarids for specific date const calendarIds = db .prepare( 'SELECT serviceid from calendar WHERE startdate <= $date AND enddate >= $date' ) .all({ date: 20150101 });
// Find all stops for routeid=18 by joining tables const stopIds = db .prepare( 'SELECT DISTINCT stops.stopid from stops INNER JOIN stoptimes ON stops.stopid = stoptimes.stopid INNER JOIN trips on trips.tripid = stoptimes.tripid WHERE trips.routeid = ?' ) .all('18');
// Execute raw SQL const sql = "DELETE FROM trips where trip_id = '329'"; db.exec(sql); ```
Contributing
Pull requests are welcome, as is feedback and reporting issues.
Tests
To run tests:
npm test
To run a specific test:
npm test -- get-stoptimes
Owner
- Name: BlinkTag
- Login: BlinkTagInc
- Kind: organization
- Email: info@blinktag.com
- Location: San Francisco, CA
- Website: https://blinktag.com
- Repositories: 33
- Profile: https://github.com/BlinkTagInc
GitHub Events
Total
- Create event: 21
- Issues event: 19
- Release event: 23
- Watch event: 28
- Delete event: 1
- Issue comment event: 42
- Push event: 37
- Pull request review event: 1
- Pull request review comment event: 1
- Pull request event: 12
- Fork event: 7
Last Year
- Create event: 21
- Issues event: 19
- Release event: 23
- Watch event: 28
- Delete event: 1
- Issue comment event: 42
- Push event: 37
- Pull request review event: 1
- Pull request review comment event: 1
- Pull request event: 12
- Fork event: 7
Committers
Last synced: 6 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Brendan Nee | b****n@b****m | 807 |
| Hafiz Ismail | s****m@g****m | 15 |
| Alessio Bogon | y****x@g****m | 8 |
| leannelis | l****3 | 5 |
| j33f | j****f@m****r | 5 |
| pravdomil | i****o@p****m | 4 |
| Ivan Yulaev | i****n@y****m | 4 |
| Steven Prins | g****t@s****m | 3 |
| David Aghassi | d****i@g****m | 3 |
| wdalrymple | m****e@y****m | 2 |
| Sam Hashemi | s****m@s****m | 2 |
| Pawajoro | 4****o | 2 |
| Natalie Perna | n****a@g****m | 2 |
| Matt | 6****a | 2 |
| Jacob Childress | j****c@g****m | 2 |
| Ethan | e****n@u****) | 2 |
| travis4all | t****l@d****z | 2 |
| Brendan Nee | b****n@a****m | 1 |
| Daniel Gerlach | d****h@m****m | 1 |
| root | r****t@m****r | 1 |
| andreas beuge | a****e@d****m | 1 |
| Sergio Behrends | s****s@m****m | 1 |
| Oskari Grönroos | o****s@g****m | 1 |
| Heath Shurtleff | h****f@o****m | 1 |
| Robin Chou | c****n@g****m | 1 |
| Sergio Behrends | s****o@b****r | 1 |
| b-e-b-o-o | 7****o | 1 |
| thelleboid-tsr | t****d@t****m | 1 |
| 0xflotus | 0****s@g****m | 1 |
| Rajan | r****2@h****m | 1 |
| and 27 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 111
- Total pull requests: 95
- Average time to close issues: 3 months
- Average time to close pull requests: 26 days
- Total issue authors: 73
- Total pull request authors: 57
- Average comments per issue: 3.68
- Average comments per pull request: 1.13
- Merged pull requests: 71
- Bot issues: 0
- Bot pull requests: 7
Past Year
- Issues: 20
- Pull requests: 16
- Average time to close issues: about 1 month
- Average time to close pull requests: 4 days
- Issue authors: 12
- Pull request authors: 8
- Average comments per issue: 1.85
- Average comments per pull request: 1.13
- Merged pull requests: 14
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- nukeador (9)
- ghost (5)
- laem (5)
- Abramovick (5)
- youtux (4)
- brodyFlannigan (4)
- stephenmcbride (2)
- wdalrymple (2)
- groenroos (2)
- melisoner2006 (2)
- magnuspaaske (2)
- ibaiway (2)
- danydacosta (2)
- david-abell (2)
- rszczypka (2)
Pull Request Authors
- youtux (8)
- dependabot[bot] (7)
- anbraten (4)
- mattkinnia (4)
- pravdomil (3)
- laem (3)
- CodeFusion (2)
- j33f (2)
- b-e-b-o-o (2)
- sudonatalie (2)
- emma-k-alexandra (2)
- magnuspaaske (2)
- brendannee (2)
- DSorlov (2)
- sogko (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- npm 3,912 last-month
- Total docker downloads: 16
-
Total dependent packages: 11
(may contain duplicates) -
Total dependent repositories: 43
(may contain duplicates) - Total versions: 247
- Total maintainers: 2
npmjs.org: gtfs
Import GTFS transit data into SQLite and query routes, stops, times, fares and more
- Homepage: https://github.com/blinktaginc/node-gtfs#readme
- License: MIT
-
Latest release: 4.18.0
published 6 months ago
Rankings
Maintainers (1)
npmjs.org: @swiftstar/gtfs
Import GTFS transit data into mongodb and query routes, stops, times, fares and more
- Homepage: https://github.com/blinktaginc/node-gtfs#readme
- License: MIT
-
Latest release: 1.1.4
published over 8 years ago
Rankings
Maintainers (1)
Dependencies
- 475 dependencies
- dtslint ^4.2.1 development
- eslint ^8.20.0 development
- eslint-config-prettier ^8.5.0 development
- eslint-config-xo ^0.41.0 development
- husky ^8.0.1 development
- mocha ^10.0.0 development
- prettier ^2.7.1 development
- pretty-quick ^3.1.3 development
- should ^13.2.3 development
- @turf/helpers ^6.5.0
- csv-parse ^5.3.0
- csv-stringify ^6.2.0
- gtfs-realtime-bindings ^0.0.6
- lodash-es ^4.17.21
- long ^5.2.0
- node-fetch ^3.2.9
- pluralize ^8.0.0
- pretty-error ^4.0.0
- promise-map-series ^0.3.0
- recursive-copy ^2.0.14
- sanitize-filename ^1.6.3
- sqlite ^4.1.2
- sqlite3 ^5.0.10
- sqlstring-sqlite ^0.1.1
- strip-bom-stream ^5.0.0
- tmp-promise ^3.0.3
- untildify ^4.0.0
- unzipper ^0.10.11
- yargs ^17.5.1
- yoctocolors ^1.0.0
- actions/checkout v1 composite
- actions/setup-node v1 composite