Description¶
Downloads all files from a published openICPSR deposit as a ZIP archive. Designed specifically for downloading publicly accessible deposits. For private/unpublished deposits, use download_openicpsr-private.py instead.
Usage¶
python3 tools/download_openicpsr-public.py PROJECT_ID [VERSION] [login]Arguments¶
PROJECT_ID (required) - Numeric openICPSR project ID (e.g., 146462)
VERSION (optional) - Version number (e.g., V1, V2). If omitted, downloads latest version
login (optional) - openICPSR login email (can also use
ICPSR_EMAILenv var)
Examples¶
# Download latest version of project 146462
python3 tools/download_openicpsr-public.py 146462
# Download specific version V2
python3 tools/download_openicpsr-public.py 146462 V2
# Download with login credentials
python3 tools/download_openicpsr-public.py 146462 myemail@example.comRequirements¶
Python >= 3.6
requestslibrary
Environment Variables¶
ICPSR_EMAIL- openICPSR login email (optional)ICPSR_PASS- openICPSR password (optional, prompted if not set)
Features¶
Downloads from public openICPSR deposits
Progress indicator with download size tracking
Validates project ID format (must be numeric)
Supports version-specific downloads or auto-detection of latest version
Downloads ZIP file to current directory
Notes¶
This tool is for published/public deposits. For private or unpublished deposits, use download_openicpsr-private.py which requires authentication.