kepler.gl
kepler.gl copied to clipboard
[jupyter] WIP python save_to_json function
-
The goal is to export the entire map as a json by calling the following javascript code, and access it from a python function call:
const exportedData = state.keplerGl.map.visState.schema.save(state.keplerGl.map)
-
Adds a
save_to_json
python function to compliment thesave_to_html
function.
This PR is not yet functional. I'm unsure how to implement a low level async data exchange between python->js->python.
Research links: https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Asynchronous.html#Waiting-for-user-interaction https://ipywidgets.readthedocs.io/en/latest/embedding.html#python-interface https://stackoverflow.com/questions/33845775/send-json-data-to-jupyter-notebook-frontend-via-comm/33846113 https://github.com/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Widget%20Low%20Level.ipynb https://github.com/jupyter-widgets/ipywidgets/blob/24628f006c8a468994eba7a6e964fe619c992267/ipywidgets/widgets/widget.py#L260 https://github.com/jupyter-widgets/ipywidgets/blob/master/packages/base/src/widget.ts
published 2.5.1
with utils in dist
what is the goal of the exported json? Loaded back to kepler? then you want to use the getMapJaon
method and pass in the entire state. not just visState
Hello!
Any news on this MR? Is the save_to_json
something still being worked on?