Another question is how does kandy treat observabi...
# datascience
a
Another question is how does kandy treat observability (both data and layout) right now? I remember we talked about that, but I do not see anything in the documentation.
a
What do you mean?
Access to it after plot creation? Or during it?
a
After or asynchronously inside the plot block.
a
I guess it means that there is no observability. Meaning you can't react on changes of the plot after it is created.
a
IR is designed to be as flexible as possible in terms of features. This means you can add any feature to it, including observability.
a
It seems like you use DataFrame for data representation internally, it blocks a lot of possibilities.
a
But it doesn't have to be the only one
There are no dynamic elements in kandy-lets-plot, so we have not implemented such a feature. But if you want to implement kandy for another engine, like plotly, you can add an observability
a
I guess, we will discuss it more then. Right now, implementing observability requires some kind of observable maps and lists as well as more flexible data representation
a
Moreover, in IR (namely in
Plot
data class) as you can see there is no binding to DataFrame - there is
TableData
- it is an interface that you can implement at your discretion.
a
But there are no details in
TableData
. So you either need to reimplement the whole logic for each new data representation or there are some implementation-specific internals somwhere inside. I mean, you can't add a new representation without changing the core code.
a
It's quite logical, new kind of data - new logic for working with it.
a
I do not think so. The abstraction should be done in a way that adding new implementation does not break it. For example there is a DataFrame data representation, there is a more universal table format in Tables-kt and yet KMath has its own mimimal data abstraction in order to work indepenently from thos libraries.
a
Key part of implementation depends on engine. You can add something like
ObservableData.plot {}
for your particular engine, with almost the same DSL (but of course you can add there new features - flexible IR allows it), and then handle a plot IR.
DataFrame is convenient for us, so we use it in kandy-lets-plot. But again, any type of data can be used in IR, but since they can be completely different and depend on the engine, the main part of the implementation is in the translator