BBBikeDownloader.get_coordinates_of_cities

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

Get location information of all cities available on the download server.

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

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

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

Returns:

location information of BBBike cities, i.e. geographic (sub)regions

Return type:

pandas.DataFrame | None

Examples:

>>> from pydriosm.downloader import BBBikeDownloader

>>> bbd = BBBikeDownloader()

>>> # Location information of BBBike cities
>>> coords_of_cities = bbd.get_coordinates_of_cities()

>>> type(coords_of_cities)
pandas.core.frame.DataFrame
>>> coords_of_cities.head()
          City  ... ur_latitude
0       Aachen  ...       50.99
1       Aarhus  ...      56.287
2     Adelaide  ...     -34.753
3  Albuquerque  ...     35.2173
4   Alexandria  ...       31.34
[5 rows x 13 columns]

>>> coords_of_cities.columns.to_list()
['city',
 'real_name',
 'pref._language',
 'local_language',
 'country',
 'area_or_continent',
 'population',
 'step',
 'other_cities',
 'll_longitude',
 'll_latitude',
 'ur_longitude',
 'ur_latitude']