BBBikeDownloader.get_catalogue¶
- classmethod BBBikeDownloader.get_catalogue(update=False, confirmation_required=True, verbose=False, raise_error=False)[source]¶
Get a dict-type index of available formats, data types and a download catalogue.
- Parameters:
update (bool) – whether to (check on and) update the prepacked data, defaults to
Falseconfirmation_required (bool) – whether asking for confirmation to proceed, defaults to
Trueverbose (bool | int) – whether to print relevant information in console, defaults to
Falseraise_error (bool) – Whether to raise the provided exception; if
raise_error=False(default), the error will be suppressed.
- Returns:
a list of available formats, a list of available data types and a dictionary of download catalogue
- Return type:
dict | None
Examples:
>>> from pydriosm.downloader import BBBikeDownloader >>> bbd = BBBikeDownloader() >>> # Index for downloading OSM data available on the BBBike free download server >>> bbbike_catalogue = bbd.get_catalogue() >>> list(bbbike_catalogue.keys()) ['FileFormat', 'DataType', 'Catalogue'] >>> catalogue = bbbike_catalogue['Catalogue'] >>> type(catalogue) dict >>> bham_catalogue = catalogue['Birmingham'] >>> type(bham_catalogue) pandas.core.frame.DataFrame >>> bham_catalogue.shape (13, 5) >>> bham_catalogue.head() filename ... last_update 0 Birmingham.osm.pbf ... 2025-09-27 18:51:39+00:00 1 Birmingham.osm.gz ... 2025-09-28 05:37:57+00:00 2 Birmingham.osm.shp.zip ... 2025-09-28 05:54:16+00:00 3 Birmingham.osm.garmin-ontrail-latin1.zip ... 2025-09-28 07:05:18+00:00 4 Birmingham.osm.garmin-onroad-latin1.zip ... 2025-09-28 07:04:54+00:00 [5 rows x 5 columns]