|
| 1 | +### Jupyter notebooks to demo HED processing with BIDS |
| 2 | + |
| 3 | +The Jupyter notebooks in this directory are useful for annotating, |
| 4 | +validating, summarizing, and analyzing your BIDS datasets. |
| 5 | + |
| 6 | +**Table 1:** Useful Jupyter notebooks for processing BIDS datasets. |
| 7 | + |
| 8 | +| Notebooks | Purpose | |
| 9 | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------| |
| 10 | +| [`extract_json_template`](https://github.com/hed-standard/hed-examples/blob/main/src/jupyter_notebooks/bids/extract_json_template.ipynb) | Creates a JSON sidecar based on all the event files in a dataset. | |
| 11 | +| [`find_event_combinations`](https://github.com/hed-standard/hed-examples/blob/main/src/jupyter_notebooks/bids/find_event_combinations.ipynb) | Creates a spreadsheet of unique combinations of event values. | |
| 12 | +| [`merge_spreadsheet_into_sidecar`](https://github.com/hed-standard/hed-examples/blob/main/src/jupyter_notebooks/bids/merge_spreadsheet_into_sidecar.ipynb) | Merges a spreadsheet version of a sidecar into a JSON sidecar. | |
| 13 | +| [`sidecar_to_spreadsheet`](https://github.com/hed-standard/hed-examples/blob/main/src/jupyter_notebooks/bids/sidecar_to_spreadsheet.ipynb) | Converts the HED portion of a JSON sidecar into a 4-column spreadsheet. | |
| 14 | +| [`summarize_events`](https://github.com/hed-standard/hed-examples/blob/main/src/jupyter_notebooks/bids/summarize_events.ipynb) | Summarizes the contents of the event files, including value counts. | |
| 15 | +| [`validate_bids_dataset`](https://github.com/hed-standard/hed-examples/blob/main/src/jupyter_notebooks/bids/validate_bids_dataset.ipynb) | Validates the HED annotations in a BIDS dataset. | |
| 16 | +| [`validate_bids_dataset_with_libraries`](https://github.com/hed-standard/hed-examples/blob/main/src/jupyter_notebooks/bids/validate_bids_dataset_with_libraries.ipynb) | Demonstrates use of HED libraries in validation. | |
| 17 | +| [`validate_bids_datasets`](https://github.com/hed-standard/hed-examples/blob/main/src/jupyter_notebooks/bids/validate_bids_datasets.ipynb) | Validates the HED annotations in a list of BIDS datasets. | |
| 18 | + |
| 19 | +## Getting Started |
| 20 | + |
| 21 | +**Note:** These example notebooks are only available in the [GitHub repository](https://github.com/hed-standard/hed-python), |
| 22 | +not in the PyPI distribution. To use them, clone or download the repository. |
| 23 | + |
| 24 | +### Installation |
| 25 | + |
| 26 | +1. **Clone the repository** (to get the example notebooks): |
| 27 | + ```bash |
| 28 | + git clone https://github.com/hed-standard/hed-python.git |
| 29 | + cd hed-python/examples |
| 30 | + ``` |
| 31 | + |
| 32 | +2. **Install HEDTools with Jupyter support**: |
| 33 | + |
| 34 | + From PyPI: |
| 35 | + ```bash |
| 36 | + pip install hedtools jupyter notebook |
| 37 | + ``` |
| 38 | + |
| 39 | + Or from the repository root in development mode: |
| 40 | + ```bash |
| 41 | + cd .. |
| 42 | + pip install -e .[examples] |
| 43 | + ``` |
| 44 | + |
| 45 | +3. **Launch Jupyter** and open the notebooks: |
| 46 | + ```bash |
| 47 | + jupyter notebook |
| 48 | + ``` |
| 49 | + |
| 50 | +### Alternative: Download examples separately |
| 51 | + |
| 52 | +If you already have `hedtools` installed from PyPI, you can download just the examples: |
| 53 | + |
| 54 | +```bash |
| 55 | +# Download the examples directory from GitHub |
| 56 | +svn export https://github.com/hed-standard/hed-python/trunk/examples |
| 57 | + |
| 58 | +# Or manually download from: |
| 59 | +# https://github.com/hed-standard/hed-python/tree/main/examples |
| 60 | +``` |
| 61 | + |
| 62 | +### Requirements |
| 63 | + |
| 64 | +- Python 3.10 or greater |
| 65 | +- HEDTools package |
| 66 | +- Jupyter notebook environment |
| 67 | + |
0 commit comments