diff --git a/changelog/8.doc.rst b/changelog/8.doc.rst new file mode 100644 index 0000000..3715f8a --- /dev/null +++ b/changelog/8.doc.rst @@ -0,0 +1 @@ +Added documentation to the Example Notebooks section. \ No newline at end of file diff --git a/docs/example_notebooks/index.rst b/docs/example_notebooks/index.rst index 91ec35c..a92e025 100644 --- a/docs/example_notebooks/index.rst +++ b/docs/example_notebooks/index.rst @@ -3,5 +3,42 @@ Example Notebooks ================= +Example notebooks and corresponding :ref:`notebook-config` are available at `Example Notebooks `_. + +Directory Structure +------------------- + +To run the notebook, we assume the existence of the following files in the same +directory as the notebook: configuration files and the data directory. + +.. _notebook-config: + +Configuration Files +~~~~~~~~~~~~~~~~~~~ + +The following configuration files are required to be in the same directory as the notebook: + +- ``config.yml``, +- ``usage_config.yml``, +- ``data/metadata.json``. + +.. seealso:: + :ref:`config-files` for more information on configuration files. + + +Data +~~~~ + +The first code cell in the notebook downloads the required data and data dictionary from +`seismometer-data `_ +repository and creates the following files in the notebook directory: + +- ``data/predictions.parquet``, +- ``data/events.parquet``, +- ``dictionary.yml``. + +To use your own data, simply remove the first code cell and place your own data +following the schema mentioned above. + .. nbgallery:: notebooks/binary-classifier/classifier_bin diff --git a/example-notebooks/binary-classifier/classifier_bin.ipynb b/example-notebooks/binary-classifier/classifier_bin.ipynb index c4a3ff2..5707d01 100644 --- a/example-notebooks/binary-classifier/classifier_bin.ipynb +++ b/example-notebooks/binary-classifier/classifier_bin.ipynb @@ -92,7 +92,9 @@ "DATASET_SOURCE = \"https://raw.githubusercontent.com/epic-open-source/seismometer-data/main\"\n", "_ = urllib.request.urlretrieve(f\"{DATASET_SOURCE}/diabetes/predictions.parquet\", \"data/predictions.parquet\")\n", "_ = urllib.request.urlretrieve(f\"{DATASET_SOURCE}/diabetes/events.parquet\", \"data/events.parquet\")\n", - "_ = urllib.request.urlretrieve(f\"{DATASET_SOURCE}/diabetes/data_dictionary.yml\", \"dictionary.yml\")" + "_ = urllib.request.urlretrieve(f\"{DATASET_SOURCE}/diabetes/data_dictionary.yml\", \"dictionary.yml\")", + "\n", + "# We assume the existence of the following files in the same directory as the notebook: config.yml, usage_config.yml and data/metadata.json" ] }, {