Skip to content

About

Documentation for June 2025 interactive map of new bus routes

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

Documentation for June 2025 interactive map of new D.C. bus routes

================

Overview

Back to top

The Washington Metropolitan Area Transit Authority replaced all of its bus routes on June 29, the first major overhaul of the network since it began operation 50 years ago. Nine “Better Bus” routes will replace existing routes through American University and Tenleytown.

I was dissatisfied by Metro's existing maps that were difficult to read and on too great a scale to be relevant to AU students. That's what this map seeks to fix.

Read the story: New Metrobus routes started Sunday. Here’s what the AU community needs to know by Owen Auston-Babcock, who also created this project.

Data

Back to top

At the start of June, Metro published data for the new bus routes in a format known as the General Transit Feed Specification, or GTFS, mainly for mapping companies to configure the new transit routes.

Metro explains: "The GTFS provides users and developers certain Transit Data either statically through a series of text files collected in a downloadable .Zip file or through a real-time GTFS feed. The static GTFS provides the same schedule data that supports WMATA’s online trip planner."

Methodology

Back to top

I downloaded the GTFS .Zip file and used the JavaScript package gtfsToGeoJSON to convert the data into a map-readable format. You can replicate this step by running gtfs-to-geojson.js, but first make sure you add your WMATA API key to config.json (sorry, not getting mine!).

Once the data was converted to GeoJSON, I wrote (with help from Claude) a pretty generic interactive map. It uses Leaflet with MapTiler's Streets V2 basemap. Leaflet supports the initialization and CSS elements, such as the tooltips and route lines.

The map itself, as deployed in our story, is hosted on my personal website and is called by an iframe element embedded via The Eagle's CMS.

What's in here?

Back to top

This project contains the following files:

  • api_key.js - Template JavaScript file for hiding your MapTiler API key (still not getting mine!)
  • better_bus_au_routes.geojson - The route path data
  • config.json - Configuration code for gtfs-to-geojson.js
  • gtfs-to-geojson.js - The JavaScript program to convert the static GTFS feed to GeoJSON
  • prod.html - The production-ready HTML file, which can easily be embedded or deployed on a website

Credit and disclaimers

Back to top

This build is subject to the WMATA Developer License Agreement and the terms and copyrights of Leaflet, MapTiler and OpenStreetMap Contributors.

Claude, a generative artificial intelligence model by Anthropic, was used as a coding companion for this project.

Everything contained in this repository is free to use. Do not remove attribution, source or documentation.

About

Documentation for June 2025 interactive map of new bus routes

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages