Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish kepler.gl for jupyter notebook #331

Closed
heshan0131 opened this issue Jan 16, 2019 · 14 comments
Closed

Publish kepler.gl for jupyter notebook #331

heshan0131 opened this issue Jan 16, 2019 · 14 comments
Assignees
Labels
feature A new feature jupyter keplergl for Jupyter rfc roadmap item Item that's on our current roadmap

Comments

@heshan0131
Copy link
Contributor

heshan0131 commented Jan 16, 2019

Feature
Publish a kepler.gl for jupyter python package to load kepler.gl inside jupyter notebook

screen shot 2018-11-16 at 2 06 51 pm

Solution
kepler gl jupyter notebook

  • Create a kepler.gl build to embed js and css into a single html
  • Create a jupyter notebook python package to load keplergl.html inside an iframe
  • Publish kepler.gl for jupyter
  • Allow adding data and config via python API

Appendix

Kepler.gl Jupyter Integration Slides

@heshan0131 heshan0131 added feature A new feature roadmap item Item that's on our current roadmap labels Jan 16, 2019
@heshan0131 heshan0131 self-assigned this Jan 16, 2019
@heshan0131 heshan0131 added the rfc label Jan 16, 2019
@rmanisthebest
Copy link

May i ask any notebook template or example for this feature?

@heshan0131
Copy link
Contributor Author

This work is still in progress

@ibgreen
Copy link
Collaborator

ibgreen commented Mar 4, 2019

@briantcl
Copy link
Contributor

  1. user testing
  2. need marketing plan for the release
  3. medium post/ marketing release (TBD)

Target release date: next sprint

@briantcl
Copy link
Contributor

briantcl commented Apr 19, 2019

to-do:

  1. publish to the code base

Launch Plan:

  1. medium post
  2. Share the medium post url through linkedin, twitter
  3. demo notebooks

@murari-goswami
Copy link

Any date for release ?

@emiliomartin84
Copy link

Any update about the release date?

@murari-goswami
Copy link

Hi Briantcl, any update on the launch plan ?

@chintanp
Copy link

chintanp commented Jul 1, 2019

Are there plans to support Jupyter lab? I am able to test it with jupyter notebook and it works. :)

@wasauce
Copy link

wasauce commented Jul 2, 2019

FYI - https://medium.com/vis-gl/introducing-kepler-gl-for-jupyter-f72d41659fbf - I hadn't seen this and was thinking it wasn't released yet. Very exciting! Thank you!

@saulshanabrook
Copy link

I have hacked together some JupyterLab support. There is currently a JuptyerLab plugin in this repo, but it isn't being built currently, as far as I can tell.

To use this with JupyterLab 1.0:

conda create -n kepler-jupyterlab -c conda-forge jupyterlab=1.0.0
conda activate kepler-jupyterlab
pip install ipywidgets keplergl
jupyter labextension install @jupyter-widgets/jupyterlab-manager
git clone git@github.com:saulshanabrook/kepler.gl.git
cd kepler.gl/bindings/kepler.gl-jupyter/js
yarn
env MapboxAccessTokenJupyter=<YOUR_TOKEN> npx babel lib --out-dir babel
jupyter labextension install .

It seems to work OK:

from keplergl import KeplerGl 
map_1 = KeplerGl(height=500)
map_1

# new cell
import pandas as pd
df = pd.DataFrame(
    {'City': ['Buenos Aires', 'Brasilia', 'Santiago', 'Bogota', 'Caracas'],
     'Latitude': [-34.58, -15.78, -33.45, 4.60, 10.48],
     'Longitude': [-58.66, -47.91, -70.66, -74.08, -66.86]})

map_1.add_data(data=df, name='cities')

Screen Shot 2019-07-02 at 1 34 20 PM

The changes I made were:

  • Build version of JS files that doesn't include JSX syntax, using babel. Also turn off some of babels plugins, so that ES6 imports are preserved
  • Change some imports so they build properly with JL
  • Update the @jupyter-widgets/base dependency so it matches the one in JL. There are probably breaking changes in here, but I am not sure if they matter for this use case.

@heshan0131
Copy link
Contributor Author

@saulshanabrook Thank you so much for this!! I will implement your changes and test it

@heshan0131
Copy link
Contributor Author

keplergl==0.1.0 and keplergl-jupyter@0.1.0 can now be installed on jupyter Labs
(Python 3 tested)

#764

@heshan0131
Copy link
Contributor Author

heshan0131 commented Oct 5, 2019

Add installation instruction for Jupyter Lab
https://github.com/keplergl/kepler.gl/tree/master/bindings/kepler.gl-jupyter#installation
Close this for now 🥂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature jupyter keplergl for Jupyter rfc roadmap item Item that's on our current roadmap
Projects
None yet
Development

No branches or pull requests

9 participants