datatree icon indicating copy to clipboard operation
datatree copied to clipboard

Graph-like visualization

Open TomNicholas opened this issue 2 years ago • 3 comments

It would be cool to be able to visualize the structure of the tree as a diagram, similar to how you can visualize dask graphs.

What would be even cooler is if you could see the contents of each node by mousing over them in the repr. Dask has a lot of discussion about that, and so far they implemented an interactive version using ipycytoscape in addition to their non-interactive version using graphviz.

For an implementation of plotting a tree (not a general graph) using graphviz also see here.

TomNicholas avatar Jan 19 '23 22:01 TomNicholas

Using graphviz with tooltips in SVG like dask did is probably the quickest way to get something helpful.

TomNicholas avatar Jan 27 '23 20:01 TomNicholas

Seen in the zarr docs: https://github.com/QuantStack/ipytree

https://zarr.readthedocs.io/en/stable/tutorial.html#array-and-group-diagnostics

dcherian avatar Mar 07 '23 03:03 dcherian

I recently wrote a PySide/PyQt interactive widget for viewing and editing a zarr hierarchy as a tree (https://github.com/zarr-developers/zarr-python/discussions/1488, https://github.com/marcel-goldschen-ohm/zarr-view) that might be of use. You would either have to first serialize to zarr, or else edit my code to handle an xarray-datatree (seems like it wouldn't be that different).

marcel-goldschen-ohm avatar Aug 10 '23 23:08 marcel-goldschen-ohm

closed Follow up on https://github.com/pydata/xarray/issues/9338

flamingbear avatar Aug 13 '24 16:08 flamingbear