Convert KeplerGl html file to iframe

202 views Asked by At

I have created a map using KeplerGl in Databricks. I saved the file using:

map_1._repr_html_().decode("utf-8")

I opened the html file in a text editor to find the iframe information, but it didn't exist. I then tried some of the src links in the text editor, but those just brought up more lines of code. I'm trying to embed into a sharepoint site. Is there a way for me to embed my html map into sharepoint, and interact with it as you would with a google maps embed?

I don't know how useful the html code would be, but I can't post it because of the spam filter, and I don't know how to get around that.

I think keplergl 0.2.0 had a function that allowed you to embed, but I'm not sure how I could use that version.

I also thought about loading the html map into mapbox, and then getting my embed from there, but I have no idea how I'd even start to do that either.

1

There are 1 answers

0
Shalaka Deshan On

You can use the keplergl module's built in function to save the html "this will save map with provided data and config". Then you can saved html, in here "first_map.html" inside a iframe in your web application. Hope this will works for you.

keplergl.save_to_html(data={"data_1": df}, config=config, file_name='first_map.html')