BBBikeDownloader.get_list_of_cities

BBBikeDownloader.get_list_of_cities(update=False, confirmation_required=True, verbose=False)

Get a list of names of cities.

This is an alternative to .get_list_of_subregion_names().

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

  • confirmation_required (bool) – whether asking for confirmation to proceed, defaults to True

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

Returns

list of names of cities available on the BBBike free download server

Return type

list or None

Example:

>>> from pydriosm.downloader import BBBikeDownloader

>>> bbbike_downloader = BBBikeDownloader()

>>> # A list of BBBike cities' names
>>> names_of_cities = bbbike_downloader.get_list_of_cities()

>>> len(names_of_cities) > 200
True

>>> names_of_cities[:5]
['Heilbronn', 'Emden', 'Bremerhaven', 'Paris', 'Ostrava']

>>> names_of_cities[-5:]
['UlanBator', 'LaPaz', 'Sucre', 'Cusco', 'LaPlata']