No project description provided
Project description
minder.research-data-snapshots
Install
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:
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_sleep_mat --organization NTn9Xhy9o1owBFtnGwWMYB --csv --refresh
Run python -m minder.research_data_snapshots --help
to see all options
Library
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.read_parquet(
paths,
filters=[
("start_date", ">=", datetime.fromisoformat("2023-01-01T00Z")),
("start_date", "<", datetime.fromisoformat("2024-01-01T00Z")),
],
)
.sort_values("start_date")
.reset_index(drop=True)
)
print(df)
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file minder.research_data_snapshots-0.7-py3-none-any.whl
.
File metadata
- Download URL: minder.research_data_snapshots-0.7-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2ba83e926952dc8da875446cceeed9bbea5818017ecb675720e7f90fcc28f94 |
|
MD5 | 48875070f8a4faa2d8204a2dc7138288 |
|
BLAKE2b-256 | 2edd3bb5750dfef40a2769814d7bcce2740c0a020bd5f1eefafca8f3ebbfc1d1 |