0.11.2 • Published 2 years ago

sample-gtfs-feed v0.11.2

Weekly downloads
13
License
ISC
Repository
github
Last release
2 years ago

sample-gtfs-feed

An imaginary GTFS data set used for testing.

npm version ISC-licensed support me via GitHub Sponsors chat with me on Twitter

Installing

npm install sample-gtfs-feed

Usage

Using following GTFS tables, sample-gtfs-feed forms a GTFS feed for a simple fictional transit network:

plain CSV files

The sample-gtfs-feed npm package contains plain CSV files, which you can process like any GTFS feed.

To get the path to one of these files in Node.js, use require.resolve:

fs.readFileSync(require.resolve('sample-gtfs-feed/gtfs/agency.txt'), {
	encoding: 'utf8'
})

To get the path from the command line, use node -p:

cat $(node -p 'require.resolve("sample-gtfs-feed/gtfs/agency.txt")')
agency_id,agency_name,agency_url,agency_timezone,agency_lang,agency_phone,agency_fare_url,agency_email
FTA,Full Transit Agency,https://fta.example.org/,Europe/Warsaw,de,+49 123 456 789 0,https://fta.example.org/fares.html,contact@fta.example.org
MTA,Minimal Transit Agency,https://mta.example.org/,Europe/Berlin,,,,

There's also a .zip file of these plain CSV files available as sample-gtfs-feed/gtfs.zip.

JSON files

cat $(node -p 'require.resolve("sample-gtfs-feed/json/agency.json")')

JS objects

require('sample-gtfs-feed/agency')
[{
	agency_id: 'FTA',
	agency_name: 'Full Transit Agency',
	agency_url: 'https://fta.example.org/',
	agency_timezone: 'Europe/Warsaw',
	agency_lang: 'de',
	agency_phone: '+49 123 456 789 0',
	agency_fare_url: 'https://fta.example.org/fares.html',
	agency_email: 'contact@fta.example.org'
}, {
	agency_id: 'MTA',
	agency_name: 'Minimal Transit Agency',
	agency_url: 'https://mta.example.org/',
	agency_timezone: 'Europe/Berlin'
}]

Contributing

If you have a question or have difficulties using sample-gtfs-feed, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.

0.11.2

2 years ago

0.11.0

2 years ago

0.11.1

2 years ago

0.10.1

3 years ago

0.10.2

3 years ago

0.10.3

3 years ago

0.10.0

3 years ago

0.9.0

3 years ago

0.8.0

3 years ago

0.7.1

3 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.5.1

4 years ago

0.4.0

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago