altair-viz / jupyterlab_voyager

JupyterLab extension visualize data with Voyager
BSD 3-Clause "New" or "Revised" License
298 stars 35 forks source link

Address Enabling Export Voyager as Vega Lite File Command #69

Closed playermanny2 closed 5 years ago

playermanny2 commented 5 years ago

This PR enables 'Export Voyager as Vega Lite File' command by

  1. Utilizing widget.content to access voyager panel
  2. Updating setSpec to use valid spec object

This allows voyager data and spec to be saved and reopened inside vega lite, and Voyager. Once a valid vega lite file is opened in Voyager, various features become available since there are no spec setting errors.

Note this does not address saving spec state on reload when using normally .json, .csv, etc -- this should be addressed in another PR

  1. Native jupyterlab saving to the file
  2. Re-enable of Bookmark functionality
  3. Re-enable of data set functionality(Tested with URL and Upload. Change data set tab does not work as it loads from datavoyager prepackaged datasets which do not exists on the server
export-vega-lite-file-1 export-vega-lite-file-2 export-vega-lite-file-3 export-vega-lite-file-4 export-vega-lite-file-5
playermanny2 commented 5 years ago

@saulshanabrook any comments? will try to merge soon and will need the npm updated

saulshanabrook commented 5 years ago

@playermanny2 This looks good. Can I add you as a collaborator to the NPM package so you can publish it? What's your npm username?

playermanny2 commented 5 years ago

@saulshanabrook sounds good, my npm username is playermanny2