databricks_utils.vega

Description

Basic vega functions to plot vega charts in databricks or jupyter notebooks.

databricks_utils.vega.DEFAULT_VEGA_OPTS = {'actions': {'export': True, 'source': True, 'editor': False, 'renderer': 'canvas'}, 'defaultStyle': True, 'theme': 'quartz'}

Default settings for vega-embed (See https://github.com/vega/vega-embed).

databricks_utils.vega.vega_embed(spec, display=None, **kwargs)

Display a vega chart. Also return the HTML to display the vega chart.

Parameters:
  • display – Callable to render the resultant HTML (e.g. displayHTML).
  • kwargs – See https://github.com/vega/vega-embed for the vega embed settings.

Functions

vega_embed(spec[, display]) Display a vega chart.