marimo icon indicating copy to clipboard operation
marimo copied to clipboard

ipyleaflet support

Open akshayka opened this issue 1 year ago • 3 comments
trafficstars

Originally posted by @misolietavec in https://github.com/marimo-team/marimo/issues/503#issuecomment-1892592187

I am building small application with panel, plotly, ipyleaflet. The ipywidgets ecosystem has already many modules, I can use. Especially, I need the functionality of ipyleaflet, because altair has limited functionality in this area. Is there any hope, that marimo will have, in future, equally rich, or better ecosystem as ipywidgets? I understand, this is not the short-time priority.

akshayka avatar Jan 18 '24 16:01 akshayka

Hi @misolietavec, yes, we certainly do plan to create a rich ecosystem of interactive plugins.

We have basic integration with leafmap, to at least let you display interactive maps. You can see this example: https://github.com/marimo-team/marimo/blob/main/examples/third_party/leafmap.py

What features from ipyleaflet do you need in particular.

akshayka avatar Jan 18 '24 16:01 akshayka

I think, leafmap has too many dependencies. I like the simplicity of marimo and that it is not such heavyweight guy as jupyterlab. It was a breeze to rewrite my panel application (NYC taxi plots and map) to marimo. I used scatter_mapbox from plotly.express, liked the ability to select data in marimo.ui.plotly. Maybe, you can make interface to leaflet.js without using ipywidgets and ipyleaflet - it would be great.

See my repository https://github.com/misolietavec/nyc_taxi_marimo. It uses plotly and polars. If you like, you can adapt the files taxi_marimo_en.py, data_functions_en.py as examples (maybe with smaller dataset).

misolietavec avatar Jan 18 '24 20:01 misolietavec

For comparison, the same application in panel, you can see at http://feelmath.eu:2022/taxi_panel (texts are in slovak). Especially, the (ipy)leaflet's MarkerCluster is what I like to see in marimo, sometimes in future.

misolietavec avatar Jan 19 '24 10:01 misolietavec