{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "Accessing and sharing data with ONE local mode", "provenance": [] }, "kernelspec": { "name": "python3", "language": "python", "display_name": "Python 3 (ipykernel)" }, "language_info": { "name": "python" } }, "cells": [ { "cell_type": "markdown", "metadata": { "id": "Ke27mmuJ_i0R" }, "source": [ "# Releasing data with ONE\n", "ONE can operate in [two modes](./one_modes.html). For very large collections, such as the main IBL\n", "data, it operates in 'remote mode', downloading data from a remote store only as required.\n", "However it can also be used in 'local mode', in which all data files are stored on the user's\n", "local machine. This is simpler, and allows access with no internet connection.\n", "To access data in local mode, a user uses exactly the same commands as in remote mode.\n", "\n", "ONE stores an index of the local filesystem in a couple of parquet files in the root directory,\n", "called 'sessions.pqt' and 'datasets.pqt'.\n", "\n", "The easiest way for data producers to release ONE-standard data is thus to create a directory\n", "containing your data files, collect them all into a .zip file, and put it on a website along\n", "with the index files.\n", "\n", "Users can then download and unzip your data files, and access them using ONE local mode.\n", "\n", "For information about creating and validating ONE-standard data (a.k.a. ALFs) see the [guide on\n", "datasets](./datasets_and_types.html).\n", "\n", "This guide is for releasing data without an Alyx database. If using an Alyx database instance and\n", "wish to share dataset UUIDs with others, see [recording data access](./recording_data_access.html).\n", "\n", "In this tutorial we will show how to create the index files.\n", "\n", "First [install ONE](../one_installation.html):\n", "\n", "```\n", "pip install ONE-api\n", "```\n", "\n", "## Downloading example data\n", "Next we are going to download an example collection of behavioural data files. The following\n", "commands download a zip file from figshare into a cache directory, and unzip it. It is of course\n", "also possible to download and unzip the file manually, in any directory of the users choice.\n", "This should take around a minute.\n", "\n", "The dataset is around 74,000 behaviour files (~218MB) from the beta data release for the [IBL\n", "behaviour paper](https://elifesciences.org/articles/63711). The code in this cell is not important.\n", "\n", "