Skip to main content

No project description provided

Project description

minder.research-data-snapshots

Install

pip install minder.research-data-snapshots

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 --organization ELM4RQF8R9dsU3CZEgtiTW 7LcACpK4u12HH72D1etd5X --dataset patients raw_heart_rate

Run python -m minder.research_data_snapshots --help to see all options

Library

from datetime import datetime

import pandas as pd

from minder.research_data_snapshots import download_dataset, download_datasets

path = download_dataset("ELM4RQF8R9dsU3CZEgtiTW", "patients")
df = pd.read_parquet(path)
print(df)

paths = download_datasets(["ELM4RQF8R9dsU3CZEgtiTW", "7LcACpK4u12HH72D1etd5X"], ["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


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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for minder.research_data_snapshots-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8038216b31d4d1d4a806fd69de46c62e4e0794d3575a3afd7c59692e7c43149a
MD5 1e7be34303bbb9fa3a5d265f06880dc9
BLAKE2b-256 675b058b1801b4a3af118c0c30ea57e3b56aa6d5ba2078b0bce5f5386c615791

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page