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
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.
intake.gui
The "Add Catalog" mechanism is also exposed through the API:
intake.gui.add('./us_crime/us_crime.yaml')
Try loading remote catalogs available at:
Once you have selected from the "Sources" pane, that selection can be found at intake.gui.sources
:
intake.gui.sources
This consists of a list of regular intake data source entries. Let's look at the first one:
source = intake.gui.source_instance
source.to_dask().head()
You can also look at the GUI just for that source:
source.gui
OR you can get just one sub-panel from the gui and work with that directly:
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.
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.
us_crime = cat.gui.sources[0]
us_crime.gui
This is just a source entry that can be loaded, read, and plotted.
intake.output_notebook()
us_crime = us_crime() # load CatalogEntry into Source object
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)