pymovements.dataset.Dataset.download#

Dataset.download(*, extract: bool = True, remove_finished: bool = False, verbose: int = 1) Dataset#

Download dataset resources.

This downloads all resources of the dataset. Per default this also extracts all archives into Dataset.paths.raw(), To save space on your device you can remove the archive files after successful extraction with remove_finished=True.

If a corresponding file already exists in the local system, its checksum is calculated and checked against the expected checksum. Downloading will be evaded if the integrity of the existing file can be verified. If the existing file does not match the expected checksum it is overwritten with the downloaded new file.

Parameters:
  • extract (bool) – Extract dataset archive files. (default: True)

  • remove_finished (bool) – Remove archive files after extraction. (default: False)

  • verbose (int) – Verbosity levels: (1) Show download progress bar and print info messages on downloading and extracting archive files without printing messages for recursive archive extraction. (2) Print additional messages for each recursive archive extract. (default: 1)

Returns:

Returns self, useful for method cascading.

Return type:

Dataset

Raises:
  • AttributeError – If number of mirrors or number of resources specified for dataset is zero.

  • RuntimeError – If downloading a resource failed for all given mirrors.