Embedded Notebooks

What is Notebook?

TrendMiner's Notebook functionality is a platform that enables users to create and work with advanced tooling beyond the robust built-in TrendMiner capabilities, within the TrendMiner environment. 

Embedded Notebooks can only be accessed after access management is set up. A separate licence is also necessary. Contact us at TrendMiner if you are interested.

Why use the Notebook?

With the embedded notebooks, you will be able to:

  • load data from a TrendHub view that has been prepared using the typical built-in TrendMiner capabilities (select set of interesting tags, select timeframes of interest eg. via searches, …)
  • Visualise and analyse your data in different ways not possible within TrendMiner
  • do some automation of analytics via scripting (eg. repeat analysis over a large range of assets)
  • create (predictive) tags using custom models (eg. neural nets or clustering) supported by the typical notebook libraries.

You can make use of the more advanced visualisation options which come built-in with the notebook.  The embedded Notebook comes with its very own Notebook tile, so that you can also embed your work in a DashHub dashboard and make it available to your entire organisation.

How to use Notebook

Note: Interpreter - The default interpreter of the notebooks is Python.

Click on the "Notebook" button located on the unified top bar next to the "Work organiser" button. 

NB1.png

A panel will cover the screen from the right. 

NB2.png

Once open you can either create a new note or load an existing note. A new note will contain default code to enable the loading of certain python packages. 

Create a notebook

  1. Enter the notebook environment
  2. Click on the "Create a new note" button. A panel appears from the right of the screen.NB3.png
  3. Populate the open fields and select an export folder to store your new note.
  4. Click on the "Create note" button.

A new notebook will open on which you can write your python code. There is already some boiler-plate code added to load in necessary packages in a new note. It is best not to delete this code as you will need it to read in the TrendMiner content.

NB4.png

Load a notebook

You can load TrendHub views, for example, a view of good and abnormal operation periods and then compare using advanced analytics. 

  1. Click on the "Load note" button. A side panel will appear from the right.
  2. Select the item you wish to load as a note.
  3. Click add.

Note: As of version 2020.R3, only "TrendHub Views" are available as TrendMiner Content. More content will be introduced in later versions.

TrendMiner content

You can add views to your TRENDMINER CONTENT list.

1. Click on the + button next to the TRENDMINER CONTENT label. A side panel will appear from the right containing the work organiser.

NB5.png

2. Select a previously saved item. 

3. Click add. 

Items in the content menu list can be either opened or deleted. To delete simply click on the x in the menu located on the right of the item to be deleted.

  • Click on the new content to open. This will add the relevant python-code as a new cell at the end of the Notebook.

NB6.png

TrendHub Views 

More information can be obtained by running the following command in the notebook: 

help(trendminer.dataframes.data_frames) 

load_view( ): Loads the time series data of a saved TrendHub view into a list of Pandas DataFrames.  

  • One DataFrame is returned per layer in the view.  
  • Each DataFrame can have a different set of tags available.  \
  • The optional parameters [layer_ids] allows you to only load a specified list of layers (identified by the layer ids, as provided by the view_info function). 

view_info( ): Collect information about a view based on its ID. This info can be used to fetch data from a view: it lists all the layers that are included in the view. When fetching data from the view you can make a selection of layers to be included in the data. 

blobid0.png 

Snippets

SNIPPETS is not currently supported, but will be deployed on a later release. 

Currently snippets related to deploying machine learning models are available. More information can be found here. 

DashHub: Notebook Tiles

DashHub allows any output of a Notebook Paragraph to be shown in a dashboard Notebook Tile.

Creating a Notebook Tile

  1. Goto DashHub and create a new dashboard or open a previously created dashboard.
  2. Click on the "Actions" button. A dropdown menu will appear.
  3. Click on "Add new tile". A side panel will appear from the right.
  4. Click on the "Notebook output" option.
  5. Provide a Title for the dashboard tile.
  6. Provide the Notebook paragraph URL (see next section).
  7. Adjust the refresh setting if necessary.
  8. Click "Add new tile".

NB8.png

Note: When sharing a DashHub tile, the underlying views need to be shared as well.

Notebook Paragraph URL

  1. Go to the desired Notebook paragraph
  2. Click on the "gear"-icon in the top-right of the paragraph.
  3. Choose "Link this paragraph". This will open a new tab in your browser with the output of the Notebook paragraph.
  4. Copy the URL from the new tab. This URL can be used to create a DashHub Notebook tile (see previous section).

NB9.png

Remarks and Known Issues

Cloning a notebook will result in a copy of the notebook. The paragraphs of the copied notebook are still interlinked with the paragraphs of the original notebook. The "linked" paragraphs of both notebook may be refreshed/updated based on the other notebook resulting in undesired behaviour. It is advised to copy/paste your code manually for now.