## The new intake GUI - built with panel¶

It is often useful to explore catalog data using a Graphical User Interface. The previous iteration of the intake GUI was built in ipywidgets - which limited you to use from within the notebook. The new version is implemented in panel which means that in addition to rendering in the notebook - it also can easily be served and deployed as a tornado application.

NOTE: This work depends on the latest released versions of panel and bokeh

In [ ]:
import intake


The intake GUI is composed of various sub-panels that can be opened and closed using control buttons. Try clicking the + button to get started. With that pane open, navigate to a catalog of interest and click the "Add Catalog" button.

In [ ]:
intake.gui


The "Add Catalog" mechanism is also exposed through the API:

In [ ]:
intake.gui.add('./us_crime/us_crime.yaml')


Once you have selected from the "Sources" pane, that selection can be found at intake.gui.sources:

In [ ]:
intake.gui.sources


This consists of a list of regular intake data source entries. Let's look at the first one:

In [ ]:
source = intake.gui.sources[0]


You can also look at the GUI just for that source:

In [ ]:
source.gui


OR you can get just one sub-panel from the gui and work with that directly:

In [ ]:
intake.gui.source.description


You can also initialize a gui straight from a catalog to jump directly into the part of the gui that deals with selecting and viewing entries.

In [ ]:
cat = intake.open_catalog('./us_crime/us_crime.yaml')
cat.gui


The cat.gui also exposes the list of selected sources on the sources attribute.

In [ ]:
us_crime = cat.gui.sources[0]


This is just a source entry that can be loaded, read, and plotted.

In [ ]:
intake.output_notebook()

us_crime.plot.bivariate('Burglary rate', 'Property crime rate', legend=False, width=500, height=400) * \
us_crime.plot.scatter(  'Burglary rate', 'Property crime rate', color='black', size=15, legend=False) +\
us_crime.plot.table(['Burglary rate', 'Property crime rate'], width=350, height=350)


## Future Work¶

There are many plans for how this GUI could be expanded. In the near future, we anticipate adding a mechanism for inputting user parameters, adding some basic custom plotting, and allowing the editing and saving of catalogs. See GH#225 for a full discussion of the plan.