An imaginary GTFS data set used for testing.
npm install sample-gtfs-feedAn imaginary GTFS Schedule dataset used for testing.

!ISC-licensed


``shell`
npm install sample-gtfs-feed
Using following GTFS tables, sample-gtfs-feed forms a GTFS feed for a simple fictional transit network:
- agency
- stops
- routes
- trips
- stop_times
- calendar
- calendar_dates
- frequencies
- transfers
- pathways
- levels
- feed_info
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:
`js`
fs.readFileSync(require.resolve('sample-gtfs-feed/gtfs/agency.txt'), {
encoding: 'utf8'
})
To get the path from the command line, use node -p:
`sh`
cat $(node -p 'require.resolve("sample-gtfs-feed/gtfs/agency.txt")')
`csv`
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.
`shell`
cat $(node -p 'require.resolve("sample-gtfs-feed/json/agency.json")')
`js`
require('sample-gtfs-feed/agency')
`js`
[{
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'
}]
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.