pymovements.dataset.Dataset.download#

Dataset.download(*, extract: bool = True, remove_finished: bool = False) Dataset[source]#

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.

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

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.

Returns:

Returns self, useful for method cascading.

Return type:

PublicDataset