> For the complete documentation index, see [llms.txt](https://nexus-personalized-health-techno.gitbook.io/lab-data-management-app-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nexus-personalized-health-techno.gitbook.io/lab-data-management-app-user-guide/integrated-jupyter-notebook-tool.md).

# Integrated Jupyter Notebook Tool

1\. Open the notebook

The user has the flexibility to either download the raw data from the experiment page and analyze it with the tools of their choice or use the integrated Jupyter Notebook, which is equipped with both Python and R kernels.

The notebook page can be opened from the menu under the user icon.&#x20;

<figure><img src="https://782206907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYHNuXqisPig2lDLXdY0k%2Fuploads%2F8NbN1oT2j4vi86QR8mWW%2Fopen_notebook.png?alt=media&amp;token=b25ba348-d575-487f-8b23-b1735c598859" alt=""><figcaption></figcaption></figure>

2. Working with the Data

After the notebook is open, the user will see the standard Jupyter Notebook environment. To load the data, the user needs to import the `ldm` class in the first cell and use the method `get_experiment_measurements`, providing the experiment name and the name of the measurement (the name of the measurement can be defined during the M1000 import. If none is defined, the default name "Label1" is used). Optionally, the user can load normalized and log-transformed values as well.&#x20;

We recommend using the code shown in the screenshot in the first cell (adapting the variable names for your project).

<figure><img src="https://782206907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYHNuXqisPig2lDLXdY0k%2Fuploads%2FY9znpZqagejxIf63Q1eK%2Ffirst_cell.png?alt=media&amp;token=53b79853-8667-4804-b40b-8874bad9a608" alt=""><figcaption></figcaption></figure>

The object `raw_data`, which is returned by the method `get_experiment_measurements`, is a pandas DataFrame that can be used as usual for further analysis.

<figure><img src="https://782206907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYHNuXqisPig2lDLXdY0k%2Fuploads%2FIZTnkEReGd3wXodjHJgZ%2Fpandas_df.png?alt=media&amp;token=70325337-8836-45b0-8914-349c8d301c1c" alt=""><figcaption></figcaption></figure>

3. Switch to R

To continue the analysis in R, the user needs to mark the cells with `%%R` at the very beginning of the cell. To transform the objects loaded previously into an R data frame, use the flag `-i` as shown in the next picture.

<figure><img src="https://782206907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYHNuXqisPig2lDLXdY0k%2Fuploads%2F1fSIH4eWKlo1dLossJ9K%2FR.png?alt=media&amp;token=a8643656-3e6b-4d48-adea-8d5d6d1d0a94" alt=""><figcaption></figcaption></figure>

After this, you can use the DataFrame `raw_data` as you would usually do in R. In consecutive cells, you only need to mark them with `%%R` at the very beginning.
