Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[Jupyter] Make showing User Guide link optional for jupyter widget (#1559)
Qiusheng Wu089bb7a91715
diff --git a/bindings/kepler.gl-jupyter/keplergl/keplergl.py b/bindings/kepler.gl-jupyter/keplergl/keplergl.pyindex bbcae83ea..fa0b299b1 100644--- a/bindings/kepler.gl-jupyter/keplergl/keplergl.py+++ b/bindings/kepler.gl-jupyter/keplergl/keplergl.py@@ -100,8 +100,12 @@ class KeplerGl(widgets.DOMWidget):height = Int(400).tag(sync=True)def __init__(self, **kwargs):+ if 'show_docs' not in kwargs:+ kwargs['show_docs'] = True+ if kwargs['show_docs']:+ print('User Guide: {}'.format(documentation))+ kwargs.pop('show_docs')super(KeplerGl, self).__init__(**kwargs)- print('User Guide: {}'.format(documentation))@validate('data')def _validate_data(self, proposal):diff --git a/docs/keplergl-jupyter/README.md b/docs/keplergl-jupyter/README.mdindex 6d39e5858..1bb749ca0 100644--- a/docs/keplergl-jupyter/README.md+++ b/docs/keplergl-jupyter/README.md@@ -75,8 +75,13 @@ $ jupyter labextension install @jupyter-widgets/jupyterlab-manager keplergl-jupyDatasets as a dictionary, key is the name of the dataset. Read more on [Accepted data format][data_format]- __`config`__ `dict` _optional_+Map config as a dictionary. The `dataId` in the layer and filter settings should match the `name` of the dataset they are created under+ - __`show_docs`__ `bool` _optional_++ By default, the User Guide URL (<https://docs.kepler.gl/docs/keplergl-jupyter>) will be printed when a map is created. To hide the User Guide URL, set `show_docs=False`.+The following command will load kepler.gl widget below a cell.**The map object created here is `map_1` it will be used throughout the code example in this doc.**@@ -90,6 +95,7 @@ map_1![empty map][empty_map]+You can also create the map and pass in the data or data and config at the same time. Follow the instruction to [match config with data][match-config-w-data]```python