GithubHelp home page GithubHelp logo

jupyterlab / jupyter-renderers Goto Github PK

View Code? Open in Web Editor NEW
485.0 33.0 78.0 5.31 MB

Renderers and renderer extensions for JupyterLab

License: BSD 3-Clause "New" or "Revised" License

TypeScript 11.74% CSS 0.59% Jupyter Notebook 23.68% Shell 0.02% JavaScript 0.21% Python 0.33% HTML 63.44%
jupyterlab plotly geojson katex fasta vega vega-lite jupyterlab-extension

jupyter-renderers's Introduction

Jupyter Renderers

Github Actions Status Binder

This is a monorepo that consists of JupyterLab mimerender extensions for common file and MIME types.

Packages

Name Mime types File extensions Info
fasta-extension application/vnd.fasta.fasta .fasta Version
geojson-extension application/geo+json .geojson, .geo.json Version
katex-extension N/A N/A Version
mathjax2-extension N/A N/A Version
vega3-extension application/vnd.vega.v3+json, application/vnd.vegalite.v2+json .vg, .vl, .vg.json, .vl.json, .vega, .vegalite Version

Looking for plotly-extension?

@jupyterlab/plotly-extension is being deprecated. Please use the Plotly-supported jupyterlab-plotly. See the plotly.py README for more info.

Install

With JupyterLab 3.0 and above, it is possible to install the prebuilt extensions with pip:

pip install jupyterlab-fasta
pip install jupyterlab-geojson
pip install jupyterlab-katex
pip install jupyterlab-mathjax2
pip install jupyterlab-vega3

Contributing

If you would like to contribute to the project, please read our contributor documentation.

JupyterLab follows the official Jupyter Code of Conduct.

Requirements

Install

The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of jlpm below.

# Clone the repo to your local environment
git clone https://github.com/jupyterlab/jupyter-renderers.git
cd jupyter-renderers

# install the fasta extension
cd packages/fasta-extension

# Install package in development mode
pip install -e .

# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite

# Rebuild the extensions TypeScript source after making changes
jlpm run build

Rebuilding extensions

After making changes to the source packages, the packages must be rebuilt:

# Rebuild all the extensions at once
jlpm run build

# To rebuilt a particular extension, for example the fasta extension
cd packages/fasta-extension
jlpm run build

You may also watch a particular extension directory for changes and automatically rebuild:

# In one terminal tab, watch the jupyter-fasta directory
cd packages/fasta-extension
jlpm run watch

# Run JupyterLab in another terminal
jupyter lab

Publishing packages

Build all Python packages:

rm -rf dist/*
jlpm build-py
twine upload dist/jupyterlab*

Creating icons

To create a JupyterLab icon for a new MIME or file type, you can use the Sketch file in this repo or fork the file on Figma and export your icon as an SVG. See the GeoJSON icon for reference.

jupyter-renderers's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jupyter-renderers's Issues

Quick Question

I followed the instructions to run jupyter lab in development mode from here: https://github.com/aliasmrchips/jupyterlab/blob/master/CONTRIBUTING.md and likewise for jupyter-renderers. Everything seems to be installed correctly and when I start jupyter lab I see:

Known labextensions:
   app dir: /home/aliasmrchips/miniconda3/share/jupyter/lab
        @jupyterlab/[email protected]  enabled  OK
        @jupyterlab/[email protected]  enabled  OK
   linked extensions:
        @jupyterlab/geojson-extension: /home/aliasmrchips/jupyterlab/jupyter-renderers/packages/geojson-extension
        @jupyterlab/plotly-extension: /home/aliasmrchips/jupyterlab/jupyter-renderers/packages/plotly-extension

However, if I go to open a geojson file from jupyter lab, it just opens in a regular text editor. If I right click, there is no additional open option. Am I missing something?

Error installing plotly-extension on Windows

When I try to install plotly-extension to jupyterlab on Windows 10, I get the following error:

(Keras_learn) C:\Users\xxxxxxx>jupyter labextension install @jupyterlab/plotly-extension

npm.cmd pack @jupyterlab/plotly-extension
'npm.cmd' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\envs\Keras_learn\Scripts\jupyter-labextension-script.py", line 10, in
sys.exit(main())
File "C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\envs\Keras_learn\lib\site-packages\jupyter_core\application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\envs\Keras_learn\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
app.start()
File "C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\envs\Keras_learn\lib\site-packages\jupyterlab\labextensions.py", line 168, in start
super(LabExtensionApp, self).start()
File "C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\envs\Keras_learn\lib\site-packages\jupyter_core\application.py", line 256, in start
self.subapp.start()
File "C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\envs\Keras_learn\lib\site-packages\jupyterlab\labextensions.py", line 58, in start
for arg in self.extra_args]
File "C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\envs\Keras_learn\lib\site-packages\jupyterlab\labextensions.py", line 58, in
for arg in self.extra_args]
File "C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\envs\Keras_learn\lib\site-packages\jupyterlab\commands.py", line 100, in install_extension
return IOLoop.instance().run_sync(func)
File "C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\envs\Keras_learn\lib\site-packages\tornado\ioloop.py", line 458, in run_sync
return future_cell[0].result()
File "C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\envs\Keras_learn\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "", line 4, in raise_exc_info
File "C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\envs\Keras_learn\lib\site-packages\tornado\gen.py", line 1069, in run
yielded = self.gen.send(value)
File "C:\Users\xxxxxxx\AppData\Local\Continuum\anaconda3\envs\Keras_learn\lib\site-packages\jupyterlab\commands.py", line 140, in install_extension_async
fname = os.path.basename(glob.glob(pjoin(target, '.'))[0])
IndexError: list index out of range

Name collision between geojson and json?

Building the following Dockerfile

FROM jupyter/datascience-notebook

# See https://github.com/jupyterlab/jupyter-renderers
# Note there seems to be a bug that means you need to install json before geojson
RUN jupyter labextension install @jupyterlab/json-extension
RUN jupyter labextension install @jupyterlab/geojson-extension

docker build -t jldebug .

and then running:

 docker run -d -p 8888:8888 jldebug start.sh jupyter lab --NotebookApp.token=''

causes the browser to hang.

Looking in Devtools, we see that mimeExtensions contains:

{MIME_TYPE: "application/pdf", PDF_CLASS: "jp-PDFViewer", PDF_CONTAINER_CLASS: "jp-PDFContainer", rendererFactory: {…}, RenderedPDF: ƒ, …}

{VEGA_MIME_TYPE: "application/vnd.vega.v2+json", VEGALITE_MIME_TYPE: "application/vnd.vegalite.v1+json", rendererFactory: {…}, default: {…}, RenderedVega: ƒ, …}

{MIME_TYPE: "application/json", rendererFactory: {…}, default: Array(1), __esModule: true, RenderedJSON: ƒ}

{MIME_TYPE: "application/geo+json", rendererFactory: {…}, default: Array(1), __esModule: true, RenderedGeoJSON: ƒ}

```

But when the mimeExtensions are turned into plugins in the main JupyterLab application class we get:

```

{id: "jupyter.services.mimerenderer-PDF", requires: Array(1), autoStart: true, activate: ƒ}

{id: "jupyter.services.mimerenderer-vega", requires: Array(1), autoStart: true, activate: ƒ}

{id: "jupyter.services.mimerenderer-undefined", requires: Array(1), autoStart: true, activate: ƒ}

{id: "jupyter.services.mimerenderer-undefined", requires: Array(1), autoStart: true, activate: ƒ}

```

This causes 
```
index.js:89 Uncaught Error: Plugin 'jupyter.services.mimerenderer-undefined' is already registered.
```

Everything seems to be fine so long as only one of these plugins is included in the dockerfile

Katex rendering problems

Firstly, a quick heads-up: npm still points to https://github.com/jupyterlab/jupyterlab-katex that doesn't exist anymore.

Further, there seems to be some problem with the rendering of fractions specifically: the horizontal bar in the fraction is not visible. To reproduce render $$\frac{1}{2}$$ in jupyterlab. For me the result looks like this:

image

Versions:

JupyterLab v0.31.12
Known labextensions:
@jupyterlab/katex-extension
        @jupyterlab/katex-extension v0.14.3  enabled  OK

the rendering problem is visible in
Google Chrome 65.0.3325.181 and Mozilla Firefox 59.0.2
on Ubuntu.

Plotly ext install hanging up on package resolution

Howdy folks,

Not sure if this is the place to put this but I'm struggling with installing the plotly renderer. It keeps hanging up on

drew:~$ sudo jupyter labextension install @jupyterlab/plotly-extension
> /usr/local/bin/npm pack @jupyterlab/plotly-extension
jupyterlab-plotly-extension-0.16.0.tgz
> node /anaconda3/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
(node:23151) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info No lockfile found.
[1/4] 🔍  Resolving packages...
⢀ @jupyterlab/plotly-extension@file:../extensions/jupyterlab-plotly-extension-0.16.0.tgz

for like forever. Even left it going for like 2 hours to see what would happen. I'd have to ultimately cmd+C out of there. I am not a dev so forgive me if I'm just dumb and this is an easy fix.

Not sure if this will help either but here is some traceback context when I cmd+C.

[1/4] 🔍  Resolving packages...
⢀ @jupyterlab/plotly-extension@file:../extensions/jupyterlab-plotly-extension-0.16.0.tgz^CTraceback (most recent call last):
  File "/anaconda3/bin/jupyter-labextension", line 11, in <module>
    sys.exit(main())
  File "/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/anaconda3/lib/python3.6/site-packages/jupyterlab/labextensions.py", line 213, in start
    super(LabExtensionApp, self).start()
  File "/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 255, in start
    self.subapp.start()
  File "/anaconda3/lib/python3.6/site-packages/jupyterlab/labextensions.py", line 75, in start
    logger=self.log, command=command)
  File "/anaconda3/lib/python3.6/site-packages/jupyterlab/commands.py", line 259, in build
    command=command, clean_staging=clean_staging)
  File "/anaconda3/lib/python3.6/site-packages/jupyterlab/commands.py", line 400, in build
    self._run(['node', YARN_PATH, 'install'], cwd=staging)
  File "/anaconda3/lib/python3.6/site-packages/jupyterlab/commands.py", line 1278, in _run
    return proc.wait()
  File "/anaconda3/lib/python3.6/site-packages/jupyterlab/process.py", line 108, in wait
    time.sleep(1.)
KeyboardInterrupt

Jupyter Lab, node, and plotly are all up to date.

drew:~$ jupyter lab --version
0.32.1
drew:~$ ipython
Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 12:04:33) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import plotly

In [2]: plotly.__version__
Out[2]: '2.5.1'

In [3]:                                                                                                                                     
Do you really want to exit ([y]/n)? y
drew:~$ node --version
v10.0.0

Thanks for any insight.

Fix issue with plotly.js + webpack + typescript

When using plotly.js with webpack, the default export causes the following runtime error:

Error: It appears that you're using glslify in browserify without its transform applied. Make sure that you've set up glslify as a source transform: https://github.com/substack/node-browserify#browserifytransform
    at module.exports (browser.js:2)
    at Object.module.exports (shaders.js:4)
    at __webpack_require__ (bootstrap 4110bc1…:49)
    at Object.module.exports (lines.js:11)
    at __webpack_require__ (bootstrap 4110bc1…:49)
    at Object.<anonymous> (convert.js:12)
    at __webpack_require__ (bootstrap 4110bc1…:49)
    at Object.<anonymous> (index.js:13)
    at __webpack_require__ (bootstrap 4110bc1…:49)
    at Object.<anonymous> (scatter3d.js:11)

Importing plotly.js/lib/core resolves this issue, but the type declarations provided by @types/plotly.js don't provide delcarations for the plotly.js/lib/core module (even though that module is identical to the default module).

I think the only way to resolve this is to add a declaration for plotly.js/lib/core to @types/plotly.js...

cannot install on Windows 10

Have already installed nodejs 8.9.3 with conda, bumped into the following error when trying to install plotly-extension with command jupyter labextension install @jupyterlab/plotly-extension --debug:

> C:\Users\<>\AppData\Local\Continuum\anaconda3\npm.CMD pack @jupyterlab/plotly-extension
jupyterlab-plotly-extension-0.14.5.tgz
Traceback (most recent call last):

  File "C:\Users\<>\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\labextensions.py", line 71, in start
    ans = self.run_task()

  File "C:\Users\<>\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\labextensions.py", line 100, in run_task
    for arg in self.extra_args

  File "C:\Users\<>\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\labextensions.py", line 100, in <listcomp>
    for arg in self.extra_args

  File "C:\Users\<>\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\commands.py", line 210, in install_extension
    return handler.install_extension(extension)

  File "C:\Users\<>\AppData\Local\Continuum\anaconda3\lib\site-packages\jupyterlab\commands.py", line 347, in install_extension
    info = self._install_extension(extension, tempdir)

  File "C:\Users\<>\AppData\Local\Continuum\anaconda3\lib\tempfile.py", line 807, in __exit__
    self.cleanup()

  File "C:\Users\<>\AppData\Local\Continuum\anaconda3\lib\tempfile.py", line 811, in cleanup
    _shutil.rmtree(self.name)

  File "C:\Users\<>\AppData\Local\Continuum\anaconda3\lib\shutil.py", line 494, in rmtree
    return _rmtree_unsafe(path, onerror)

  File "C:\Users\<>\AppData\Local\Continuum\anaconda3\lib\shutil.py", line 393, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())

  File "C:\Users\<>\AppData\Local\Continuum\anaconda3\lib\shutil.py", line 391, in _rmtree_unsafe
    os.rmdir(path)

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\<>\\AppData\\Local\\Temp\\tmpet5pksuo'


Errored, use --debug for full output:
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\<>\\AppData\\Local\\Temp\\tmpet5pksuo'

Any words of wisdom would be appreciated.

Move Vega 3 extension

Should the Vega 3 extension move to JupyerLab? If so, how do we handle that Vega 2 and Vega 3 are installed at the same time?

Plotly: Space for plot is too small

I installed Jupyterlab 0.31 and the latest version of jupyter-renderers and I'm getting too little space for the plots:

screenshot-2018-1-11 jupyterlab

However, the menu actions on the top right are there and I can even download the plot and the result looks correct:

newplot

Installation broken?

Hi,

Trying to install the plotly extension by jupyter labextension install @jupyterlab/plotly-extension, I'm getting an UnboundLocalError: local variable 'proc' referenced before assignment Error.

I'm on jupyter 4.4.0, python 3.5 and anaconda installation, am I doing something wrong?

Refactor renderer extensions

  • Move these renderers into this repo
  • I am totally refactoring the extensions so that they can be easily bundled with jupyterlab
    • This involves separating the extensions into 2 separate packages:
      • The widget package that doesn’t rely on jupyterlab (except for type definitions that will exported to a new package for extension use)
      • The extension package that will import the widget and export a jupyterlab plugin
    • The extensions package can be generic, allowing renderer authors to simply create a widget package and provide some metadata (mime types, file extensions, renderer name, namespace). These widgets can be installed as extensions (with an additional key in the jupyterlab section of package.json) as jupyterlab will wire them up using the generic extension package.

Publish Packages

It seems the packages haven't yet been published?

Is there some way to "install" the extensions from the source without linking?
i.e. after installing the extension I should be able to delete the source dir and the extension should still work

I'm interested because linking isn't working for me on my Windows Container.

Plotly: height attribute ignored / overwritten

In jupyterlab the plotly figure gets resized to the width of the container so e.g. when you open/collapse the side-panel the plot resizes to fit the width of the notebook without any scroll bars.

This adaptive-width behaviour is fine, however the height of the figure is completely ignored and appears to just be fixed.

JupyterLab:
image

Jupyter Notebook:
image

Aside: As can be seen the heatmaps do now work so thanks for fixing that @gnestor 🎉

Cannot link extension

$ jupyter labextension link packages/vega3-extension                                                                                                               > node node-version-check.js
> npm pack /Users/domoritz/Developer/UW/jupyter-renderers/packages/vega3-extension
jupyterlab-vega3-extension-0.1.0.tgz
Traceback (most recent call last):
  File "/usr/local/anaconda3/bin/jupyter-labextension", line 6, in <module>
    sys.exit(jupyterlab.labextensions.main())
  File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/local/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyterlab/labextensions.py", line 174, in start
    super(LabExtensionApp, self).start()
  File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 255, in start
    self.subapp.start()
  File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyterlab/labextensions.py", line 89, in start
    for arg in self.extra_args]
  File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyterlab/labextensions.py", line 89, in <listcomp>
    for arg in self.extra_args]
  File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyterlab/commands.py", line 236, in link_package
    return IOLoop.instance().run_sync(func)
  File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/ioloop.py", line 458, in run_sync
    return future_cell[0].result()
  File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyterlab/commands.py", line 267, in link_package_async
    yield install_extension_async(path, app_dir, abort_callback=abort_callback)
  File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/usr/local/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1069, in run
    yielded = self.gen.send(value)
  File "/usr/local/anaconda3/lib/python3.6/site-packages/jupyterlab/commands.py", line 230, in install_extension_async
    shutil.rmtree(target)
  File "/usr/local/anaconda3/lib/python3.6/shutil.py", line 490, in rmtree
    onerror(os.path.islink, path, sys.exc_info())
  File "/usr/local/anaconda3/lib/python3.6/shutil.py", line 488, in rmtree
    raise OSError("Cannot call rmtree on a symbolic link")
OSError: Cannot call rmtree on a symbolic link

Installation

I must say this problem was driving me crazy for a long time, until I finally managed to pinpoint the source of the problem.

To install jupyter-renders we need to use:

jupyter labextension install @jupyterlab/plotly-extension

In the README.md it states that is required Node.js >= 5. However, my installation always halted in the following line:

@jupyterlab/plotly-extension@file:../extensions/jupyterlab-plotly-extension-0.16.0.tgz

Well, after sweat, tears, and pulling half of the hairs from my beard, I discover that the solution was using Node 6. Using Linuxbrew (and I presume that Brew under OSX is the same) is just a matter of unlinking Node, installing Node@6, and linking Node@6. Once installed you can return to any other Node version unlinking Node@6 and relinking the original one.

I hope this helps to other users with the same problem.

binary or npm-free distribution?

Hi there,

I am using a server that npm cannot be installed.
How can I install these extentions?
Is it possible that I somehow build these extentions and then put some bundled static files to some place?

cheers,
justin

Plotly extension install. failed

I installed json extension and it worked well, but plotly failed with the following error:

> webpack
fs.js:994
  binding.lstat(pathModule._makeLong(path), statValues);
              ^
Error: ENOENT: no such file or directory, lstat

Couldn't find any versions for "@jupyterlab/theme-light-extension" that matches "^0.15.4"

Hi there,

This is the error message I got when trying to install plotly extention. The full log is

jupyter labextension install @jupyterlab/plotly-extension
> /usr/bin/npm pack @jupyterlab/plotly-extension
jupyterlab-plotly-extension-0.14.4.tgz
> node /usr/lib/python3.5/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.3.2
info No lockfile found.
[1/4] Resolving packages...
Couldn't find any versions for "@jupyterlab/theme-light-extension" that matches "^0.15.4"

Seems npm does not have the correct versions of packages?

cheers,
justin

How do these work?

I manage the plotly Julia packages and would love to have support for my figures in jupyterlab.

I was hoping that I could just add a JSON object containing the plotly data and layout with the mime type application/vnd.plotly.v1+json to the outputs I send to the Julia jupyter kernel and that this extension would pick it up, but that doesn't seem to happen.

This is what I do to get support inside nteract and it works well.

Is there an example of what the output needs to be in order to render my plotly figures in a notebook backed by my Julia kernel?

Mapbox Certificate problem

When i try to install the plotly extension

jupyter labextension install @jupyterlab/plotly-extension

the installation fails with:

error An unexpected error occurred: "https://github.com/mapbox/mapbox-gl-shaders: unable to get local issuer certificate".

I am behind a proxy, but am able to install other packages no problem.

plotly scatterplot cutted

i'm trying to use a plotly scatter or scatter3d. The graph show without a problem but the output cell don't scale with the graph dimension, I attach a shot to show the problem.

plotlyscatter3d

This is my configuration:

JupyterLab v0.31.1
Known labextensions:
   app dir: /usr/share/jupyter/lab
@jupyter-widgets/jupyterlab-manager
        @jupyter-widgets/jupyterlab-manager v0.33.0  enabled  OK
@jupyterlab/hub-extension
        @jupyterlab/hub-extension v0.8.0  enabled  OK
@jupyterlab/plotly-extension
        @jupyterlab/plotly-extension v0.14.2  enabled  OK

and this is my code for generating the graph

data=[]
plotColor=cl.scales['11']['qual']['Set3']
Y = adataMeth.smpm['X_diffmap'][:, :]
for k in range(0,len(ListOfGroup)):
    idxCell = adataMeth.smp['bulk_labels'] == ListOfGroup[k]
    adataMeth[idxCell].smp_names
#     trace=go.Scattergl(
    trace=go.Scatter3d(
        x = Y[idxCell, 0],
        y = Y[idxCell, 1],
        z = Y[idxCell, 2],
        mode = 'markers',
        marker= dict(size= 7,
                    line= dict(width=1),
                    color= plotColor[k],
                    opacity= 0.8
                   ),
        name = ListOfGroup[k],
        text=adataMeth[idxCell].smp_names
    )
    data.append(trace)
                
layout = go.Layout(
#     hoverlabel = bgcolor='#000000',
    autosize=False,
    width=800,
    height=800,
    xaxis=dict(
    showgrid=False,
        zeroline=False,
        showline=False,
        showticklabels=False
    ),
    yaxis=dict(


        showgrid=False,
        zeroline=False,
        showline=False,
        showticklabels=False
    ),
    
    margin=go.Margin(
        l=50,
        r=50,
        b=100,
        t=100,
        pad=4
    )

)
fig = go.Figure(data=data, layout=layout)
iplot(fig)

Plotly animations not working in JLab

This is a fresh issue spun off an old one in the plotly repo to focus the discussion on Lab-specific questions. Key points from that issue copied here for reference.

Assuming that the plotly extension is installed from jupyter-renderers, with

jupyter labextension install @jupyterlab/plotly-extension

Then, on JupyterLab 0.31.12, this code:

import plotly.offline as py
py.init_notebook_mode(connected=False)  # This line is unnecessary in JLab, needed in classic

figure = {'data': [{'x': [0, 1], 'y': [0, 1], 'z': [0, 1], 'type': 'scatter3d'}],
          'layout': {'scene': {'xaxis': {'range': [0, 5], 'autorange': False},
                               'yaxis': {'range': [0, 5], 'autorange': False},
                               'zaxis': {'range': [0, 5], 'autorange': False}},
                     'updatemenus': [{'type': 'buttons',
                                      'buttons': [{'label': 'Play',
                                                   'method': 'animate',
                                                   'args': [None]}]}]
                    },
          'frames': [{'data': [{'x': [1, 2], 'y': [1, 2], 'z': [0, 3], 'type': 'scatter3d'}]},
                     {'data': [{'x': [1, 4], 'y': [1, 4], 'z': [0, 3], 'type': 'scatter3d'}]},
                     {'data': [{'x': [3, 4], 'y': [3, 4], 'z': [0, 3], 'type': 'scatter3d'}]}]
         }

py.iplot(figure)

produces a static image with a non-functioning "Play" button:

image

and this error message in the console, just as @jasongrout suggested:

image

If the same notebook is opened in Classic (even within the same session), then the Play button animates as expected.

cc @jasongrout @gnestor to continue discussion here.

Classic notebook extensions

Create a wrapper for the labextensions that will allow classic notebook to consume them with little to no modification.

Installation issue

I tried installing the dev version but I am getting an error and I am unsure how to debug it.
I am running:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
npm is already the newest version (3.5.2-0ubuntu4).
npm is already the newest version (3.5.2-0ubuntu4).

And then I do:
npm install

But get this error:

> undefined install /home/ubuntu/jupyter-renderers
> lerna bootstrap --hoist

/usr/bin/env: ‘node’: No such file or directory

npm WARN jupyter-renderers No repository field.
npm WARN jupyter-renderers No license field.
npm ERR! Linux 4.4.0-1035-aws
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! undefined install: `lerna bootstrap --hoist`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the undefined install script 'lerna bootstrap --hoist'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     lerna bootstrap --hoist
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/jupyter-renderers/npm-debug.log

failing to render after vega3-extension install

I'm failing to render vega-lite charts in jupyterlab after vega3-extension is installed.

jupyterlab                0.31.8                   py36_1    conda-forge
---
$ jupyter labextension list
JupyterLab v0.31.8
Known labextensions:
   app dir: /Users/semyeong/anaconda2/envs/research/share/jupyter/lab
@jupyterlab/vega3-extension
        @jupyterlab/vega3-extension v0.14.2  enabled  OK

Trying to use altair, I get

JavaScript output is disabled in JupyterLab

I also tried copy-paste the example in vega3-extension README, and get empty output.
Can anyone help me getting this to work?

GeoJSON: Map not zoomed correctly on initial render

When opening a Notebook with GeoJSON renderer, the map widget sometimes is not centered but shows the whole world at a zoom layer of 0:

Screenshot

Only when the window or notebook panel gets resized (triggering the onResize message handler), the map correctly zooms in on the rendered features.

Debugging with console.log()s in the code revealed that this._map.getZoom() still is 0 even after calling fitBounds() at the end of renderModel.

I guess it has something to do with the map initialization code happening inside the Promise, when maybe the DOM isn't ready yet?

GeoJSON: Reasoning behind disabled scrollWheelZoom?

What is the consideration behind calling this._map.scrollWheelZoom.disable();during map initialization?

For visualization purposes, I like to zoom in to details of the displayed geometry or zoom out to put it in a better geographic context a lot, but having to do so by clicking the +/- buttons feels very clumsy.

[Enhancement] Render with Mapbox GL JS

Ref - mapbox/mapboxgl-jupyter#67

Mapbox GL JS is an open-source WebGL-based map rendering SDK. It can specifically render much, much larger geojson data than leaflet on the fly because:

  1. It creates vector tiles on the fly from geojson data using geojson-vt
  2. It renders tiles only in the viewport, with automatic simplification based on zoom level, using WebGL instead of HTML canvas elements

Consider switching Leaflet.js to Mapbox GL JS for jupyter-renderers geojson extension to improve the user experience working with larger geojson datasets.

GeoJSON: [Proposal] Change default basemap

I found the Carto Basemap much better suited to visualize overlayed geographical data.

It looks much cleaner (less visual clutter), has nice HiDPI support, and fits very smoothly within the overall JupyterLab theme:

carto

Before:
mapnik

I know this can also be archived manually by calling

GeoJSON(
    data,
    url_template="https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}{r}.png",
    layer_options={
        "attribution": '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, &copy; <a href="https://carto.com/attribution">CARTO</a>'
    }
)

, so I'm not sure if this is the right place to put such a proposal or if it should even be scope of this repository / plugin to have a different default basemap than the very basic OSM Mapnik tiles.

development environment

Can anyone outline a way to create a virtual environment for development work on the labextensions?

I'm having some trouble separating development and production on my workstation.

Notebook with embedded vega-lite output doesn't show properly

I'm trying to use the built-in vega-lite support for the julia VegaLite.jl package. Through a lot of hoops I managed to create this notebook file. Don't try to run the code in that notebook, that part only works if you have a whole number of unreleased branches checked out on the julia side of things.

BUT, at the end of the day, I would have expected that if this notebook file just gets opened in jupyterlab with the vega3 extension installed, that it would show the vega-lite plot. The second cell does have a data field that has the mime type application/vnd.vegalite.v2+json, and inside there it does have a valid vega-lite 2 spec, so shouldn't this show the graph if I just open that file in jupyterlab?

I am suspecting that I'm doing something wrong because it also doesn't show in nteract.

Any pointers would be greatly appreciated!

Error installing vega3 extension on windows

This is with the latest jupyter lab beta (0.31.1)

Here is what I get:

C:\Users\david> jupyter labextension install @jupyterlab/vega3-extension
> "C:\Program Files\nodejs\npm.CMD" pack @jupyterlab/vega3-extension
jupyterlab-vega3-extension-0.14.1.tgzwser when you connect for the first time,
> node C:\Users\david\Anaconda3\lib\site-packages\jupyterlab\staging\yarn.js install
yarn install v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@jupyterlab/json-extension > [email protected]" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@jupyterlab/json-extension > [email protected]" has unmet peer dependency "react@^15.0.0".
warning "@jupyterlab/json-extension > [email protected]" has unmet peer dependency "react-dom@^15.0.0".
warning "@jupyterlab/vdom-extension > @nteract/[email protected]" has unmet peer dependency "react@^15.6.1".
[4/4] Building fresh packages...
[-/3] ⠐ waiting...
[2/3] ⠐ canvas: using [email protected] | win32 | x64
[3/3] ⠈ canvas-prebuilt: node-pre-gyp http GET https://github.com/chearon/node-canvas-prebuilt/releases/download/v1.6.0/canvas-prebuilt-v1.6.0-node-v57-win32-x64.tar.gz
[-/3] ⠈ waiting...
warning Error running install script for optional dependency: "C:\\Users\\david\\Anaconda3\\share\\jupyter\\lab\\staging\\node_modules\\canvas: Command failed.\nExit code: 1\nCommand: node-gyp rebuild\nArguments: \nDirectory: C:\\Users\\david\\Anaconda3\\share\\jupyter\\lab\\staging\\node_modules\\canvas\nOutput:\nC:\\Users\\david\\Anaconda3\\share\\jupyter\\lab\\staging\\node_modules\\canvas>if not defined npm_config_node_gyp (node \"C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\node-gyp-bin\\\\..\\..\\node_modules\\node-gyp\\bin\\node-gyp.js\" rebuild )  else (node \"\" rebuild ) \r\ngyp info it worked if it ends with ok\ngyp info using [email protected]\ngyp info using [email protected] | win32 | x64\ngyp ERR! configure error \ngyp ERR! stack Error: Can't find Python executable \"C:\\Users\\david\\Anaconda3\\python.EXE\", you can set the PYTHON env variable.\ngyp ERR! stack     at PythonFinder.failNoPython (C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:483:19)\ngyp ERR! stack     at PythonFinder.<anonymous> (C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\lib\\configure.js:508:16)\ngyp ERR! stack     at C:\\Program Filessuccess Saved lockfile.
Done in 50.41s.
> node C:\Users\david\Anaconda3\lib\site-packages\jupyterlab\staging\yarn.js run build:prod
yarn run v1.3.2
$ webpack --config webpack.prod.config.js
C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\Resolver.js:181
        var idxQuery = identifier.indexOf("?");
                                  ^

TypeError: Cannot read property 'indexOf' of null
    at Resolver.parse (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\Resolver.js:181:28)
    at Resolver.<anonymous> (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\ParsePlugin.js:14:25)
    at Resolver.applyPluginsAsyncSeriesBailResult1 (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\tapable\lib\Tapable.js:256:13)
    at runNormal (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\Resolver.js:130:20)
    at Resolver.doResolve (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\Resolver.js:116:3)
    at Resolver.<anonymous> (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\UnsafeCachePlugin.js:37:12)
    at Resolver.applyPluginsAsyncSeriesBailResult1 (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\tapable\lib\Tapable.js:256:13)
    at runNormal (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\Resolver.js:130:20)
    at Resolver.doResolve (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\Resolver.js:116:3)
    at Resolver.<anonymous> (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\AliasFieldPlugin.js:44:12)
    at next (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\tapable\lib\Tapable.js:254:14)
    at Resolver.<anonymous> (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\ConcordModulesPlugin.js:23:28)
    at Resolver.applyPluginsAsyncSeriesBailResult1 (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\tapable\lib\Tapable.js:256:13)
    at runNormal (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\Resolver.js:130:20)
    at Resolver.doResolve (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\Resolver.js:116:3)
    at DescriptionFileUtils.loadDescriptionFile (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\DescriptionFilePlugin.js:39:14)
    at C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\DescriptionFileUtils.js:48:12
    at C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\forEachBail.js:29:14
    at onJson (C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\DescriptionFileUtils.js:39:5)
    at C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\DescriptionFileUtils.js:17:6
    at C:\Users\david\Anaconda3\share\jupyter\lab\staging\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:70:14
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
C:\Users\david>

compile error json_renderer

Currently having some trouble compiling the json renderer

> tsc

src/component.tsx(25,14): error TS2415: Class 'Component' incorrectly extends base class 'Component<IProps, IState>'.
  Types of property 'state' are incompatible.
    Type '{ filter: string; }' has no properties in common with type 'Readonly<IState>'.

Plotly doesnt render

Hi - I've just installed a fresh lab, fresh plotly extension, and for the following in a python3 notebook I get x & y axis, but no heatmap (renders fine in jupyter notebook). Any ideas?

Extension installed with: jupyter labextension install @jupyterlab/plotly-extension

Test code:

from plotly.graph_objs import *
import plotly.graph_objs as go

py.init_notebook_mode()

trace = go.Heatmap(z=[[1, 20, 30],
                      [20, 1, 60],
                      [30, 60, 1]])
data = [trace]
py.iplot(data, filename='basic-heatmap')```

Plotly plots no longer resizing?

With the latest and greatest jupyterlab (0.29.1) and jupyter-renderers, plotly plots no longer resize to fill up the full width of the notebook:

image

I actually really liked the resizing behaviour in JupyterLab as you don't know how wide the user will have their notebook set so there's no way to pick a good default width.

  1. Are others also seeing this behaviour?
  2. Was this an unintentional regression?

connect ETIMEDOUT 104.16.60.173:443

Hi,

When installing the extension, I'm having the following issue :

C:\WINDOWS\system32>jupyter labextension install @jupyterlab/plotly-extension
> C:\ProgramData\Anaconda3\npm.CMD pack @jupyterlab/plotly-extension
jupyterlab-plotly-extension-0.14.4.tgz
> node C:\ProgramData\Anaconda3\lib\site-packages\jupyterlab\staging\yarn.js install
yarn install v1.3.2
info No lockfile found.
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@jupyterlab%2fapplication: connect ETIMEDOUT 104.16.60.173:443".
info If you think this is a bug, please open a bug report with the information provided in "C:\\ProgramData\\Anaconda3\\share\\jupyter\\lab\\staging\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
> node C:\ProgramData\Anaconda3\lib\site-packages\jupyterlab\staging\yarn.js run build:prod
yarn run v1.3.2
$ webpack --config webpack.prod.config.js
'webpack' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

It seems related to yarnpkg/yarn#944

Failed to Install with Anaconda

Hi! I use the Anaconda Distribution. and I have the following versions
plotly: 2.4.1
jupyter lab: 0.31.10
nodejs: 8.9.3

and I executed the command as in the documentation: jupyter labextension install @jupyterlab/plotly-extension

the output is as follows, this happens in Windows 10 and in macos Sierra

(base) C:\Users\Aristh\Desktop\test>jupyter labextension install @jupyterlab/plotly-extension

C:\Users\Aristh\Anaconda3\npm.CMD pack @jupyterlab/plotly-extension
jupyterlab-plotly-extension-0.14.4.tgz
node C:\Users\Aristh\Anaconda3\lib\site-packages\jupyterlab\staging\yarn.js install
yarn install v1.3.2
info No lockfile found.
[1/4] Resolving packages...
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This package has been merged into the 'mapbox-gl-style-spec' package
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This package has been merged with the 'mapbox-gl-style-spec' package
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This package has been moved to @mapbox/mapbox-gl-supported
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This module has moved: please install @mapbox/point-geometry instead
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This module is now under the @mapbox namespace: install @mapbox/shelf-pack instead
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This module has moved: switch to @mapbox/unitbezier
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This module has moved: please install @mapbox/vector-tile instead
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > vector-tile > [email protected]: This module has moved: please install @mapbox/point-geometry instead
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > vt-pbf > [email protected]: This module has moved: please install @mapbox/vector-tile instead
warning @jupyterlab/plotly-extension > plotly.js > ndarray-fill > cwise > static-module > through2 > xtend > [email protected]:
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This module is now under the @mapbox namespace: install @mapbox/whoots-js instead
warning @jupyterlab/plotly-extension > plotly.js > color-rgba > color-space > [email protected]: Project renamed to HSLuv
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > geojson-rewind > [email protected]: This module is now under the @mapbox namespace: install @mapbox/geojson-area instead
error Couldn't find the binary git
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
node C:\Users\Aristh\Anaconda3\lib\site-packages\jupyterlab\staging\yarn.js run build:prod
yarn run v1.3.2
$ webpack --config webpack.prod.config.js
'webpack' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Is there a problem with the installation or something I'm doing wrong?

having trouble running the geojson extension in JupyterLab

Jupyterlab version: 0.31.8
Notebook version: 5.4.0

I installed the plotly extension and was able to run the example successfully in a notebook but I installed the geojson-extension and in a notebook I go to run the example
from IPython.display import GeoJSON
and get
ImportError: cannot import name GeoJSON

When I installed the extension I got a bunch of errors but none seemed to be listed serious

`[root@ip-192-168-1-185 lab]# jupyter-labextension install @jupyterlab/geojson-extension

/usr/local/bin/npm pack @jupyterlab/geojson-extension
jupyterlab-geojson-extension-0.14.4.tgz
node /usr/local/lib/python2.7/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.3.2
info No lockfile found.
[1/4] Resolving packages...
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This package has been merged into the 'mapbox-gl-style-spec' package
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This package has been merged with the 'mapbox-gl-style-spec' package
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This package has been moved to @mapbox/mapbox-gl-supported
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This module has moved: please install @mapbox/point-geometry instead
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This module is now under the @mapbox namespace: install @mapbox/shelf-pack instead
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > vt-pbf > [email protected]: This module has moved: please install @mapbox/point-geometry instead
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This module has moved: please install @mapbox/vector-tile instead
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > vt-pbf > [email protected]: This module has moved: please install @mapbox/vector-tile instead
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This module has moved: switch to @mapbox/unitbezier
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > [email protected]: This module is now under the @mapbox namespace: install @mapbox/whoots-js instead
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > geojson-rewind > [email protected]: This module is now under the @mapbox namespace: install @mapbox/geojson-area instead
warning @jupyterlab/plotly-extension > plotly.js > ndarray-fill > cwise > static-module > through2 > xtend > [email protected]:
warning @jupyterlab/plotly-extension > plotly.js > color-rgba > color-space > [email protected]: Project renamed to HSLuv
warning @jupyterlab/plotly-extension > plotly.js > mapbox-gl > mapbox-gl-style-spec > jsonlint-lines-primitives > [email protected]: Package no longer supported. Contact [email protected] for more info.
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@jupyterlab/json-extension > [email protected]" has unmet peer dependency "react@^15.0.0".
warning "@jupyterlab/json-extension > [email protected]" has unmet peer dependency "react-dom@^15.0.0".
warning "@jupyterlab/json-extension > [email protected]" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@jupyterlab/vdom-extension > @nteract/[email protected]" has unmet peer dependency "react@^15.6.1".
[4/4] Building fresh packages...
[-/2] ⠐ waiting...
[2/2] ⠐ canvas: '-Goutput_dir=.' ]
[-/2] ⠐ waiting...
[-/2] ⠐ waiting...
warning Error running install script for optional dependency: "/usr/local/share/jupyter/lab/staging/node_modules/canvas: Command failed.\nExit code: 1\nCommand: node-gyp rebuild\nArguments: \nDirectory: /usr/local/share/jupyter/lab/staging/node_modules/canvas\nOutput:\ngyp info it worked if it ends with ok\ngyp info using [email protected]\ngyp info using [email protected] | linux | x64\ngyp info spawn /usr/local/bin/python2\ngyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',\ngyp info spawn args 'binding.gyp',\ngyp info spawn args '-f',\ngyp info spawn args 'make',\ngyp info spawn args '-I',\ngyp info spawn args '/usr/local/share/jupyter/lab/staging/node_modules/canvas/build/config.gypi',\ngyp info spawn args '-I',\ngyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',\ngyp info spawn args '-I',\ngyp info spawn args '/root/.node-gyp/9.0.0/include/node/common.gypi',\ngyp info spawn args '-Dlibrary=shared_library',\ngyp info spawn args '-Dvisibility=default',\ngyp info spawn args '-Dnode_root_dir=/root/.node-gyp/9.0.0',\ngyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',\ngyp info spawn args '-Dnode_lib_file=/root/.node-gyp/9.0.0/<(target_arch)/node.lib',\ngyp info spawn args '-Dmodule_root_dir=/usr/local/share/jupyter/lab/staging/node_modules/canvas',\ngyp info spawn args '-Dnode_engine=v8',\ngyp info spawn args '--depth=.',\ngyp info spawn args '--no-parallel',\ngyp info spawn args '--generator-output',\ngyp info spawn args 'build',\ngyp info spawn args '-Goutput_dir=.' ]\nPackage cairo was not found in the pkg-config search path.\nPerhaps you should add the directory containing cairo.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'cairo' found\ngyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp\ngyp ERR! configure error \ngyp ERR! stack Error: gypfailed with exit code: 1\ngyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)\ngyp ERR! stack at emitTwo (events.js:135:13)\ngyp ERR! stack at ChildProcess.emit (events.js:224:7)\ngyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_procesuccess Saved lockfile. Done in 72.06s. node /usr/local/lib/python2.7/site-packages/jupyterlab/staging/yarn.js run build:prod yarn run v1.3.2 $ webpack --config webpack.prod.config.js Hash: 31977bb08b9ea5a727fe Version: webpack 2.7.0 Time: 34484ms

I checked to ensure the extension was enabled with
jupyter-labextension check @jupyterlab/geojson-extension

and double-checked the page_config.json

Heatmaps broken!

On jupyterlab 0.27.0 with the latest jupyter-renderers installed when plotting a heatmap it instead plots a line graph!

What I'm seeing on jupyterlab:
image

What I see locally in nteract:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.