GUI

Using the GUI

Note: the GUI requires the latest release versions of panel and bokeh to be available in the current environment.

The Intake top-level singleton intake.gui gives access to a graphical data browser within the Jupyter notebook. To expose it, simply enter it into a code cell (Jupyter automatically display the last object in a code cell).

_images/gui_builtin.png

New instances of the GUI are also available by instantiating intake.GUI, where you can specify a list of catalogs to initially include.

The GUI contains three main areas:

  • a list of catalogs. The “builtin” catalog, displayed by default, includes data-sets installed in the system, the same as intake.cat.

  • a list of sources within the currently-selected catalog.

  • a description of the currently-selected source.

Catalogs

Selecting a catalog from the list will display nested catalogs below the parent and display source entries from the catalog in the list of sources.

Below the lists of catalogs is a row of buttons that are used for adding, removing and searching-within catalogs:

  • Add: opens a sub-panel for adding catalogs to the interface, by either browsing for a local YAML file or by entering a URL for a catalog, which can be a remote file or Intake server

  • Remove: deletes the currently-selected catalog from the list

  • Search: opens a sub-panel for finding entries in the currently-selected catalog (and it’s sub-catalogs)

Add Catalogs

The Add button (+) exposes a sub-panel with two main ways to add catalogs to the interface

_images/gui_add.png

This panel has a tab to load files from local from that you can navigate around the filesystem using the arrow or by editting the path directly. Use the home button to get back to the starting place. Select the catalog file you need. Use the “Add Catalog” button to add the catalog to the list above.

_images/gui_add_local.png

Another tab loads a catalog from remote. Any URL is valid here, including cloud locations, "gcs://bucket/...", and intake servers, "intake://server:port". Without a protocol specifier, this can be a local path. Again, use the “Add Catalog” button to add the catalog to the list above.

_images/gui_add_remote.png

Finally, you can add catalogs to the interface in code, using the .add() method, which can take filenames, remote URLs or existing Catalog instances.

Remove Catalogs

The Remove button (-) deletes the currently-selected catalog from the list. It is important to note that this action does not have any impact on files, it only affects what shows up in the list.

_images/gui_remove.png

Sources

Selecting a source from the list updates the description text on the left-side of the gui.

Below the list of sources is a row of buttons for inspecting the selected data source:

  • Plot: opens a sub-panel for viewing the pre-defined (specified in the yaml) plots for the selected source.

Plot

The Plot button (📊) opens a sub-panel with an area for viewing pre-defined plots.

_images/gui_plot.png

These plots are specified in the catalog yaml and that yaml can be displayed by checking the box next to “show yaml”.

_images/gui_plot_yaml.png

The holoviews object can be retrieved from the gui using intake.gui.source.plot.pane.object.

Using the Selection

Once catalogs are loaded and the desired sources has been identified and selected, the selected sources will be available at the .sources attribute (intake.gui.sources). Each source entry has informational methods available and can be opened as a data source, as with any catalog entry:

In [ ]: source_entry = intake.gui.sources[0]
        source_entry
Out   :
name: sea_ice_origin
container: dataframe
plugin: ['csv']
description: Arctic/Antarctic Sea Ice
direct_access: forbid
user_parameters: []
metadata:
args:
  urlpath: https://timeseries.weebly.com/uploads/2/1/0/8/21086414/sea_ice.csv

In [ ]: data_source = source_entry()  # may specify parameters here
        data_source.read()
Out   : < some data >

In [ ]: source_entry.plot()  # or skip data source step
Out   : < graphics>