Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[Jupyter] Publish keplergl jupyter 0.2.0 (#1110)

Shan He4b88b2678793
diff --git a/bindings/kepler.gl-jupyter/README.md b/bindings/kepler.gl-jupyter/README.md
index 33f7e7058..59a2bf2e1 100644
--- a/bindings/kepler.gl-jupyter/README.md
+++ b/bindings/kepler.gl-jupyter/README.md
@@ -30,7 +30,7 @@ If you on Mac used `pip install` and running Notebook 5.3 and above, you don't n
$ jupyter nbextension enable --py --sys-prefix keplergl # can be skipped for notebook 5.3 and above
-If you arr in JupyterLab, you will also need to install the JupyterLab extension. This require [node](https://nodejs.org/en/download/package-manager/#macos) `> 8.15.0`
+If you are in JupyterLab, you will also need to install the JupyterLab extension. This require [node](https://nodejs.org/en/download/package-manager/#macos) `> 8.15.0`
If you use [Homebrew](https://brew.sh/) on Mac:
@@ -43,7 +43,7 @@ Then install jupyter labextension.
**Prerequisites for JupyterLab:**
- Node > 8.15.0
- Python 3
-- JupyterLab>=1.0.0
+- JupyterLab >=1.0.0 || >=2.0.0
## Quick Start
@@ -81,24 +81,25 @@ map_1.save_to_html(file_name='keplergl_map.html')
- [GeoDataFrame](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/GeoDataFrame.ipynb): Load GeoDataFrame to kepler.gl
+https://docs.kepler.gl/docs/keplergl-jupyter#1-load-keplergl-map
## Usage
- - [1. Load kepler.gl](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#1-load-keplergl)
- - [`keplergl.KeplerGl()`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#keplerglkeplergl)
- - [2. Add Data](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#2-add-data)
- - [`.add_data()`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#add_data)
- - [`.data`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#data)
- - [3. Data Format](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#3-data-format)
- - [`CSV`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#csv)
- - [`GeoJSON`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#geojson)
- - [`DataFrame`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#dataframe)
- - [`GeoDataFrame`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#geodataframe)
- - [`WKT`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#wkt)
- - [4. Customize the map](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#4-customize-the-map)
- - [5. Save and load config](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#5-save-and-load-config)
- - [`.config`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#config)
- - [6. Match config with data](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#6-match-config-with-data)
- - [7. Save Map](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#7-save-map)
- - [`.save_to_html()`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#save_to_html)
+ - [1. Load kepler.gl](https://docs.kepler.gl/docs/keplergl-jupyter#1-load-keplergl-map)
+ - [`keplergl.KeplerGl()`](https://docs.kepler.gl/docs/keplergl-jupyter#keplergl)
+ - [2. Add Data](https://docs.kepler.gl/docs/keplergl-jupyter#2-add-data)
+ - [`.add_data()`](https://docs.kepler.gl/docs/keplergl-jupyter#add_data)
+ - [`.data`](https://docs.kepler.gl/docs/keplergl-jupyter#data)
+ - [3. Data Format](https://docs.kepler.gl/docs/keplergl-jupyter#3-data-format)
+ - [`CSV`](https://docs.kepler.gl/docs/keplergl-jupyter#csv)
+ - [`GeoJSON`](https://docs.kepler.gl/docs/keplergl-jupyter#geojson)
+ - [`DataFrame`](https://docs.kepler.gl/docs/keplergl-jupyter#dataframe)
+ - [`GeoDataFrame`](https://docs.kepler.gl/docs/keplergl-jupyter#geodataframe)
+ - [`WKT`](https://docs.kepler.gl/docs/keplergl-jupyter#wkt)
+ - [4. Customize the map](https://docs.kepler.gl/docs/keplergl-jupyter#4-customize-the-map)
+ - [5. Save and load config](https://docs.kepler.gl/docs/keplergl-jupyter#5-save-and-load-config)
+ - [`.config`](https://docs.kepler.gl/docs/keplergl-jupyter#config)
+ - [6. Match config with data](https://docs.kepler.gl/docs/keplergl-jupyter#6-match-config-with-data)
+ - [7. Save Map](https://docs.kepler.gl/docs/keplergl-jupyter#7-save-map)
+ - [`.save_to_html()`](https://docs.kepler.gl/docs/keplergl-jupyter#save_to_html)
## Local Development Setup
@@ -175,65 +176,6 @@ This command must be run **AFTER** the `js` setup, and folder `static/` was crea
You can now start editing the .js and .py files to see changes reflected in your local notebook. After changing files in the js folder, the local start script will recompile the js files and put them in to `keplergl/static` folder. You need to reload the jupyter notebook page to reload the files.
-## FAQ & Troubleshoot
-
-#### 1. What about windows?
-keplergl is currently only published to PyPI, and unfortunately I use a Mac. If you encounter errors installing it on windows. [This issue](https://github.com/keplergl/kepler.gl/issues/557) might shed some light. Follow this issue for [conda](https://github.com/keplergl/kepler.gl/issues/646) support.
-
-#### 2. Install keplergl-jupyter on Jupyter Lab failed?
-
-Make sure you are using node 8.15.0. and you have installed `@jupyter-widgets/jupyterlab-manager`. Depends on your JupyterLab version. You might need to install the specific version of [jupyterlab-manager](https://github.com/jupyter-widgets/ipywidgets/tree/master/packages/jupyterlab-manager). with `jupyter labextension install @jupyter-widgets/[email protected]`. When use it in Jupyter lab, keplergl is only supported in JupyterLab > 1.0 and Python 3.
-
-Run `jupyter labextension install keplergl-jupyter --debug` and copy console output before creating an issue.
-
-If you are running `install` and `uninstall` several times. You should run.
-
-```
-jupyter lab clean
-jupyter lab build
-```
-
-#### 2.1 JavaScript heap out of memory when installing lab extension
-If you see this error during install labextension
-
-```bash
-$ FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
-```
-
-run
-
-```bash
-$ export NODE_OPTIONS=--max-old-space-size=4096
-```
-
-#### 3. Is my lab extension successfully installed?
-Run `jupyter labextension list` You should see below. (Version may vary)
-
-```bash
-JupyterLab v1.1.4
-Known labextensions:
- app dir: /Users/xxx/jupyter-python3/ENV3/share/jupyter/lab
- @jupyter-widgets/jupyterlab-manager v1.0.2 enabled OK
- keplergl-jupyter v0.1.0 enabled OK
-```
-
-#### 4. What's your python and node env
-
-Python
-```text
-python==3.7.4
-notebook==6.0.1
-jupyterlab==1.1.4
-ipywidgets==7.5.1
-```
-
-Node (Only for JupyterLab)
-
-```text
-node==8.15.0
-yarn==1.7.0
-```
-
[jupyter_widget]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_widget.png
[empty_map]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_empty_map.png
[geodataframe_map]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_geodataframe.png
diff --git a/bindings/kepler.gl-jupyter/RELEASE.md b/bindings/kepler.gl-jupyter/RELEASE.md
index bb093026e..f2b0a5106 100644
--- a/bindings/kepler.gl-jupyter/RELEASE.md
+++ b/bindings/kepler.gl-jupyter/RELEASE.md
@@ -3,7 +3,8 @@
## Release a new version
To release a new version. You need publish both the js module in NPM and the python module on PyPI.
-Version number of the js module **`kelergl-jupyter`** and the python module **`keplergl`** should match
+
+__Version number of the js module **`kelergl-jupyter`** and the python module **`keplergl`** should match__
### To release a new version of keplergl-jupyter on NPM:
@@ -17,7 +18,7 @@ npm publish
### To release a new version of keplergl on PyPI:
-- Update version number in keplergl/_version.py. in bindings/kepler.gl-jupyter folder.
+- Update `version_info` in keplergl/_version.py. in bindings/kepler.gl-jupyter folder. Update `EXTENSION_SPEC_VERSION` to match the js module version
```
git add keplergl/_version.py
diff --git a/bindings/kepler.gl-jupyter/js/README.md b/bindings/kepler.gl-jupyter/js/README.md
index c0cb61dbb..6aba92398 100644
--- a/bindings/kepler.gl-jupyter/js/README.md
+++ b/bindings/kepler.gl-jupyter/js/README.md
@@ -2,7 +2,7 @@
This is a simple jupyter widget for kepler.gl, an advanced geospatial visualization tool, to render large-scale interactive maps.
-Package Install
+## Package Install
---------------
**Prerequisites**
@@ -11,4 +11,52 @@ Package Install
**More links**
- [Jupyter Widget](https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Custom.html)
-- [First Widget](https://github.com/ocoudray/first-widget)
+- [Widget Cookiecutter](https://github.com/jupyter-widgets/widget-cookiecutter)
+
+## Local Dev
+---------------
+
+### Local Dev Installation for Classic Notebook
+
+To develop this package against the classic notebook, run:
+
+- `pip install -e .` (installs python package for development, runs `npm install` and `npm run build`)
+- `jupyter nbextension install --py --symlink --sys-prefix <python_package_name>`\
+(symlinks `static/` directory into `<jupyter path>/nbextensions/<extension_name>/`). Now the notebook has access to the frontend code.
+- `jupyter nbextension enable --py --sys-prefix <python_package_name>`\
+(copies `<npm_package_name>.json` into `<environment path>/etc/jupyter/nbconfig/notebook.d/` directory). Now the notebook will load your frontend code on page load.
+
+Now make some changes to your source code. Then:
+
+- After making Python code changes, restarting the notebook kernel will be enough to reflect changes
+- After making JavaScript code changes:
+ - `cd js`
+ - `npm run build`
+ - Refresh browser to reflect changes
+
+### Local Dev Installation for JupyterLab
+
+To develop this package against JupyterLab, run:
+
+- `pip install -e .` (installs python package for development, runs `npm install` and `npm run build`)
+- `jupyter labextension install @jupyter-widgets/jupyterlab-manager`: this install lab widgets manager.
+- `jupyter labextension install js`: this installs the current labextension into JupyterLab and enables it.
+- `jupyter lab --watch` starts JupyterLab, but in `--watch` mode: it will rebuild itself incrementally if it detects changes.
+
+Now make some changes to your source code. Then:
+
+- After making Python code changes, restarting the notebook kernel will be enough to reflect changes
+- After making JavaScript code changes:
+ - `cd js`
+ - `npm run build:lab`
+ - Refresh browser to reflect changes
+
+- By default, the application will load from the JupyterLab staging directory (default is <sys-prefix>/share/jupyter/lab/staging. Check the correct version of `@jupyter-widgets/jupyterlab-manager` and `@jupyter-widgets/base` is install in `yarn.lock`
+
+#### JupyterLab widget Dependencies
+
+Install correct version of jupyterlab-manager based on your Jupyter Lab version. Make sure `@jupyter-widgets/base` version in the widget does not conflict with requirements in `jupyterlab-manager`.
+
+- [@jupyter-widgets/jupyterlab-manager](https://github.com/jupyter-widgets/ipywidgets/tree/master/packages/jupyterlab-manager)
+- [@jupyter-widgets/base](https://github.com/jupyter-widgets/ipywidgets/tree/master/packages/base)
+- [@jupyter-widgets/base-manager](https://github.com/jupyter-widgets/ipywidgets/tree/master/packages/base-manager)
\ No newline at end of file
diff --git a/bindings/kepler.gl-jupyter/js/babel.config.js b/bindings/kepler.gl-jupyter/js/babel.config.js
index 3905ac413..96f95c9a0 100644
--- a/bindings/kepler.gl-jupyter/js/babel.config.js
+++ b/bindings/kepler.gl-jupyter/js/babel.config.js
@@ -26,33 +26,7 @@ module.exports = function babel(api) {
const presets = ['@babel/preset-env', '@babel/preset-react'];
const plugins = [
'@babel/plugin-proposal-class-properties',
- [
- '@babel/transform-runtime',
- {
- regenerator: true
- }
- ],
- '@babel/plugin-syntax-dynamic-import',
- '@babel/plugin-syntax-import-meta',
- '@babel/plugin-proposal-json-strings',
- '@babel/plugin-proposal-function-sent',
- '@babel/plugin-proposal-export-namespace-from',
- '@babel/plugin-proposal-numeric-separator',
- '@babel/plugin-proposal-throw-expressions',
- '@babel/plugin-proposal-export-default-from',
- '@babel/plugin-proposal-logical-assignment-operators',
- '@babel/plugin-proposal-optional-chaining',
- [
- '@babel/plugin-proposal-pipeline-operator',
- {
- proposal: 'minimal'
- }
- ],
- '@babel/plugin-transform-react-jsx',
'transform-inline-environment-variables',
- '@babel/plugin-proposal-nullish-coalescing-operator',
- '@babel/plugin-proposal-do-expressions',
- '@babel/plugin-proposal-function-bind',
[
'search-and-replace',
{
diff --git a/bindings/kepler.gl-jupyter/js/lib/keplergl/components/app.js b/bindings/kepler.gl-jupyter/js/lib/keplergl/components/app.js
index e0e0f6b1b..8552111e1 100644
--- a/bindings/kepler.gl-jupyter/js/lib/keplergl/components/app.js
+++ b/bindings/kepler.gl-jupyter/js/lib/keplergl/components/app.js
@@ -19,6 +19,7 @@
// THE SOFTWARE.
import React, {useEffect, useState, useRef} from 'react';
+import styled from 'styled-components';
const ReactHelmet = require('react-helmet');
const Helmet = ReactHelmet ? ReactHelmet.Helmet : null;
@@ -26,12 +27,14 @@ import {
SidebarFactory,
AddDataButtonFactory,
PanelHeaderFactory,
+ CustomPanelsFactory,
injectComponents
} from 'kepler.gl/components';
import CustomPanelHeaderFactory from './panel-header';
import CustomSidebarFactory from './side-bar';
-export const KEPLER_GL_JUPYTER_VERSION = "__PACKAGE_VERSION__";
+import CustomCustomPanelsFactory from './config-panel';
+export const KEPLER_GL_JUPYTER_VERSION = '__PACKAGE_VERSION__';
const CustomAddDataButtonFactory = () => {
const CustomAddDataButton = () => <div />;
@@ -41,13 +44,27 @@ const CustomAddDataButtonFactory = () => {
const KeplerGl = injectComponents([
[AddDataButtonFactory, CustomAddDataButtonFactory],
[SidebarFactory, CustomSidebarFactory],
- [PanelHeaderFactory, CustomPanelHeaderFactory]
+ [PanelHeaderFactory, CustomPanelHeaderFactory],
+ [CustomPanelsFactory, CustomCustomPanelsFactory]
]);
const MAPBOX_TOKEN = process.env.MapboxAccessTokenJupyter; // eslint-disable-line
-function App() {
+const StyledContainer = styled.div`
+ width: 100%;
+ height: 100%;
+ .kepler-gl .ReactModal__Overlay.ReactModal__Overlay--after-open {
+ position: absolute !important;
+ }
+
+ .kepler-gl .side-panel__content > div {
+ display: flex;
+ height: 100%;
+ flex-direction: column;
+ }
+`;
+function App() {
const rootElm = useRef(null);
const [windowDimension, setDimension] = useState({});
@@ -76,8 +93,7 @@ function App() {
}, []);
return (
- <div
- style={{width: '100%', height: `100%`}}
+ <StyledContainer
ref={rootElm}
className="keplergl-widget-container"
>
@@ -109,23 +125,15 @@ function App() {
body {
margin: 0; padding: 0;
}
- .kepler-gl .ReactModal__Overlay.ReactModal__Overlay--after-open {
- position: absolute !important;
- }
-
.jupyter-widgets.keplergl-jupyter-widgets {
overflow: hidden;
}
-
.p-Widget.p-Panel.jp-OutputArea-output.jupyter-widgets {
overflow: hidden
}
`}
</style>
- <script
- async
- src="https://www.googletagmanager.com/gtag/js?id=UA-64694404-19"
- />
+ <script async src="https://www.googletagmanager.com/gtag/js?id=UA-64694404-19" />
<script>{`window.dataLayer=window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-64694404-19', {page_path: '/keplergl-jupyter-widget'});`}</script>
</Helmet>
) : null}
@@ -137,7 +145,7 @@ function App() {
version={KEPLER_GL_JUPYTER_VERSION}
getMapboxRef={handleResize}
/>
- </div>
+ </StyledContainer>
);
}
diff --git a/bindings/kepler.gl-jupyter/js/lib/keplergl/components/panel-header.js b/bindings/kepler.gl-jupyter/js/lib/keplergl/components/panel-header.js
index 43229bfde..3cdd80b1e 100644
--- a/bindings/kepler.gl-jupyter/js/lib/keplergl/components/panel-header.js
+++ b/bindings/kepler.gl-jupyter/js/lib/keplergl/components/panel-header.js
@@ -18,28 +18,35 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-import {PanelHeaderFactory, Icons} from 'kepler.gl/components';
+import {PanelHeaderFactory, Icons, withState} from 'kepler.gl/components';
+import {toggleModal} from 'kepler.gl/actions';
+import React from 'react';
+import {IntlProvider} from 'react-intl';
const KEPLER_DOC = 'https://docs.kepler.gl/docs/keplergl-jupyter';
export function CustomPanelHeaderFactory() {
const PanelHeader = PanelHeaderFactory();
- PanelHeader.defaultProps = {
- ...PanelHeader.defaultProps,
- actionItems: [
- {
- id: 'docs',
- label: 'Docs',
- iconComponent: Icons.Docs,
- href: KEPLER_DOC,
- blank: true,
- tooltip: 'Documentation',
- onClick: () => {}
- }
- ]
- };
- return PanelHeader;
+ const actionItems = props => [
+ {
+ id: 'docs',
+ iconComponent: Icons.Docs,
+ href: KEPLER_DOC,
+ blank: true,
+ tooltip: 'tooltip.documentation',
+ onClick: () => {}
+ }
+ ];
+
+ const JupyterPanelHeader = props => (
+ <IntlProvider locale="en" messages={{'tooltip.documentation': 'Documentation'}}>
+ <PanelHeader {...props} actionItems={actionItems(props)} />
+ </IntlProvider>
+ );
+ return withState([], state => state, {
+ toggleModal
+ })(JupyterPanelHeader);
}
export default CustomPanelHeaderFactory;
diff --git a/bindings/kepler.gl-jupyter/js/lib/keplergl/store.js b/bindings/kepler.gl-jupyter/js/lib/keplergl/store.js
index 6d1c5c970..3a770eb3e 100644
--- a/bindings/kepler.gl-jupyter/js/lib/keplergl/store.js
+++ b/bindings/kepler.gl-jupyter/js/lib/keplergl/store.js
@@ -23,7 +23,7 @@ import {combineReducers} from 'redux';
import {keplerGlReducer} from 'kepler.gl/reducers';
// TODO: remove this after added middleware to files
-import {enhanceReduxMiddleware} from 'kepler.gl/dist/middleware';
+import {enhanceReduxMiddleware} from 'kepler.gl/middleware';
const customizedKeplerGlReducer = keplerGlReducer.initialState({
uiState: {
diff --git a/bindings/kepler.gl-jupyter/js/package.json b/bindings/kepler.gl-jupyter/js/package.json
index 557c62ae9..553722373 100644
--- a/bindings/kepler.gl-jupyter/js/package.json
+++ b/bindings/kepler.gl-jupyter/js/package.json
@@ -1,15 +1,10 @@
{
"name": "keplergl-jupyter",
- "version": "0.1.2",
+ "version": "0.2.0",
"description": "This is a simple jupyter widget for kepler.gl, an advanced geo-spatial visualization tool, to render large-scale interactive maps.",
"author": "Shan He",
"license": "MIT",
"main": "babel/index.js",
- "engines": {
- "node": ">=8.15.0",
- "npm": ">=6.1.0",
- "yarn": ">=1.6.0"
- },
"repository": {
"type": "git",
"url": "https://github.com/keplergl/kepler.gl.git"
@@ -31,9 +26,7 @@
"start": "NODE_ENV=development webpack --config ./webpack/dev.js --mode development --watch --progress",
"clean": "rimraf dist/ && rimraf ../keplergl/static/",
"cleanall": "npm run clean && rimraf node_modules/",
- "check-licence": "uber-licence --dry",
- "add-licence": "uber-licence",
- "prepublish": "uber-licence && yarn build && yarn build:lab",
+ "prepublish": "yarn build && yarn build:lab",
"build": "npm run clean && webpack --config ./webpack/build.js",
"build:lab": "rimraf babel/ && mkdir babel && babel lib --out-dir babel",
"test": "echo \"Error: no test specified\" && exit 1",
@@ -44,32 +37,11 @@
"@babel/cli": "7.4.4",
"@babel/core": "7.4.5",
"@babel/plugin-proposal-class-properties": "^7.3.0",
- "@babel/plugin-proposal-decorators": "^7.3.0",
- "@babel/plugin-proposal-do-expressions": "^7.0.0",
- "@babel/plugin-proposal-export-default-from": "^7.0.0",
- "@babel/plugin-proposal-export-namespace-from": "^7.2.0",
- "@babel/plugin-proposal-function-bind": "^7.0.0",
- "@babel/plugin-proposal-function-sent": "^7.0.0",
- "@babel/plugin-proposal-json-strings": "^7.0.0",
- "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
- "@babel/plugin-proposal-numeric-separator": "^7.0.0",
- "@babel/plugin-proposal-optional-chaining": "^7.0.0",
- "@babel/plugin-proposal-pipeline-operator": "^7.0.0",
- "@babel/plugin-proposal-throw-expressions": "^7.0.0",
- "@babel/plugin-syntax-dynamic-import": "^7.0.0",
- "@babel/plugin-syntax-import-meta": "^7.0.0",
- "@babel/plugin-transform-modules-commonjs": "^7.2.0",
- "@babel/plugin-transform-react-jsx": "7.3.0",
- "@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"babel-eslint": "^9.0.0",
"babel-loader": "^8.0.0",
- "babel-plugin-inline-json-import": "^0.2.1",
- "babel-plugin-module-resolver": "^3.0.0",
"babel-plugin-search-and-replace": "^1.0.0",
- "babel-plugin-transform-builtin-extend": "^1.1.0",
"babel-plugin-transform-inline-environment-variables": "0.4.3",
"eslint": "^5.12.1",
"eslint-config-prettier": "^3.6.0",
@@ -78,10 +50,8 @@
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "~7.12.4",
- "html-webpack-exclude-assets-plugin": "^0.0.7",
- "html-webpack-inline-source-plugin": "^0.0.10",
- "html-webpack-plugin": "^3.2.0",
- "json-loader": "^0.5.7",
+ "html-webpack-plugin": "^4.3.0",
+ "react-dev-utils": "^10.2.1",
"rimraf": "^2.6.1",
"webpack": "^4.29.0",
"webpack-cli": "^3.2.3",
@@ -91,17 +61,18 @@
"webpack-stats-plugin": "^0.2.1"
},
"dependencies": {
- "@jupyter-widgets/base": "^1.1.10 || ^2",
+ "@jupyter-widgets/base": "^1.1.10 || ^2.0.0 || ^3.0.0",
"global": "^4.3.0",
- "kepler.gl": "^1.1.9",
+ "kepler.gl": "^2.2.0",
"react": "^16.8.4",
+ "react-copy-to-clipboard": "^5.0.2",
"react-dom": "^16.8.4",
"react-helmet": "^5.2.0",
- "react-redux": "^5.1.1",
+ "react-intl": "^3.12.0",
+ "react-redux": "^7.1.3",
"redux": "^3.7.2",
"redux-actions": "^2.2.1",
- "styled-components": "^4.1.3",
- "uber-licence": "^3.1.1"
+ "styled-components": "^4.1.3"
},
"jupyterlab": {
"extension": "babel/labplugin"
diff --git a/bindings/kepler.gl-jupyter/js/webpack/build-html.js b/bindings/kepler.gl-jupyter/js/webpack/build-html.js
index 03760c4b4..815130888 100644
--- a/bindings/kepler.gl-jupyter/js/webpack/build-html.js
+++ b/bindings/kepler.gl-jupyter/js/webpack/build-html.js
@@ -20,8 +20,7 @@
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
-const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
-const HtmlWebpackExcludeAssetsPlugin = require('html-webpack-exclude-assets-plugin');
+const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
const packageJson = require('../package.json');
const {dependencies} = packageJson;
@@ -38,24 +37,26 @@ const VERSIONS = {
reactDom:clearCarats(dependencies['react-dom']),
redux: clearCarats(dependencies.redux),
reactRedux: clearCarats(dependencies['react-redux']),
+ reactIntl: clearCarats(dependencies['react-intl']),
+ reactCopyToClipboard: clearCarats(dependencies['react-copy-to-clipboard']),
styledComponents: clearCarats(dependencies['styled-components']),
keplergl: clearCarats(dependencies['kepler.gl'])
}
-const MAPBOX_TOKEN = process.env.MapboxAccessTokenJupyter; // eslint-disable-line
-
const externals = [
{react: 'React'},
{'react-dom': 'ReactDOM'},
{redux: 'Redux'},
{'react-redux': 'ReactRedux'},
+ {'react-intl': 'ReactIntl'},
+ {'react-copy-to-clipboard': 'CopyToClipboard'},
{'styled-components': 'styled'},
{'kepler.gl/reducers': 'KeplerGl'},
{'kepler.gl/components': 'KeplerGl'},
{'kepler.gl/actions': 'KeplerGl'},
{'kepler.gl/processors': 'KeplerGl'},
{'kepler.gl/schemas': 'KeplerGl'},
- {'kepler.gl/dist/middleware': 'KeplerGl'},
+ {'kepler.gl/middleware': 'KeplerGl'},
{'react-helmet': 'Helmet'}
].reduce((accu, ext) => ({
...accu,
@@ -79,7 +80,6 @@ module.exports = (rules, plugins) => ({
module: {
rules
},
-
plugins: [
// ...webpackConfig.plugins,
// new webpack.optimize.UglifyJsPlugin({sourceMap: true, compressor: {comparisons: false, warnings: false}}),
@@ -88,7 +88,7 @@ module.exports = (rules, plugins) => ({
template,
appMountId: 'app-content',
filename: 'keplergl.html',
- inlineSource: '.(js|css)$',
+ inject: true,
links: [
'http://d1a3f4spazzrp4.cloudfront.net/kepler.gl/uber-fonts/4.0.0/superfine.css',
'https://api.tiles.mapbox.com/mapbox-gl-js/v1.1.1/mapbox-gl.css'
@@ -99,6 +99,9 @@ module.exports = (rules, plugins) => ({
`https://unpkg.com/react-dom@${VERSIONS.reactDom}/umd/react-dom.production.min.js`,
`https://unpkg.com/redux@${VERSIONS.redux}/dist/redux.js`,
`https://unpkg.com/react-redux@${VERSIONS.reactRedux}/dist/react-redux.min.js`,
+ `https://unpkg.com/react-intl@${VERSIONS.reactIntl}/dist/react-intl.min.js`,
+ `https://unpkg.com/react-copy-to-clipboard@${VERSIONS.reactCopyToClipboard}/build/react-copy-to-clipboard.min.js`,
+
`https://unpkg.com/styled-components@${VERSIONS.styledComponents}/dist/styled-components.min.js`,
// load kepler.gl last
@@ -106,8 +109,7 @@ module.exports = (rules, plugins) => ({
],
title: 'Kepler.gl'
}),
- new HtmlWebpackExcludeAssetsPlugin(),
- new HtmlWebpackInlineSourcePlugin()
+ new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/main/])
],
node: {
diff --git a/bindings/kepler.gl-jupyter/js/webpack/config.js b/bindings/kepler.gl-jupyter/js/webpack/config.js
index 95d9f656d..e61e014d2 100644
--- a/bindings/kepler.gl-jupyter/js/webpack/config.js
+++ b/bindings/kepler.gl-jupyter/js/webpack/config.js
@@ -90,6 +90,20 @@ module.exports = {
html: buildHtml(rules, plugins),
umd: {
+ // Embeddable {{ cookiecutter.npm_package_name }} bundle
+
+ // This bundle is generally almost identical to the notebook bundle
+ // containing the custom widget views and models.
+
+ // The only difference is in the configuration of the webpack public path
+ // for the static assets.
+
+ // It will be automatically distributed by unpkg to work with the static
+ // widget embedder.
+
+ // The target bundle is always `dist/index.js`, which is the path required
+ // by the custom widget embedder.
+
entry: path.resolve(__dirname, '../lib/embed.js'),
output: {
filename: 'index.js',
diff --git a/bindings/kepler.gl-jupyter/keplergl/_version.py b/bindings/kepler.gl-jupyter/keplergl/_version.py
index 26654e2fa..5a5e7f5ff 100644
--- a/bindings/kepler.gl-jupyter/keplergl/_version.py
+++ b/bindings/kepler.gl-jupyter/keplergl/_version.py
@@ -1,6 +1,15 @@
-version_info = (0, 1, 2, 'final', 0)
+version_info = (0, 2, 0, 'final', 0)
_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''}
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
'' if version_info[3]=='final' else '-' + _specifier_[version_info[3]]+str(version_info[4]))
+# The version of the attribute spec that this package
+# implements. This is the value used in
+# _model_module_version/_view_module_version.
+#
+# Update this value when attributes are added/removed from
+# the widget models, or if the serialized format changes.
+#
+# The major version needs to match that of the JS package.
+EXTENSION_SPEC_VERSION = '^0.2.0'
\ No newline at end of file
diff --git a/bindings/kepler.gl-jupyter/keplergl/keplergl.py b/bindings/kepler.gl-jupyter/keplergl/keplergl.py
index c822728fd..b5ef3471a 100644
--- a/bindings/kepler.gl-jupyter/keplergl/keplergl.py
+++ b/bindings/kepler.gl-jupyter/keplergl/keplergl.py
@@ -5,8 +5,9 @@ import pandas as pd
import geopandas
import shapely.wkt
import json
+from ._version import EXTENSION_SPEC_VERSION
-documentation = 'https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md'
+documentation = 'https://docs.kepler.gl/docs/keplergl-jupyter'
def _df_to_dict(df):
''' Create an input dict for Kepler.gl using a DataFrame object
@@ -86,8 +87,8 @@ class KeplerGl(widgets.DOMWidget):
_model_name = Unicode('KeplerGlModal').tag(sync=True)
_view_module = Unicode('keplergl-jupyter').tag(sync=True)
_model_module = Unicode('keplergl-jupyter').tag(sync=True)
- _view_module_version = Unicode('^0.1.0').tag(sync=True)
- _model_module_version = Unicode('^0.1.0').tag(sync=True)
+ _view_module_version = Unicode(EXTENSION_SPEC_VERSION).tag(sync=True)
+ _model_module_version = Unicode(EXTENSION_SPEC_VERSION).tag(sync=True)
value = Unicode('Hello World!').tag(sync=True)
data = Dict({}).tag(sync=True, **data_serialization)
diff --git a/bindings/kepler.gl-jupyter/notebooks/DataFrame.ipynb b/bindings/kepler.gl-jupyter/notebooks/DataFrame.ipynb
index 3fa602b9c..926d77ca0 100644
--- a/bindings/kepler.gl-jupyter/notebooks/DataFrame.ipynb
+++ b/bindings/kepler.gl-jupyter/notebooks/DataFrame.ipynb
@@ -26,7 +26,7 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": 17,
"metadata": {},
"outputs": [
{
@@ -39,12 +39,13 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "9405b28613574a77a3cfd32aec2ff563",
+ "model_id": "eb3c2a2dc96e4c7cb8fa76450aaef398",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
- "KeplerGl()"
+ "KeplerGl(data={'data_1': City Country Latitude Longitude Time\n",
+ "0 Buenos Aires Ar…"
]
},
"metadata": {},
@@ -53,45 +54,45 @@
],
"source": [
"import keplergl\n",
- "w1 = keplergl.KeplerGl()\n",
+ "w1 = keplergl.KeplerGl(height=600, data={'data_1': df})\n",
"w1"
]
},
{
"cell_type": "code",
- "execution_count": 20,
+ "execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "Map saved to keplergl_map_time_test_1.html!\n"
+ "Map saved to keplergl_map.html!\n"
]
}
],
"source": [
- "w1.save_to_html(file_name='keplergl_map_time_test_1.html')"
+ "w1.save_to_html(file_name='keplergl_map.html')"
]
}
],
"metadata": {
"kernelspec": {
- "display_name": "Python 2",
+ "display_name": "Python 3",
"language": "python",
- "name": "python2"
+ "name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
- "version": 2
+ "version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.16"
+ "pygments_lexer": "ipython3",
+ "version": "3.7.4"
}
},
"nbformat": 4,
diff --git a/bindings/kepler.gl-jupyter/notebooks/Load kepler.gl.ipynb b/bindings/kepler.gl-jupyter/notebooks/Load kepler.gl.ipynb
index 30f56d96e..8b945641b 100644
--- a/bindings/kepler.gl-jupyter/notebooks/Load kepler.gl.ipynb
+++ b/bindings/kepler.gl-jupyter/notebooks/Load kepler.gl.ipynb
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
@@ -12,7 +12,7 @@
},
{
"cell_type": "code",
- "execution_count": 19,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -25,7 +25,7 @@
},
{
"cell_type": "code",
- "execution_count": 20,
+ "execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
@@ -35,27 +35,25 @@
},
{
"cell_type": "code",
- "execution_count": 24,
- "metadata": {
- "scrolled": false
- },
+ "execution_count": 15,
+ "metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "User Guide: https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md\n"
+ "User Guide: https://docs.kepler.gl/docs/keplergl-jupyter\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "f7b4dcebf5a44c0f99c3ba0eb9bd51b7",
+ "model_id": "9e0f00c6d3da4481a3e85c5d60569895",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
- "KeplerGl(height=500)"
+ "KeplerGl(config={'version': 'v1', 'config': {'visState': {'layers': [{'type': 'hexagonId', 'visualChannels': {…"
]
},
"metadata": {},
@@ -64,14 +62,14 @@
],
"source": [
"import keplergl\n",
- "# w1 = keplergl.KeplerGl(height=500, data={\"data_1\": df}, config=config)\n",
- "w1 = keplergl.KeplerGl(height=500)\n",
+ "w1 = keplergl.KeplerGl(height=500, data={\"data_1\": df}, config=config)\n",
+ "# w1 = keplergl.KeplerGl(height=500)\n",
"w1"
]
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": null,
"metadata": {
"scrolled": true
},
@@ -82,160 +80,18 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": null,
"metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "{u'config': {u'mapState': {u'bearing': 0,\n",
- " u'dragRotate': False,\n",
- " u'isSplit': False,\n",
- " u'latitude': 37.75743847960321,\n",
- " u'longitude': -122.42932933908239,\n",
- " u'pitch': 0,\n",
- " u'zoom': 13},\n",
- " u'mapStyle': {u'mapStyles': {},\n",
- " u'styleType': u'dark',\n",
- " u'topLayerGroups': {},\n",
- " u'visibleLayerGroups': {u'3d building': False,\n",
- " u'border': False,\n",
- " u'building': True,\n",
- " u'label': True,\n",
- " u'land': True,\n",
- " u'road': True,\n",
- " u'water': True}},\n",
- " u'visState': {u'filters': [],\n",
- " u'interactionConfig': {u'brush': {u'enabled': False, u'size': 0.5},\n",
- " u'tooltip': {u'enabled': True,\n",
- " u'fieldsToShow': {u'data_1': [u'hex_id',\n",
- " u'value',\n",
- " u'is_true',\n",
- " u'float_value',\n",
- " u'empty']}}},\n",
- " u'layerBlending': u'normal',\n",
- " u'layers': [{u'config': {u'color': [18, 147, 154],\n",
- " u'columns': {u'hex_id': u'hex_id'},\n",
- " u'dataId': u'data_1',\n",
- " u'isVisible': True,\n",
- " u'label': u'H3 Hexagon',\n",
- " u'textLabel': [{u'alignment': u'center',\n",
- " u'anchor': u'start',\n",
- " u'color': [255, 255, 255],\n",
- " u'field': None,\n",
- " u'offset': [0, 0],\n",
- " u'size': 18}],\n",
- " u'visConfig': {u'colorRange': {u'category': u'Uber',\n",
- " u'colors': [u'#5A1846',\n",
- " u'#900C3F',\n",
- " u'#C70039',\n",
- " u'#E3611C',\n",
- " u'#F1920E',\n",
- " u'#FFC300'],\n",
- " u'name': u'Global Warming',\n",
- " u'type': u'sequential'},\n",
- " u'coverage': 1,\n",
- " u'coverageRange': [0, 1],\n",
- " u'elevationScale': 5,\n",
- " u'opacity': 0.8,\n",
- " u'sizeRange': [0, 500]}},\n",
- " u'id': u'iw33pyc',\n",
- " u'type': u'hexagonId',\n",
- " u'visualChannels': {u'colorField': None,\n",
- " u'colorScale': u'quantile',\n",
- " u'coverageField': None,\n",
- " u'coverageScale': u'linear',\n",
- " u'sizeField': None,\n",
- " u'sizeScale': u'linear'}}],\n",
- " u'splitMaps': []}},\n",
- " u'version': u'v1'}"
- ]
- },
- "execution_count": 10,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
"w1.config"
]
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": null,
"metadata": {},
- "outputs": [
- {
- "data": {
- "text/plain": [
- "{u'config': {u'mapState': {u'bearing': 2.6192893401015205,\n",
- " u'dragRotate': True,\n",
- " u'isSplit': False,\n",
- " u'latitude': 37.74811896445197,\n",
- " u'longitude': -122.42145333304356,\n",
- " u'pitch': 37.374216241015446,\n",
- " u'zoom': 12.311625687559559},\n",
- " u'mapStyle': {u'mapStyles': {},\n",
- " u'styleType': u'dark',\n",
- " u'topLayerGroups': {},\n",
- " u'visibleLayerGroups': {u'3d building': False,\n",
- " u'border': False,\n",
- " u'building': True,\n",
- " u'label': True,\n",
- " u'land': True,\n",
- " u'road': True,\n",
- " u'water': True}},\n",
- " u'visState': {u'filters': [],\n",
- " u'interactionConfig': {u'brush': {u'enabled': False, u'size': 0.5},\n",
- " u'tooltip': {u'enabled': True,\n",
- " u'fieldsToShow': {u'data_1': [u'hex_id', u'value']}}},\n",
- " u'layerBlending': u'normal',\n",
- " u'layers': [{u'config': {u'color': [250, 116, 0],\n",
- " u'columns': {u'hex_id': u'hex_id'},\n",
- " u'dataId': u'data_1',\n",
- " u'isVisible': True,\n",
- " u'label': u'H3 Hexagon',\n",
- " u'textLabel': [{u'alignment': u'center',\n",
- " u'anchor': u'middle',\n",
- " u'color': [255, 255, 255],\n",
- " u'field': None,\n",
- " u'offset': [0, 0],\n",
- " u'size': 50}],\n",
- " u'visConfig': {u'colorRange': {u'category': u'Uber',\n",
- " u'colors': [u'#194266',\n",
- " u'#355C7D',\n",
- " u'#63617F',\n",
- " u'#916681',\n",
- " u'#C06C84',\n",
- " u'#D28389',\n",
- " u'#E59A8F',\n",
- " u'#F8B195'],\n",
- " u'name': u'Sunrise 8',\n",
- " u'reversed': False,\n",
- " u'type': u'sequential'},\n",
- " u'coverage': 1,\n",
- " u'coverageRange': [0, 1],\n",
- " u'elevationScale': 5,\n",
- " u'opacity': 0.8,\n",
- " u'sizeRange': [0, 500]}},\n",
- " u'id': u'jdys7lp',\n",
- " u'type': u'hexagonId',\n",
- " u'visualChannels': {u'colorField': {u'name': u'value',\n",
- " u'type': u'integer'},\n",
- " u'colorScale': u'quantize',\n",
- " u'coverageField': None,\n",
- " u'coverageScale': u'linear',\n",
- " u'sizeField': {u'name': u'value', u'type': u'integer'},\n",
- " u'sizeScale': u'linear'}}],\n",
- " u'splitMaps': []}},\n",
- " u'version': u'v1'}"
- ]
- },
- "execution_count": 11,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
+ "outputs": [],
"source": [
"{u'config': {u'mapState': {u'bearing': 2.6192893401015205,\n",
" u'dragRotate': True,\n",
@@ -302,7 +158,7 @@
},
{
"cell_type": "code",
- "execution_count": 12,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -311,7 +167,7 @@
},
{
"cell_type": "code",
- "execution_count": 21,
+ "execution_count": 16,
"metadata": {},
"outputs": [
{
@@ -329,21 +185,21 @@
],
"metadata": {
"kernelspec": {
- "display_name": "Python 2",
+ "display_name": "Python 3",
"language": "python",
- "name": "python2"
+ "name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
- "version": 2
+ "version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.16"
+ "pygments_lexer": "ipython3",
+ "version": "3.7.4"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
@@ -542178,5 +542034,5 @@
}
},
"nbformat": 4,
- "nbformat_minor": 2
+ "nbformat_minor": 4
}
diff --git a/docs/keplergl-jupyter/README.md b/docs/keplergl-jupyter/README.md
index f7ec1e723..e3b440854 100644
--- a/docs/keplergl-jupyter/README.md
+++ b/docs/keplergl-jupyter/README.md
@@ -245,7 +245,7 @@ Interact with kepler.gl and customize layers and filters. Map data and config wi
## 5. Save and load config
### `.config`
-you can print your current map configuration at any time.
+you can print your current map configuration at any time in the notebook
```python
map_1.config
## {u'config': {u'mapState': {u'bearing': 2.6192893401015205,
@@ -255,8 +255,12 @@ map_1.config
# u'longitude': -122.42590232651203,
```
+### Config panel
+Config can be copied from the side panel with the `{}` icon.
+
When the map is final, you can copy this config and load it later to reproduce the same map. Follow the instruction to [match config with data][match-config-w-data].
-There are 2 ways to apply config to a map:
+
+#### Apply config to a map:
1. Directly apply config to the map.
```python
@@ -333,6 +337,65 @@ map_1.save_to_html(file_name='first_map.html' read_only=True)
- [DataFrame](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/DataFrame.ipynb): Load DataFrame to kepler.gl
- [GeoDataFrame](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/GeoDataFrame.ipynb): Load GeoDataFrame to kepler.gl
+# FAQ & Troubleshoot
+
+#### 1. What about windows?
+keplergl is currently only published to PyPI, and unfortunately I use a Mac. If you encounter errors installing it on windows. [This issue](https://github.com/keplergl/kepler.gl/issues/557) might shed some light. Follow this issue for [conda](https://github.com/keplergl/kepler.gl/issues/646) support.
+
+#### 2. Install keplergl-jupyter on Jupyter Lab failed?
+
+Make sure you are using node 8.15.0. and you have installed `@jupyter-widgets/jupyterlab-manager`. Depends on your JupyterLab version. You might need to install the specific version of [jupyterlab-manager](https://github.com/jupyter-widgets/ipywidgets/tree/master/packages/jupyterlab-manager). with `jupyter labextension install @jupyter-widgets/[email protected]`. When use it in Jupyter lab, keplergl is only supported in JupyterLab > 1.0 and Python 3.
+
+Run `jupyter labextension install keplergl-jupyter --debug` and copy console output before creating an issue.
+
+If you are running `install` and `uninstall` several times. You should run.
+
+```
+jupyter lab clean
+jupyter lab build
+```
+
+#### 2.1 JavaScript heap out of memory when installing lab extension
+If you see this error during install labextension
+
+```bash
+$ FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
+```
+
+run
+
+```bash
+$ export NODE_OPTIONS=--max-old-space-size=4096
+```
+
+#### 3. Is my lab extension successfully installed?
+Run `jupyter labextension list` You should see below. (Version may vary)
+
+```bash
+JupyterLab v1.1.4
+Known labextensions:
+ app dir: /Users/xxx/jupyter-python3/ENV3/share/jupyter/lab
+ @jupyter-widgets/jupyterlab-manager v1.0.2 enabled OK
+ keplergl-jupyter v0.1.0 enabled OK
+```
+
+#### 4. What's your python and node env
+
+Python
+```text
+python==3.7.4
+notebook==6.0.3
+jupyterlab==2.1.2
+ipywidgets==7.5.1
+```
+
+Node (Only for JupyterLab)
+
+```text
+node==8.15.0
+yarn==1.7.0
+```
+
[jupyter_widget]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_widget.png
[empty_map]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_empty_map.png
[geodataframe_map]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_geodataframe.png
@@ -351,3 +414,4 @@ map_1.save_to_html(file_name='first_map.html' read_only=True)
[match-config-w-data]: #6-match-config-with-data
[data_format]: #3-data-format
+