from behaverse.data import list_datasets, download_dataset, load_dataset, open_dataset, describe_dataset
from IPython.display import display
# List available datasets
display(list_datasets())
# Open a dataset, select a subset of the data, and load it into memory
= open_dataset('P500_9subjects/L1m').where(subject_id=['001', '002']).load()
dataset 'subjects', dataset.subjects)
display('study flow', dataset.study_flow)
display(
# print dataset description
describe_dataset(dataset)
Getting Started
Make sure you have Python 3.10 or later installed on your system. We recommend using a package manager to install the dependencies in a virtual environment.
You first need to install the behaverse-data-loader
Python package by running:
pip install -U behaverse-data-loader
Or if you prefer Conda/Mamba, you can add the following to your environment.yml
file:
dependencies:
- python>3.10
- pip
- pip:
- behaverse-data-loader
Usage
The behaverse-data-loader
package provides a simple API to access Behaverse services. You can use the behaverse.data
module to download datasets, load them into memory, and access the data. Here is an example of how to use the package to list available datasets, download a dataset, select a subset of the dataset, and load it into memory: