{ "cells": [ { "cell_type": "markdown", "id": "9cb473cc-4590-4820-bd51-47cfb26f056e", "metadata": {}, "source": [ "# HDF5 and ontologies\n", "\n", "HDF5 itself is considered self-describing due to the ability to store metadata (attributes) with raw data. However, this is only the prerequisite. Especially, achieving (easy) re-usability, requires standardized metadata, which is publically defined and accessible. This means, that data must be describable with persistent identifiers, as known from linked data solutions.\n", "\n", "One solution of describing data is using controlled vocabularies or even better ontologies. In fact, an [ontology exists](http://purl.allotrope.org/ontologies/hdf5/1.8#), which allows describing the structural content of an HDF5 file (groups, datasets, attributes, properties etc.). The ``h5rdmtoolbox`` has implemented a conversion function, translating an HDF5 into a JSON-LD file. This is outlined here." ] }, { "cell_type": "code", "execution_count": 1, "id": "5815196c-e3be-44d8-a1f8-07e563ce7dc2", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Failed to import module h5tbx\n" ] } ], "source": [ "import h5rdmtoolbox as h5tbx" ] }, { "cell_type": "markdown", "id": "cf5946b6-53f5-46a6-8365-1b90f2f82eb4", "metadata": {}, "source": [ "Let's create a sample HDF5 file first:" ] }, { "cell_type": "code", "execution_count": 2, "id": "01fcc4c6-c564-4094-a4d4-bf4a9985c477", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "| \n", " | ds_name | \n", "ds_size | \n", "
|---|---|---|
| 0 | \n", "/grp/Fan/D3 | \n", "1 | \n", "
| 1 | \n", "/test_dataset | \n", "3 | \n", "