No project description provided
Project description
minder.research-data-snapshots
Install
python -m pip install minder.research-data-snapshots
This will provide exports in Parquet format, which should be sufficient if you're using Pandas or another dataframe library.
If you require exports in CSV format then use:
python -m pip install 'minder.research-data-snapshots[csv]'
Use
First retrieve an access token from https://research.minder.care/
export RESEARCH_PORTAL_TOKEN_PATH=/path/to/access/token
Then use one of the following methods to retrieve data snapshots
CLI
python -m minder.research_data_snapshots --dataset patients raw_heart_rate --organization SABP "H&F"
Run python -m minder.research_data_snapshots --help
to see all options
Library
python -m pip install 'pandas[parquet]'
from datetime import datetime
import pandas as pd
from minder.research_data_snapshots import download_datasets
path = download_datasets(["patients"], ["ELM4RQF8R9dsU3CZEgtiTW"])[0]
df = pd.read_parquet(path)
print(df)
paths = download_datasets(["raw_heart_rate"])
df = pd.concat(
pd.read_parquet(
path,
filters=[
("start_date", ">=", datetime.fromisoformat("2023-01-01T00Z")),
("start_date", "<", datetime.fromisoformat("2024-01-01T00Z")),
],
columns=["id", "patient_id", "start_date"],
)
for path in paths
).sort_values("start_date").reset_index(drop=True)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file minder_research_data_snapshots-0.18.0.tar.gz
.
File metadata
- Download URL: minder_research_data_snapshots-0.18.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f04f3a5d75472d82a09ff2a127410519514051d4d5cbc83cd0161159cf7cf5c1 |
|
MD5 | 86eb547f7ef72125a41d5cc03cfc8a28 |
|
BLAKE2b-256 | 0cbd90df9b1483fe4a0b4904d19764ddd86c4cc5db9435e8cf25bb934134464d |
File details
Details for the file minder.research_data_snapshots-0.18.0-py3-none-any.whl
.
File metadata
- Download URL: minder.research_data_snapshots-0.18.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a201973358d4143037b80889569e644d49bcf0a8f3d48cbd6cb3f17ed0055358 |
|
MD5 | 9ba9508db43d7eecb2357b9dc162494d |
|
BLAKE2b-256 | bfff56c8e3b0e1ab3df0cc0c714c765e70c0043279f17a0e81f37a71b0984826 |