altair-viz / jupyterlab_voyager

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

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

Open zzhangjii opened 6 years ago

zzhangjii commented 6 years ago

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