npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

gtfs-to-html

v2.12.2

Published

Build human readable transit timetables as HTML, PDF or CSV from GTFS

Downloads

705

Readme

See gtfstohtml.com for full documentation.

Most transit agencies have schedule data in GTFS format but need to show each route's schedule to users on a website. GTFS-to-HTML automates the process of creating nicely formatted HTML timetables for inclusion on a transit agency website. This makes it easy to keep timetables up to date and accurate when schedule changes happen and reduces the likelihood of errors.

Features

Configurable and customizable

gtfs-to-html has many options that configure how timetables are presented. It also allows using a completely custom template which makes it easy to build chunks of HTML that will fit perfectly into any website using any HTML structure and classes that you'd like. Or, create printable PDF versions or CSV exports of timetables using the outputFormat config option.

Accessibility for all

gtfs-to-html properly formats timetables to ensure they are screen-reader accessible and WCAG 2.0 compliant.

Mobile responsiveness built in

Built-in styling makes gtfs-to-html timetables ready to size and scroll easily on mobile phones and tablets.

Schedule changes? A cinch.

By generating future timetables and including dates in table metadata, your timetables can appear in advance of a schedule change, and you can validate that your new timetables and GTFS are correct.

Auto-generated maps

gtfs-to-html can also generate a map for each route that can be included with the schedule page. The map shows all stops for the route and lists all routes that serve each stop. Maps can also show realtime vehicle locations and predicted arrival times from GTFS-realtime data.

Note: If you only want maps of GTFS data, use the gtfs-to-geojson package instead and skip making timetables entirely. If offers many different formats of GeoJSON for routes and stops.

gtfs-to-html uses the node-gtfs library to handle importing and querying GTFS data.

GTFS-to-HTML on the web

You can now use gtfs-to-html without actually downloading any code or doing any configuration. run.gtfstohtml.com provides a web based interface for finding GTFS feeds for agencies, setting configuration and then generates a previewable and downloadable set of timetables.

Current Usage

Many transit agencies use gtfs-to-html to generate the schedule pages used on their websites, including:

| Agency | Location | | ----------------------------------------------------------------------------- | ----------------------------------- | | Basin Transit | Morongo Basin, California | | Brockton Area Transit Authority | Brockton, Massachusetts | | Cape Ann Transportation Authority | Gloucester, Massachusetts | | Capital Transit | Juneau, Alaska | | Central Transit | Ellensburg, Washington | | Citibus | Lubbock, Texas | | Commute.org | San Mateo County, California | | County Connection | Contra Costa County, California | | El Dorado Transit | El Dorado County, California | | Greater Attleboro-Taunton Regional Transit Authority | Attleboro-Taunton, Massachusetts | | Humboldt Transit Authority | Humboldt County, California | | Jefferson Parish Transit | Jefferson Parish, Louisiana | | Kings Area Rural Transit (KART) | Kings County, California | | Lowell Regional Transit Authority | Lowell, Massachusetts | | Madera County Connection | Madera County, California | | Marin Transit | Marin County, California | | Morongo Basin Transit Authority | Morongo Basin, California | | Mountain Transit | Big Bear Valley, California | | Mountain View Community Shuttle | Mountain View, California | | MVgo | Mountain View, California | | Petaluma Transit | Petaluma, California | | rabbittransit | York and Adams County, Pennsylvania | | River Valley Transit | Middletown, Connecticut | | Rogue Valley Transportation District | Medford, Oregon | | RTC Washoe | Reno, Nevada | | Santa Barbara Metropolitan Transit District | Santa Barbara, California | | Sonoma County Transit | Sonoma County, California | | South Central Transit | South Central Illinois | | STAR Transit | Balch Springs, Texas | | Sunline Transit Agency | Riverside County, California | | Tahoe Transportation District | Lake Tahoe, California | | Tahoe Truckee Area Regional Transit | Truckee, California | | Transcollines | Les Collines-de-l'Outaouais, Quebec | | Tulare County Area Transit | Tulare County, California | | Victor Valley Transit | Victory Valley, California | | Worcester Regional Transit Authority | Worcester, Massachusetts |

Are you using gtfs-to-html? Let us know via email [email protected] or via opening a github issue or pull request if your agency is using this library.

gtfs-to-html is used as an integral part of transit-custom-posts - a GTFS-optimized Wordpress plugin for transit websites.

Installation, Configuration and Usage documentation

See GTFS-to-HTML Documentation

Changelog

See Changelog

Contributing

Pull requests are welcome, as well as feedback and reporting issues.

Tests

npm test