Skip to content
This repository was archived by the owner on May 27, 2024. It is now read-only.
This repository was archived by the owner on May 27, 2024. It is now read-only.

Add TransitlandDownloader to retrieve GTFS/GTFS-realtime feeds from Transitland #4

@barbeau

Description

@barbeau

Transitland doesn't yet include URLs for GTFS-realtime feeds, but it's on the short list - see https://github.com/transitland/transitland/issues/77.

This project is written to be fairly agnostic to what API the GTFS and GTFS-realtime feed URLs come from. We're currently using TransitFeeds.com because it already has a directory of GTFS-realtime feeds, but I'd like to add Transitland as an option too.

Adding Transitland as an option to our project would mean mirroring the TransitFeedsDownloader class in a new TransitlandDownloader class.

TransitFeedsDownloader does the following:

  1. Gets a list of GTFS-realtime feeds from TransitFeeds.com, which each have a Location ID (defined by TransitFeeds.com), creates a subdirectory for that Location ID, and downloads the GTFS-realtime protocol buffer files for each URL to that directory
  2. Gets a list of GTFS feeds, and downloads each GTFS zip file if we have a corresponding GTFS-realtime feed for that same Location ID

So, we'd need to following a similar process for Transitland:

  1. Get a list of GTFS-realtime feed URLs, each of which has some identifier that links it to the corresponding GTFS data
  2. Get a list of GTFS feeds, each of which has some identifier that links it to the corresponding GTFS-realtime feeds

This could happen in a single API call, or several - the main requirement is that there is a link between the GTFS and GTFS-realtime feeds, and that we can easily download GTFS data only for agencies that have GTFS-realtime feeds. Note that GTFS-realtime feeds typically have 2-3 URLs, one for each TripUpdate, VehiclePositions, and ServiceAlerts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions