Hi all,

We’re proud to announce the first release of the yt-widgets package, widgyts, which is a growing collection of Jupyter widgets for use in yt.

The package is on PyPI so you can install it with:
 pip install widgyts

This package was designed so that you can interactively explore your data with the goal of making data exploration more accessible to yt users. You can pan, zoom, and update view parameters (like the colormap or the colormap bounds) quickly and learn where interesting features of your data are. We’ve uploaded a couple of demonstration notebooks to give you a feel of the widget, one with IsolatedGalaxy and the others with slices and projections (made using yt) of Britton’s Pop II Prime dataset (thanks for making this dataset available Britton!). You can experiment and play around with the notebooks on the yt hub. Alternatively, you can watch or look at the slides from Madicken’s talk at SciPy 2018 about the initial stages of this project.

At present, widgyts consists of a few components. The foundational widget is that of a variable-mesh image viewer, using Rust compiled to WebAssembly. The WebAssembly code is used to do the most performant-limiting calculations in the widget, resulting in much higher framerates than pure javascript rendering. Because WebAssembly was designed to interface with javascript, widget features can be built out using standard Python/javascript aspects of Jupyter widgets. You can read a little bit more about WebAssembly here and here if you’d like to learn more about it. Widgyts also currently has a widget that quickly converts data arrays to rgba colormapped arrays, and a tool to set up a standard set of widget controls.

This should work in all major browsers in the Jupyter notebook; at present Jupyterlab does not have support for easy distribution of wasm binaries. When able, we will build out support for this widget with Jupyterlab.

We’d like to thank the hard work done on other projects to make the development of widgyts possible. In particular, we’d like to thank the Jupyter team and the developers of ipywidgets. We’d also like to thank the rust core team and the wasm-pack developers for their awesome platforms.

Thanks for reading! If you’d like to give us any feedback on the widget, please don’t hesitate to reach out via e-mail, slack, or in either the rust or the widgyts repository.

Madicken Munk, Matthew Turk, and Nathanael Claussen