{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "b1f7be4a",
   "metadata": {},
   "source": [
    "# Download the Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "09a66ced",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-09-29T21:44:00.414675Z",
     "iopub.status.busy": "2026-09-29T21:44:00.414307Z",
     "iopub.status.idle": "2026-09-29T21:44:00.417988Z",
     "shell.execute_reply": "2026-09-29T21:44:00.418317Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Data are located at /tmp/paper/data/nimare-paper/data\n"
     ]
    }
   ],
   "source": "# First, import the necessary modules and functions\nimport os\n\nfrom repo2data.repo2data import Repo2Data\n\n# Install the data if running locally, or points to cached data if running on neurolibre\nDATA_REQ_FILE = os.path.abspath(\"../binder/data_requirement.json\")\nrepo2data = Repo2Data(DATA_REQ_FILE)\ndata_path = repo2data.install()\ndata_path = os.path.join(data_path[0], \"data\")\nprint(f\"Data are located at {data_path}\")"
  },
  {
   "cell_type": "markdown",
   "id": "183fd2b8",
   "metadata": {},
   "source": [
    "We will also create a directory in which to save files that are generated within the book."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "55c44c57",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2026-09-29T21:44:00.420911Z",
     "iopub.status.busy": "2026-09-29T21:44:00.420605Z",
     "iopub.status.idle": "2026-09-29T21:44:00.424091Z",
     "shell.execute_reply": "2026-09-29T21:44:00.424392Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Files generated by the book will be saved to /tmp/paper/outputs\n"
     ]
    }
   ],
   "source": "os.makedirs(\"../outputs/\", exist_ok=True)\nprint(f\"Files generated by the book will be saved to {os.path.abspath('../outputs/')}\")"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
