I'm looking for some kotlin alternative to plot on...
# datascience
e
I'm looking for some kotlin alternative to plot on a map (like folium with python)
a
I believe that there is a number of Java libraries. Also it is possible to wrap leaflet itself. Also if plotly maps are sufficient for you, we can add this functionality to Plotly.kt on request.
e
I'd need something asap unfortunately
a
Could you check if what Plotly has is sufficient? It would take like a day or two to add wrappers
i
@elect Lets-Plot has map component working in JVM and notebook alike. We can relatively fast add maps to Lets-Plot Kotlin API (at the moment maps only available in Python API). We have Geotools integration as well: https://github.com/JetBrains/lets-plot-kotlin/blob/master/docs/geotools.md How urgently do you need maps in Kotlin?
👍 1
e
@Igor Alshannikov for the 4th Sept
I'd need something like this, with a play and loop button in order to play this covid infection evolution continuously in a loop
a
Do you need to have it in JS or on a desktop? Plotly has this ability, so I can add this tomorrow (I think it will be nice to have it in lets-plot as well).
i
I see, no, animation of time series on map (in Lets-Plot Kotlin) can't be done in a week unfortunately.
e
on a desktop (I guess, I'll ask)
a
We have dynamic plots in Plotly.kt, but on the desktop it requires web browser, so it will increase the size of the application like 30 MB, also you need to tell me what UI framework do you use. If it is OK to open it in browser, then no problems here and I can do it tomorrow in the morning.
e
I guess the web browser is no problem at all, same as 30 MB overhead
I don't have preferences for the UI
a
Ah, OK, then I will add this functionality tomorrow morning and add an example to the repository.
e
awesome
thinking about it, web browser is definitely a yes
a
OK, please ping me tomorrow at the evening if I don't write anything before that. Quite a lot on my plate right now, so I can miss something.
e
ok, as you wish, thanks
a
@elect I've reproduced some examples from plotly showcase. But I've found out that there are a lot of different map providers with different features. I do not think it will be possible to implement them all in a short time. To you know which specific map provider do you want to use?
e
Saxony, but I don't know which provider At this point, I'd say whatever provider is the simplest to have the Saxony map detailed enough
a
OK. I believe that you needs separate districts as tiles?
e
yep
a
I will try to find the best example. Do you have a data sample I can refer to?
e
..asking
a
If you have a https://geojson.org/ specified map, then it will be quite easy
I've moved the discussion to more relevant #science channel (do we need a separate channel for visualization tools?). But I've added the basic geo API to plotly.kt and released it in
0.5.1-dev-1
(should be accessible from jupyter etc with
repo.kotlin.link
repository. Here is the example code: https://github.com/mipt-npm/plotly.kt/blob/dev/examples/src/main/kotlin/geo/saxony.kt. All dynamic capabilities should work. @Igor Alshannikov if you have some kind of feedback, it would be greatly appreciated. I am still looking forward for kind of common plots API in kotlin.
👍 2