Return the path of the Yellowbrick data directory. This folder is used by
    dataset loaders to avoid downloading data several times.

    By default, this folder is colocated with the code in the install directory
    so that data shipped with the package can be easily located. Alternatively
    it can be set by the YELLOWBRICK_DATA environment variable, or
    programmatically by giving a folder path. Note that the '~' symbol is
    expanded to the user home directory, and environment variables are also
    expanded when resolving the path.

def get_data_home(path=None):
    """
    Return the path of the Yellowbrick data directory. This folder is used by
    dataset loaders to avoid downloading data several times.

    By default, this folder is colocated with the code in the install directory
    so that data shipped with the package can be easily located. Alternatively
    it can be set by the YELLOWBRICK_DATA environment variable, or
    programmatically by giving a folder path. Note that the '~' symbol is
    expanded to the user home directory, and environment variables are also
    expanded when resolving the path.
    """
    if path is None:
        path = os.environ.get('YELLOWBRICK_DATA', FIXTURES)

    path = os.path.expanduser(path)
    path = os.path.expandvars(path)

    if not os.path.exists(path):
        os.makedirs(path)

    return path