ipumspy.api.IpumsApiClient.download_extract#
- IpumsApiClient.download_extract(extract, collection=None, download_dir=None, stata_command_file=False, spss_command_file=False, sas_command_file=False, r_command_file=False)[source]#
Download the extract with id
extract_number
todownload_dir
(default location is current directory)- Parameters:
extract (
Union
[BaseExtract
,int
]) – The extract to download. This extract must have been submitted. Alternatively, can be an extract id. If an extract id is provided, you must supply the collection namecollection (
Optional
[str
]) – The name of the collection to pull the extract from. If None, thenextract
must be aBaseExtract
download_dir (
Union
[str
,Path
,None
]) – The location to download the data to. MUST be a directory that currently existsstata_command_file (
Optional
[bool
]) – Set to True to download the stata command file with the extract data file.spss_command_file (
Optional
[bool
]) – Set to True to download the SPSS command file with the extract data file.sas_command_file (
Optional
[bool
]) – Set to True to download the SAS command file with the extract data file.R_command_file – Set to True to download the R command file with the extract data file.