Open amaloney opened 5 months ago
Development has started. I was able to get anywidget to render the data_vars
of the centered 8 InferenceData.
while not a forestplot, I have an @observablehq/plot
being rendered by JavaScript using anywidget to build the plot, which is of the penguins data
Next step is to manipulate the posterior data in JS to get the required data for a forestplot
Do you want the data processing to be done in javascript? Or precomputed in python? I looked a bit at observablehq website and it wasn't clear to me how data processing happens
I would like to try having data computations done in the browser, if they are not resource intensive. This is why the arviz.js repo exists; to handle computations that the browser can do easily, and update the plots accordingly.
The dropdown menus didn't show when clicked (for what ever reason) but the code now parses through the posterior object to populate one dropdown with data_vars
and the other dropdown with any coords
associated with the selected data_var
.
Parsing through the data is going to be a challenge, and we may want to use something like DuckDB for it...maybe.
@yilinxia what are your opinions about using DuckDB vs not?
After looking at DuckDB, I do not think we should use it as a tool since we would need to use the wasm version of it, and that seem unnecessarily heavy atm. I will continue to work on parsing the InferenceData
object so we can visualize it.
From my experience with DuckDB, it is pretty powerful and VERY fast. But I am not fully sure how it performs in terms of the dataset we are working on.
Yeah, WASM would be a great use case for DuckDB and we possibly will use it if we plan to make the computation happens in the browser.
Not a forest plot, but it is parsing the posterior data object and I'm able to get observable to plot a trace plot. Next step is to add interactivity with the menus so that the plot updates on changes.
hooking up interactivity with the menus was a straight forward callback. Note that this will fail when there are no coordinates associated with a variable, so other checks need to be made for non-hierarchical values.
I've diverged from creating a forestplot (atm) to look at interactivity etc for traceplots. Below shows the dropdowns correctly updating the figure with tooltips as you move the mouse. Next thing I'll try is getting an interactive legend.
Step closer, with chains being muted. Still need to figure out how to prevent the tips from overlapping.
definitely not a forestplot yet, but the posterior DataTree
object is fully parsed, passed to JavaScript and menus update the figure with callbacks populating each dropdown programmatically. This is using arvizjs
now, so next step is to make a KDE for this @aloctavodia @yilinxia
tagging @OriolAbril and @zaxtax if you're interested
dropdowns are not showing, but I've decided to switch this from a forestplot to the traceplot that is functioning well. Now to apply some styling
A few hoops to go through due to the package not being completely built from the branch, but it straight up works in colab
Previous iterations assumed single hierarchical variables, eg a(b) and not a(b, c). This version handles that, and does not assume a set number of hierarchical variables. This can be seen when we change data from rugby
to rubgy_field
.
There are a few more items to deal with, but I'm inclined to have this reviewed in a PR.