data.downloaders

data.downloaders

Download data needed for HPVsim.

Typically, this is done automatically: on load, HPVsim checks if the data are already downloaded, and if not, downloads them using the quick_download() function. The “slow download” functions supply the files that are usually zipped and stored in a separate repository, hpvsim_data.

To ensure the data is updated, update the data_version parameter below.

Running this file as a script will remove and then re-download all data.

Functions

Name Description
check_downloaded Check if data is downloaded. Note: to update data, update the date here and
download_data Download data in parallel
quick_download Download pre-processed data files
remove_data Remove downloaded data; arguments passed to sc.rmpath()

check_downloaded

data.downloaders.check_downloaded(verbose=1, check_version=True)

Check if data is downloaded. Note: to update data, update the date here and in data/files/metadata.json.

Parameters

Name Type Description Default
verbose int detail to print (0 = none, 1 = reason for failure, 2 = everything) 1
check_version bool whether to treat a version mismatch as a failure True

download_data

data.downloaders.download_data(serial=False, **kwargs)

Download data in parallel

quick_download

data.downloaders.quick_download(verbose=True, init=False)

Download pre-processed data files

remove_data

data.downloaders.remove_data(verbose=True, die=False, **kwargs)

Remove downloaded data; arguments passed to sc.rmpath()