Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling GTFS with Non-Static URLs for ZTM TransportGZM #1369

Open
grzesjam opened this issue Jan 8, 2025 · 1 comment
Open

Handling GTFS with Non-Static URLs for ZTM TransportGZM #1369

grzesjam opened this issue Jan 8, 2025 · 1 comment

Comments

@grzesjam
Copy link

grzesjam commented Jan 8, 2025

Hello! 👋

I need some help/guidance regarding how this project would prefer to handle GTFS data when the URL for the static GTFS file dynamically changes.

Context:
ZTM TransportGZM is a public transportation organization based in the Silesian Voivodeship, Poland. They manage buses, trams, and trolleybuses. The organization provides both GTFS-RT and GTFS datasets:

  • The GTFS-RT has a static URL, so setting it in dmfr.json file is straightforward. Licensed under CC-BY-4.0
  • However, the GTFS data does not have a static URL. Instead, a new GTFS zip file is uploaded every few hours to their CKAN instance (dataset management software). Licensed under CC-BY-4.0.

The dataset can be accessed at:
https://otwartedane.metropoliagzm.pl/dataset/rozklady-jazdy-i-lokalizacja-przystankow-gtfs-wersja-rozszerzona

Alternatively, there’s an API endpoint:
https://otwartedane.metropoliagzm.pl/api/3/action/package_show?id=317435cc-0075-4d10-b8ef-6e9b0010e90a

Using the API, the newest GTFS file URL can be fetched dynamically with:

jq -r '.result.resources | sort_by(.created) | last | .url'

My Question:
What approach would best align with this repository and its downstream dependencies (such as transitous)?

  1. Should I implement a GitHub Action in this repository to update the GTFS URL dynamically, similar to other projects? (GBFS, GBFS-jp)
  2. Alternatively, should I create a separate repository with a GitHub Action that releases the GTFS under a static URL? (Although this would essentially make my repository act as middleware for the data.)

I would appreciate any advice or suggestions on how to proceed. Thanks in advance! 🙏

@grzesjam
Copy link
Author

Hello @drewda
Can you help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant