mobilis feeds¶
mobilis feeds manages the GTFS feeds stored locally under ~/.mobilis/feeds/.
mobilis feeds show¶
Lists downloaded feeds and/or feeds from the bundled catalog.
mobilis feeds show # both sections
mobilis feeds show --downloaded # downloaded feeds only (short: -d)
mobilis feeds show --catalog # catalog only (short: -c)
Downloaded feeds¶
Shows every directory found in ~/.mobilis/feeds/ with catalog metadata looked up from the bundled feeds.duckdb:
| Column | Description |
|---|---|
| Feed ID | Directory name (= feed identifier) |
| Provider | Organisation name from the Mobility Database |
| Feed name | Feed-level name from the Mobility Database (if set) |
| GTFS files | Whether extracted .txt files are present |
Feeds added manually (e.g. incofer, mbta) show – for Provider and Feed name because they are not in the catalog.
Catalog¶
Shows all GTFS feeds from the Mobility Database catalog:
| Column | Description |
|---|---|
| ID | Catalog identifier (mdb-*, tld-*, ntd-*) |
| Provider | Operating organisation |
| Feed name | Feed-level name (optional in the catalog) |
| URL | ✓ if a downloadable ZIP URL is available |
mobilis feeds update¶
Re-downloads and re-imports a feed from its catalog URL.
The command:
- Looks up
latest_dataset.hosted_urlin the catalog for<feed_id>. - Clears the existing
files/directory and.duckdbdatabase. - Downloads and extracts the GTFS ZIP.
- Re-imports all tables with
import_gtfs.
Note
Only feeds with a catalog entry (mdb-* / tld-* / ntd-*) can be updated this way. Manually created feeds (e.g. incofer) are not in the catalog and must be updated by hand.
mobilis feeds remove¶
Deletes a feed's local directory entirely.
This removes ~/.mobilis/feeds/<feed_id>/ including all extracted files and the DuckDB database. The action is immediate and irreversible; download again with mobilis feeds update or from within mobilis go.
Feed storage layout¶
~/.mobilis/
└── feeds/
└── <feed_id>/
├── files/ ← extracted GTFS .txt files
│ ├── agency.txt
│ ├── routes.txt
│ ├── stops.txt
│ ├── trips.txt
│ ├── stop_times.txt
│ ├── calendar.txt (optional)
│ ├── calendar_dates.txt (optional, ≥ 1 of these two required)
│ ├── shapes.txt
│ └── feed_info.txt (optional)
└── <feed_id>.duckdb ← imported DuckDB database
Feed import¶
Feed import is handled by src/mobilis/import_gtfs.py. It reads the GTFS .txt files and creates typed DuckDB tables. Key behaviour:
calendar.txtandcalendar_dates.txtare both optional; at least one must be present. Whichever is missing is replaced by an empty stub table so that queries still work.feed_info.txtis optional; when present, its data is stored in afeed_infotable and shown in the Feed info tab ofmobilis go.agency_idinroutes.txtis optional for single-agency feeds; the importer fills it fromagency.txtautomatically.arrival_timeanddeparture_timeare stored asINTERVAL(notTIME) to support GTFS values beyond23:59:59.