BBBikeDownloader.get_coordinates_of_cities

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

Get location information of cities (geographic regions).

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

location information of BBBike cities

Return type

pandas.DataFrame or None

Example:

>>> from pydriosm.downloader import BBBikeDownloader

>>> bbbike_downloader = BBBikeDownloader()

>>> # Location information of BBBike cities
>>> coords_of_cities = bbbike_downloader.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.tolist()
['City',
 'Real name',
 'Pref. language',
 'Local language',
 'Country',
 'Area/continent',
 'Population',
 'Step?',
 'Other cities',
 'll_longitude',
 'll_latitude',
 'ur_longitude',
 'ur_latitude']