BBBikeDownloader.get_bbbike_cities_poly

classmethod BBBikeDownloader.get_bbbike_cities_poly(update=False, confirmation_required=True, verbose=False, raise_error=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

  • raise_error (bool) – Whether to raise the provided exception; if raise_error=False (default), the error will be suppressed.

Returns:

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

Return type:

pandas.DataFrame | None

Examples:

>>> from pydriosm.downloader import BBBikeDownloader
>>> bbd = BBBikeDownloader()
>>> bbbike_city_polygons = bbd.get_bbbike_cities_poly()
>>> type(bbbike_city_polygons)
pandas.DataFrame
>>> bbbike_city_polygons.shape
(238, 2)
>>> bbbike_city_polygons.head()
          name                                           geometry
0       Aachen  POLYGON ((5.88 50.6, 6.58 50.6, 6.58 50.99, 5....
1       Aarhus  POLYGON ((9.82 55.99, 10.37 55.99, 10.37 56.29...
2     Adelaide  POLYGON ((138.46 -35.03, 138.74 -35.03, 138.74...
3  Albuquerque  POLYGON ((-106.8 35, -106.47 35, -106.47 35.22...
4   Alexandria  POLYGON ((29.7 31.02, 30.21 31.02, 30.21 31.34...