keplergl_cli
keplergl_cli copied to clipboard
Add option to display IFrame in Jupyter environments
E.g. in Atom:

Note that IFrame takes the path to the HTML script, not the HTML source
import geopandas as gpd
from keplergl_cli import Visualize
gdf = gpd.read_file('/Users/kyle/Downloads/nationalpark_orig.geojson')
vis = Visualize()
vis.add_data(gdf)
html_path = vis.render(open_browser=False)
with open(html_path) as f:
source = f.read()
from IPython.display import IFrame
IFrame(html_path, 1500, 800)