transitio.compare_feed_history#
- transitio.compare_feed_history(feed, when, *, time=None, refresh_token=None, cache_dir=None, directory=None, limit=None, **budgets)#
Compare the historical dataset versions of one catalogued feed.
Enumerates every Mobility Database dataset version whose published service range covers
when, downloads each (checksum-verified, cached, with the usual provenance sidecars), and delegates tocompare_feeds()with the dataset ids as labels. Requires a catalog token — dataset history has no CSV fallback.- Parameters:
feed (Feed or str) – The catalogued feed, or its catalog ID.
when (str or datetime.date) – The target day.
time (str, optional) – Wall-clock time narrowing the moment.
refresh_token – Passed to
transitio.MobilityDatabase/ its download.cache_dir – Passed to
transitio.MobilityDatabase/ its download.directory – Passed to
transitio.MobilityDatabase/ its download.limit (int, optional) – Compare at most this many covering versions, newest first; must be at least 2.
**budgets – The
validate_feedbudget keyword arguments.
- Returns:
The
compare_feeds()result, with each candidate row carrying its datasetprovenance(dataset id, catalogued sha256, download timestamp).- Return type:
dict
- Raises:
ValueError – When
limitis below 2, no dataset coverswhen, or only one does (nothing to compare — the message names it).