Coder Social home page Coder Social logo

altair-viz / jupyterlab_voyager Goto Github PK

View Code? Open in Web Editor NEW
294.0 294.0 35.0 10.84 MB

JupyterLab extension visualize data with Voyager

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

TypeScript 85.62% JavaScript 5.40% Python 0.09% CSS 4.53% Shell 0.16% Dockerfile 0.71% TeX 3.50%
jupyterlab jupyterlab-extension vega

jupyterlab_voyager's People

Contributors

ellisonbg avatar gnestor avatar playermanny2 avatar saulshanabrook avatar zzhangjii avatar

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

jupyterlab_voyager's Issues

Fix mybinder from having conflicting dependencies

Dockerfile currently uses jupyter/minimal-notebook:c54800018c2c to build the extension on top of. This image is over a year old, and causes dependency conflicts.

This should be updated to a later or latest minimal-notebook image in order to have an acceptable jupyterlab version.

Conflicting Dependencies:
JupyterLab              Extension            Package
>=0.15.2-0 <0.16.0-0    >=0.19.1-0 <0.20.0-0 @jupyterlab/application
>=0.15.2-0 <0.16.0-0    >=0.19.1-0 <0.20.0-0 @jupyterlab/apputils
>=0.15.2-0 <0.16.0-0    >=0.19.1-0 <0.20.0-0 @jupyterlab/console
>=1.0.4-0 <2.0.0-0      >=2.1.4-0 <3.0.0-0   @jupyterlab/coreutils
>=0.15.2-0 <0.16.0-0    >=0.19.1-0 <0.20.0-0 @jupyterlab/docmanager
>=0.15.2-0 <0.16.0-0    >=0.19.3-0 <0.20.0-0 @jupyterlab/filebrowser
>=0.15.2-0 <0.16.0-0    >=0.19.2-0 <0.20.0-0 @jupyterlab/notebook
>=0.15.2-0 <0.16.0-0    >=0.19.1-0 <0.20.0-0 @jupyterlab/rendermime

Acceptance Criteria:

  1. jupyterlab_voyager mybinder build works properly

Open table in Voyager option producing incorrect data

This issue concerns the Open Table in Voyager option.

Here is the code to reproduce this issue.

image

Currently, with the code from above, I get this result when I right click the pandas dataframe and click the Open Table in Voyager option.

image

The data for the related views is not correct, and should look more like this, (just open cars.json with Voyager)

image

As you can see, the charts are different in that the data is inconsistent between the two, which should be the same! For instance, the Origin vs Number of Records barchart displayed from the pandas dataframe route is different than the one from opening a json file in Voyager

Types of property 'currentChanged' are incompatible

conflicts happens with 0.29.2 during npm run build:

src/index.ts line 84:
Argument of type 'InstanceTracker' is not assignable to parameter of type 'InstanceTracker'.
Types of property 'currentChanged' are incompatible.
Type 'ISignal<InstanceTracker, VoyagerPanel | null>' is not assignable to type 'ISignal<InstanceTracker, any>'.
Type 'InstanceTracker' is not assignable to type 'InstanceTracker'.

Not sure how to fix "Types of property 'currentChanged' are incompatible."

Can not install

My jupyter version is 5.7.5 and I can not use jupyter labextension install jupyterlab_voyager to install.
The error message is Error executing Jupyter command 'labextension': [Errno 2] No such file or directory

Create gitter chat

I think it would be nice to have a gitter channel for this repo, so that we can discuss ideas and progress in a public way. I don't think I have the permissions to do this, however. altair-viz is not coming up as an organization I can create gitter rooms for. @ellisonbg what do you think about creating this room?

Add support for semi-colon separated text files?

Not sure whether this belongs here or on the main Voyager2 repository?

Is it possible to add support for semi-colon separated files, please? Voyager currently supports comma- and tab- separated files, but it would be great to be able to use semi-colon separated files too (especially in continental Europe, where "," is used as a decimal separator). This would also make Jupyter Lab Voyager more consistent with the formats already supported by Open with > Table for text files.

Bookmark support

An important part of Voyager's user experience is bookmarking visualizations that they find interesting/important.

image

From the image above you can see that the UI is still there for bookmarking visualizations, but since the original toolbar is not showing, there's no way to retrieve those bookmarked views!

Good news is that we expose a method in our api, getBookmarkedSpecs, that will give you the specs for the bookmarked visualizations, which should be pretty easy to just plug-in.

A neat potential feature is if a user could save their current Voyager state including bookmarked views, so they can revisit their exploration and those bookmarked views.

Cannot read property 'map' of null

Hi!
When I right click on a .csv file in the Files and choose Open with->Voyager I get :

localhost:8888 says Cannot read property 'map' of null

The voyage window opens up but it seems not read in any data at all.
But when I do the same to a .json file, the voyage window opens up without the error message but still no data is loaded.

My OS: Linux Mint
Chrome: 68.0.3440.75
node -v:v8.10.0

Thanks in advance!

Open CSV/JSON/Vega Lite/Voyager file from the file browser or existing window

A user should be able to open a variety of formats from the file browser or from an existing view of that file in Voyager. These include:

  • Tabular data files likes CSV/TSV or JSON format supported by Vega Lite/voyager, which should open in Voyager with with no Specified View.
  • Vega Lite files (.vl/.vl.json), which should open with the existing specification as the Specified View.
  • Voyager saved redux state files(.vy.json), which should restore the Voyager state to that.

Cannot install the Jupyter Lab extension

When trying to install, I get this:

$ jupyter labextension install jupyterlab_voyager
[...]
jupyterlab_voyager-0.2.0.tgz

ValueError: This extension does not yet support the current version of JupyterLab.

Conflicting Dependencies:
JupyterLab              Extension        Package
>=0.19.1 <0.20.0        >=0.16.3 <0.17.0 @jupyterlab/application
>=0.19.1 <0.20.0        >=0.16.4 <0.17.0 @jupyterlab/apputils
>=0.19.1 <0.20.0        >=0.16.3 <0.17.0 @jupyterlab/console
>=0.19.1 <0.20.0        >=0.16.3 <0.17.0 @jupyterlab/filebrowser
>=0.19.1 <0.20.0        0.16.3           @jupyterlab/notebook

While in the requirements file (of the released version, 0.2.0) it says jupyterlab>=0.32.0, so I'm not sure what's wrong here.

Design: Performance Questions

There are some data files that are too big to send to the user's browser, either because of network or memory constraints. Instead, it would be ideal to have Voyager do the aggregations it needs closer to the data, on the server, and send just what it needs to render the visualizations to the client. The Frictionless Data Specifications talks about the need to separate the transformations of the data from the visualization and they mention Vega, but I am not sure if their work will be helpful to us here.

We could use voyager-server to offload the visualization recommendation engine to the server, but AFAIK it still requires transporting all data to the client. I haven't done any profiling to get a sense if this is slow on the client side.

This problem is not limited to Voyager, but pertains to Vega Lite as well.

Related Views Collapsed By Default

I just got jupyterlab_voyager_test-0.1.6.tgz running at it confused me why it didn't seem to work like the demo here. I finally worked out that the "Related Views" pane is collapsed by default. I think it would make sense to have it expanded by default as per the link above.

Exploring alternate UI/UX

The existing Voyager UI is designed to be a full page app. In JupyterLab, that doesn't make as much sense. This purpose of this issue is to explore different ways of breaking Voyage apart into separate pieces and arranging them into different places in the JupyterLab UI. For now I am just taking screenshots and hacking together new views in Sketch.

error message on installation

I'm getting this error after using install command

/usr/bin/npm pack jupyterlab_voyager
jupyterlab_voyager-0.1.0.tgz

Errored, use --debug for full output:
TypeError: the JSON object must be str, not 'bytes'

Changes to IDocumentWidget in JupyterLab 0.33 break voyager extension

relevant docs from changelog

  • Main area widgets like the launcher and console inherit from a common MainAreaWidget class which provides a content area (.content) and a toolbar (.toolbar), consistent focus handling and activation behavior, and a spinner displayed until the given reveal promise is resolved. Document widgets, like the notebook and text editor and other documents opened from the document manager, implement the IDocumentWidget interface (instead of DocumentRegistry.IReadyWidget), which builds on MainAreaWidget and adds a .context attribute for the document context and makes dirty handling consistent. Extension authors may consider inheriting from the MainAreaWidget or DocumentWidget class for consistency. Several effects from these changes are noted below. (#3499, #4453)

Open Altair Output

A user should be able to open the output of an Altair visualization in a notebook in Voyager. When it opens, the Specified View should match the existing output as closely as possible.

The UI for this could be:

  • An option in the right click context menu on Vega Lite outputs in a Notebook to open in Voyager.
  • A Python API to wrap an existing Altair chart to tell Jupyter notebook to open it in Voyager

Remove top-level menu

I don't think it makes sense to display a top-level "Voyager" in all contexts. The original top-level menu in lab took this approach (there was a "Console" and "Editor" menu that were visible regardless of whether you were working in a notebook, editor, or terminal) and then it was revised to be more general (with "File", "Edit", and "Kernel" menus) and now all of the sub-menu items change based on context. I think it totally makes sense to use context menus and command palette commands for this extension because they can be made available based on the context. The only issue is that they're invisible to the user, so even though the user is probably aware that the extension is installed, he/she may forget and potentially not use it.

I created a commit to remove the menu bar, do with it what you see fit: c73a908

Open Pandas Dataframe

A user should be able to open a Pandas dataframe they have in a notebook with Voyager.

The UI for this could be:

  • An option in the right click context menu on Pandas dataframe outputs outputs in a Notebook to open in Voyager.
  • A Python API to wrap a Pandas DF to tell Jupyter notebook to open it in Voyager (like Chart).

This might be able to be supported by telling Pandas to output a JSON table schemas and transforming that for Voyager.

Disable debug mode for voyager

Currently Voyager is logging all of the redux actions it takes. This should be disabled and we should enable production mode. Hopefully this make it faster as well

Cannot open Vega-Lite file with data url

Step to reproduce:

  1. Clone Vega-Lite repository
  2. Start jupyter lab in the Vega-Lite code folder
  3. Go to examples/specs folder
  4. Right click on any example with URL data (not inline data) -> Open with -> Voyager (json)

cc: @FelixCodes

Extension is not working for jupyter lab 0.33.11

Hey guys, any hints on how I can make it work with JupyterLab 0.33.11?
My setup is:
jupyter --version
4.4.0
jupyter lab --version
0.33.11
jupyterhub --version
0.9.2

BTW, thanks heaps for providing this extension!

Cheers

Save to notebook cell

A user should be able to save/export a Voyager visualization to a notebook. Some possible formats of saving that might be:

  • A raw display_data cell (not yet implemented in the jupyter notebook)
  • The raw JSON data inside a VegaLite display class
  • Figure out how to get the Altair python code.

UX of opening/saving/exporting files in JupyterLab

@ellisonbg , @zzhangjii , and @tgeorgeux worked today on the UX of opening files in JupyterLab. We've identified three different input scenarios which we will summarize below:

.csv/.json/.tsv files

  • Files open by right-clicking in file browser and selecting 'Open with... Voyager' in context menu.
  • Don't auto create a vl.json file.
  • Save/Save As are disabled.
  • Export voyager as vl.json, Export voyager as vl.json with inline data. (Still working out copy for this option)
  • Future (dependent on JupyterLab datastore work): Save file path of data source and spec to datastore to enable work recovery on crash or reload.

vl.json files

  • Files open by right-clicking in file browser and selecting 'Open with Voyager' in context menu.
  • Save/Save As are enabled.
  • Export disabled.
  • Future (dependent on JupyterLab datastore work): Save file path of vl.json and spec (exclude inline data block if exists {this will require further exploration when implemented}) to datastore to enable work recovery on crash or reload.

Table/Altair in a Notebook Cell

  • Files open by right-clicking in table in notebook and selecting 'Open with Voyager' in context menu.
  • Don't auto create a vl.json file.
  • Save/Save As are disabled.
  • Export voyager as vl.json with inline data. (Still working out copy for this option)
  • Future (dependent on JupyterLab datastore work): Save file path of notebook with cell ID and spec (exclude inline data block if exists {this will require further exploration when implemented}) to datastore to enable work recovery on crash or reload.
  • Future: explore how to export view back to notebook without losing context.

@gnestor @jasongrout Can you both take a look at this and see if this UX makes sense in light of what we spoke about this morning in the JupyterLab Developer call. Does it also make sense for the plot.ly extension?

Save as a file

A user should be able to save a visualization they have created with Voyager as a file. This would likely be as a .vl.json file and might include the raw data or not. If the original input data was from a URL, we should probably save the URL in the file rather than the raw data. Some possible user interactions for this:

  • Top-level Voyager menu
  • New button in the specified view

Once a visualization has been saved, it should be easy to update that file, similar to a plain vanilla "Save".

Conflicting Dependencies

Hi,
I just installed jupyterlab and I wanted to add the voyager extension.

$ jupyter labextension install jupyterlab_voyager
> /usr/local/bin/npm pack jupyterlab_voyager
jupyterlab_voyager-0.1.0.tgz

Errored, use --debug for full output:
ValueError: 
"[email protected]" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab                        Extension          Package
>=1.0.6-0 <2.0.0-0                >=0.3.1-0 <0.4.0-0 @jupyterlab/rendermime-interfaces

My jupyterlab version is:
jupyter lab --version 0.31.12

MyBinder build fails

Trying to view the repo view MyBinder fails in the build:


Step 4/7 : RUN yarn install --frozen-lockfile --ignore-scripts && yarn cache clean
 ---> Running in 1cc1c0e1a813
yarn install v1.3.2
[1/4] Resolving packages...
error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Removing intermediate container 1cc1c0e1a813
The command '/bin/sh -c yarn install --frozen-lockfile --ignore-scripts && yarn cache clean' returned a non-zero code: 1

Design: Use in notebook interface?

Let's say I have a Python notebook open and have some data in a dataframe. I would like to be able to understand that data better and visualize it with Voyager. Right now, I would have to export that as a CSV in the current directory, then open the file with the Voyager viewer. This is problematic, because it interrupts my flow in the notebook, creates a file I may not want to use again, and might be slow.

Also, I might want to explore the visualizations in Voyager, then settle on one I like, and embed that in the notebook. Currently, I would have to copy the Vega Lite from Voyager graph I liked, then maybe use Altair to create a visualization for that dataframe with that data. Again, this isn't ideal because it disrupts my flow in the notebook.

Bug!! when using notebook table as data-src for voyager extension

Now nothing happens when clicking 'Open in Voyager' on notebook table,
This bug showed up in recent jupyterlab versions (>0.32??)

The reason is that, Previously, the source data of the table is stored in cell's 'application/vnd.dataresource+json' field as JSON, but now, this field no longer exists.
The original data only exists in 'text/plain' field as Strings
I'm trying to make it work using the String form, but have trouble convert it to JSON pairs,

Save the full Voyager state to a `.vy.json` file

The other data output/save examples are focused on the saving a single chart. A user should also be able to save the state of the entire redux store as a file and reload it later. We would want to formalize the idea of a .vy.json file type.

Add Integration Testing

We should add some integration testing to verify that this extension works properly. They should run in (at least one) real browser and verify the existing behavior.

Can't install

I suspect that this is a Jupyter problem.

jupyter labextension install jupyterlab_voyager
> /usr/local/bin/npm pack jupyterlab_voyager
jupyterlab_voyager-0.1.0.tgz

Errored, use --debug for full output:
AttributeError: full_url

Adding --debug give the following result

 jupyter labextension install jupyterlab_voyager --debug                          ⏎
Searching [u'/Users/kanitw', '/Users/kanitw/.jupyter', '/usr/local/Cellar/python/2.7.14_3/Frameworks/Python.framework/Versions/2.7/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
Looking for jupyter_config in /etc/jupyter
Looking for jupyter_config in /usr/local/etc/jupyter
Looking for jupyter_config in /usr/local/Cellar/python/2.7.14_3/Frameworks/Python.framework/Versions/2.7/etc/jupyter
Looking for jupyter_config in /Users/kanitw/.jupyter
Looking for jupyter_config in /Users/kanitw
> /usr/local/bin/npm pack jupyterlab_voyager
jupyterlab_voyager-0.1.0.tgz
Traceback (most recent call last):

  File "/usr/local/lib/python2.7/site-packages/jupyterlab/labextensions.py", line 71, in start
    ans = self.run_task()

  File "/usr/local/lib/python2.7/site-packages/jupyterlab/labextensions.py", line 100, in run_task
    for arg in self.extra_args

  File "/usr/local/lib/python2.7/site-packages/jupyterlab/commands.py", line 227, in install_extension
    return handler.install_extension(extension)

  File "/usr/local/lib/python2.7/site-packages/jupyterlab/commands.py", line 366, in install_extension
    info = self._install_extension(extension, tempdir)

  File "/usr/local/lib/python2.7/site-packages/jupyterlab/commands.py", line 1138, in _install_extension
    version = self._latest_compatible_package_version(name)

  File "/usr/local/lib/python2.7/site-packages/jupyterlab/commands.py", line 1202, in _latest_compatible_package_version
    metadata = _fetch_package_metadata(self.registry, name, self.logger)

  File "/usr/local/lib/python2.7/site-packages/jupyterlab/commands.py", line 1585, in _fetch_package_metadata
    logger.debug('Fetching URL: %s' % (req.full_url))

  File "/usr/local/Cellar/python/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 254, in __getattr__
    raise AttributeError, attr

AttributeError: full_url


Errored, use --debug for full output:
AttributeError: full_url

'Open Vegalite in notebook' can't work with local url file path

The context menu command to open a vl.json file in Notebook doesn't work if the vl.json is using local url as its data source:

if the ''data' inside the vl.json looks like this:
"data":{"url":"./data/barley.json","format":{"type":"json"}}

then in notebook
data_src = json.load(json_data)
alt.Chart.from_dict(data_src)
will not display the correct graph, because data reading fails.

It seems currently Altair's from_dict() function only works with inline data or online url

Cannot open a CSV from "Open with ..." menu

When I open a CSV from the "Open with ..." menu, I get the error String(...).match(...) is null in a popup from Firefox, with a "OK" button. Clicking the button opens voyager, but none of the CSV columns are detected, and I can't visualise anything.
jupyterlab-voyager-bug

Build Error: Cannot find module 'jupyterlab_voyager/package.json'

As title, apologies for the dump below:

Robins-Air:home-assistant.io robincole$ jupyter labextension install jupyterlab_voyager
> /usr/local/bin/npm pack jupyterlab_voyager
jupyterlab_voyager-0.2.0.tgz


   ╭─────────────────────────────────────╮
   │                                     │
   │   Update available 5.7.1 → 6.4.1    │
   │     Run npm i -g npm to update      │
   │                                     │
   ╰─────────────────────────────────────╯

> node /Users/robincole/anaconda3/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning qgrid > css-loader > cssnano > autoprefixer > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning qgrid > css-loader > cssnano > postcss-merge-rules > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning qgrid > css-loader > cssnano > postcss-merge-rules > caniuse-api > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning jupyterlab_voyager > datavoyager > [email protected]: WARNING: This project has been renamed to js-file-download. Use js-file-download instead.
[2/4] 🚚  Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=6.11.5".
error An unexpected error occurred: "Found incompatible module".
info If you think this is a bug, please open a bug report with the information provided in "/Users/robincole/anaconda3/share/jupyter/lab/staging/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
> node /Users/robincole/anaconda3/lib/python3.6/site-packages/jupyterlab/staging/yarn.js run build:prod
yarn run v1.5.1
$ webpack --config webpack.prod.config.js
module.js:471
    throw err;
    ^

Error: Cannot find module 'jupyterlab_voyager/package.json'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.resolve (internal/module.js:27:19)
    at /Users/robincole/anaconda3/share/jupyter/lab/staging/node_modules/@jupyterlab/buildutils/lib/build.js:22:43
    at Array.forEach (native)
    at Object.ensureAssets (/Users/robincole/anaconda3/share/jupyter/lab/staging/node_modules/@jupyterlab/buildutils/lib/build.js:21:22)
    at Object.<anonymous> (/Users/robincole/anaconda3/share/jupyter/lab/staging/webpack.config.js:19:7)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/robincole/anaconda3/share/jupyter/lab/staging/webpack.prod.config.js:5:14)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c webpack --config webpack.prod.config.js
Directory: /Users/robincole/anaconda3/share/jupyter/lab/staging
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/Users/robincole/anaconda3/share/jupyter/lab/staging/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Robins-Air:home-assistant.io robincole$ jupyter lab
[I 06:37:20.321 LabApp] The port 8888 is already in use, trying another port.
[I 06:37:20.348 LabApp] JupyterLab beta preview extension loaded from /Users/robincole/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 06:37:20.348 LabApp] JupyterLab application directory is /Users/robincole/anaconda3/share/jupyter/lab
[W 06:37:20.496 LabApp] Error loading server extension scriptedforms
    Traceback (most recent call last):
      File "/Users/robincole/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1481, in init_server_extensions
        mod = importlib.import_module(modulename)
      File "/Users/robincole/anaconda3/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'scriptedforms'
[W 06:37:20.498 LabApp] JupyterLab server extension not enabled, manually loading...
[I 06:37:20.499 LabApp] JupyterLab beta preview extension loaded from /Users/robincole/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 06:37:20.499 LabApp] JupyterLab application directory is /Users/robincole/anaconda3/share/jupyter/lab
[I 06:37:20.633 LabApp] Serving notebooks from local directory: /Users/robincole/Documents/Github/home-assistant.io
[I 06:37:20.633 LabApp] 0 active kernels
[I 06:37:20.633 LabApp] The Jupyter Notebook is running at:
[I 06:37:20.633 LabApp] http://localhost:8889/?token=bea16c0b2e3e7dca836ea1f3b7857a154190896a333c89ca
[I 06:37:20.633 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 06:37:20.638 LabApp]

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8889/?token=bea16c0b2e3e7dca836ea1f3b7857a154190896a333c89ca&token=bea16c0b2e3e7dca836ea1f3b7857a154190896a333c89ca
[I 06:37:20.834 LabApp] Accepting one-time-token-authenticated connection from ::1
[W 06:37:23.452 LabApp] Build recommended
[W 06:37:23.452 LabApp] jupyterlab_voyager needs to be included in build
[I 06:37:28.510 LabApp] > node /Users/robincole/anaconda3/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
jupyterlab_discovery-5.1.3.tgz
jupyterlab-scales-0.2.1.tgz
qgrid-1.1.1.tgz
jupyterlab-datawidgets-5.1.0.tgz
jupyterlab_voyager-0.2.0.tgz
jupyter-leaflet-0.9.0.tgz
jupyter-threejs-1.1.0.tgz


   ╭─────────────────────────────────────╮
   │                                     │
   │   Update available 5.7.1 → 6.4.1    │
   │     Run npm i -g npm to update      │
   │                                     │
   ╰─────────────────────────────────────╯

yarn install v1.5.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning qgrid > css-loader > cssnano > autoprefixer > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning qgrid > css-loader > cssnano > postcss-merge-rules > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning qgrid > css-loader > cssnano > postcss-merge-rules > caniuse-api > [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning jupyterlab_voyager > datavoyager > [email protected]: WARNING: This project has been renamed to js-file-download. Use js-file-download instead.
[2/4] 🚚  Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=6.11.5".
error An unexpected error occurred: "Found incompatible module".
info If you think this is a bug, please open a bug report with the information provided in "/Users/robincole/anaconda3/share/jupyter/lab/staging/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[I 06:38:33.672 LabApp] > node /Users/robincole/anaconda3/lib/python3.6/site-packages/jupyterlab/staging/yarn.js run build:prod
yarn run v1.5.1
$ webpack --config webpack.prod.config.js
module.js:471
    throw err;
    ^

Error: Cannot find module 'jupyterlab_voyager/package.json'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.resolve (internal/module.js:27:19)
    at /Users/robincole/anaconda3/share/jupyter/lab/staging/node_modules/@jupyterlab/buildutils/lib/build.js:22:43
    at Array.forEach (native)
    at Object.ensureAssets (/Users/robincole/anaconda3/share/jupyter/lab/staging/node_modules/@jupyterlab/buildutils/lib/build.js:21:22)
    at Object.<anonymous> (/Users/robincole/anaconda3/share/jupyter/lab/staging/webpack.config.js:19:7)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/robincole/anaconda3/share/jupyter/lab/staging/webpack.prod.config.js:5:14)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c webpack --config webpack.prod.config.js
Directory: /Users/robincole/anaconda3/share/jupyter/lab/staging
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/Users/robincole/anaconda3/share/jupyter/lab/staging/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What data format/providers to support and how?

This is an issue to begin discussing and thinking about what data sources we would want to support. There are maybe three related questions:

  • What data formats?
  • What different parts of JupyterLab (file system, notebooks) would be able to "provide" data in those formats.
  • What should the UX be?

For the data formats, here is a start:

For providers of those formats:

  • Filesystem (all the above)
  • Notebooks (MIME types for the above)
  • Datagrid (It already uses the JSON table schema internally)

For the UX:

  • Filesystem:
    • Use JupyterLab's "Open With..." to enable Voyager to open these file types (already implemented)
  • Notebook:
    • Some sort of UI that monitors notebooks in JupyterLab watching for outputs with the needed MIME types.
    • Context menu for a cell with that output and see "Visualize in Voyager."
  • Datagrid:
    • Either monitor or context menu.

set isDirty() function

When working on Voyager with a .vl.json as source file, we should set isDirty when we made changes in Voyager, to indicate to JupyterLab that it should style the tab appropriately (with a dot rather than a cross), and will pop up dialog if you try to close Voyager when it has unsaved work.

Install getting stuck on resolving packages

More specifically,

It gets stuck on this line:
[1/4] 🔍 Resolving packages...
jupyterlab_voyager@file:../extensions/jupyterlab_voyager-0.2.0.tgz

I just keeps 'resolving' but nothing happens

Would really appreciate some help with this

Thanks!

use native ‘Save’ command under 'File' menu to save Voyager

Currently, the changes in voyager are saved through newly designed 'Save Voyager' button in 'Voyager' menu or toolbar, it kind of conflicts with JupyterLab user's operation habit:
since under 'File' menu, Jupyterlab already provided 'Save', 'Save As', 'Save All' commands for users to save work to local files. So, for Voyager, we should follow this design, use those native 'Save' buttons to save the current Voyager status (vl.json form by default) to local files.

Those 'Save' commands rely on each widget's context() function to get the contents. I modified VoyagerPanel's context() function, now the original 'Save' button under File menu can save the changes inside voyager to local vl.json file.
But for other file types like csv, this action will put vl.json content into csv file and therefore destroy the original data. So, right now I added another logic in context() function to determine if a file is vl.json, if it's not, then the 'Save' command will not actually do anything.

My current solution is not ideal, any suggestions?
@ellisonbg

Cannot open .vl.json in Notebook

When exploring a dataset using Voyager, you can export the state to untitled.vl.json. However, if you export multiple states of Voyager, it generates file names with untitled.vl1.json that increment with a count. The files that have a number in the vl.json file path cannot be opened in a Notebook.

image

This works fine with a normal someName.vl.json, but whenever the file suffix is not .vl.json, you can no longer use the Open vl.json file in Notebook function.

Tutorial Page Modification

Currently the tutorial page's format doesn't match the JupyterLab Documentation style,
will change to the form of using tutorial.md linking youtube videos

Open URL

A user should be able to specify a URL to a CSV/JSON data file to open it in Voyager.

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.