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.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minder_research_data_snapshots-0.12.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file minder_research_data_snapshots-0.12.tar.gz.

File metadata

File hashes

Hashes for minder_research_data_snapshots-0.12.tar.gz
Algorithm Hash digest
SHA256 018fbb1a8a75924c29889bd24c8d79a7c3feaa09b39241dac9ce1aa26c312f3e
MD5 bcbc2c20cfadb846906aeb045d60092b
BLAKE2b-256 d3638b92d01fc5777ad12b091efa48151c2b825892ce94afcb2e57d179a75368

See more details on using hashes here.

File details

Details for the file minder.research_data_snapshots-0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for minder.research_data_snapshots-0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 ced31ae16cdb120a3dd70531ae41c13b5e3fd0f605d93c9f90f823fc979f9229
MD5 7f3a32db209c8abcf9960cc0221d4d1d
BLAKE2b-256 5632af0319bfe27df4a1e08e3fea302d2e5d2e1a5c19b7d24ef2d06cfb6a911d

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