BBBikeDownloader.get_download_index

BBBikeDownloader.get_download_index(update=False, confirmation_required=True, verbose=False)[source]

Get a dict-type index of available formats, data types and a download catalogue.

Parameters
  • update (bool) – whether to check on update and proceed to update the package data, defaults to False

  • confirmation_required (bool) – whether to prompt a message for confirmation to proceed, defaults to True

  • verbose (bool or int) – whether to print relevant information in console, defaults to False

Returns

a list of available formats, a list of available data types and a dictionary of download catalogue

Return type

dict

Examples:

>>> from pydriosm.downloader import BBBikeDownloader

>>> bbbike_downloader = BBBikeDownloader()

>>> dwnld_dict = bbbike_downloader.get_download_index()

>>> print(list(dwnld_dict.keys()))
['FileFormat', 'DataType', 'Catalogue']

>>> print(dwnld_dict['Catalogue']['Leeds'].head())
                             Filename  ...          LastUpdate
0                       Leeds.osm.pbf  ... 2020-08-14 18:10:47
1                        Leeds.osm.gz  ... 2020-08-14 23:26:15
2                   Leeds.osm.shp.zip  ... 2020-08-14 23:48:29
3  Leeds.osm.garmin-onroad-latin1.zip  ... 2020-08-15 01:59:13
4         Leeds.osm.garmin-onroad.zip  ... 2020-08-15 01:59:02

[5 rows x 5 columns]