A Python package for finding and downloading PhysioNet data
We have released physionet, a Python package and command-line tool for working with PhysioNet. Use it to search for datasets, download whole projects or selected files, load tables directly into Python, and check a dataset before submitting it. Install it with:
pip install physionet
Find a dataset. Search published projects, then view the details of a specific version:
physionet search "sleep" --resource-type database
physionet show mimic-iv-demo --version 2.2
Download files. Download a whole project, or just the files you need. Downloads resume if interrupted, and every file is checked against the project's published checksums. Open datasets are downloaded from our AWS mirror when available.
physionet download mimic-iv-demo --version 2.2
physionet download mimic-iv-demo --version 2.2 --include "hosp/*" --dry-run
physionet download mimiciv --version 3.1 --username YOUR_USERNAME
Load a table in Python. Files are downloaded once and cached, so later calls read them from disk:
import physionet
patients = physionet.load("mimic-iv-demo", "hosp/patients", version="2.2")
Prepare a submission. Check a dataset for common problems, such as missing documentation, file naming issues, and possible identifiers, before you submit it to PhysioNet:
physionet validate /path/to/dataset
The package is open source. See the GitHub repository for full documentation, and to report issues or suggest features.
Read more: https://pypi.org/project/physionet/