cdd_bbbike

pydriosm.utils.cdd_bbbike(*sub_dir, mkdir=False, default_dir='osm_bbbike', **kwargs)[source]

Change directory to osm_bbbike\ and its subdirectories.

Parameters:
  • sub_dir (str) – name of directory; names of directories (and/or a filename)

  • mkdir (bool) – whether to create a directory, defaults to False

  • default_dir (str) – default folder name of the root directory for downloading data from BBBike, defaults to "osm_bbbike"

  • kwargs – [optional] parameters of pyhelpers.dir.cd()

Returns:

an absolute path to a directory (or a file) under data_dir

Return type:

str

Examples:

>>> from pydriosm.utils import cdd_bbbike
>>> import os

>>> os.path.relpath(cdd_bbbike())
'osm_bbbike'