Skip to main content

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 ELM4RQF8R9dsU3CZEgtiTW 7LcACpK4u12HH72D1etd5X

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

File metadata

File hashes

Hashes for minder.research_data_snapshots-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 7fe93268434272a2769d618ccc24c988a08da6349b58a6a953397157d8d487ec
MD5 5c212b6384dca0016440295db0916350
BLAKE2b-256 dcc6079395b01c2b1d7255c758bfb0dc554b6b5ce44b80725b38c54f42f90407

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