Black Lives Matter. Please consider donating to Black Girls Code today.

Interactively grow a tree graph with Dash

I am trying to build my first Dash app for interactive data mining. My colleague and I have so far tried to use Python backend with Flask and D3, but it has felt overly complicated way for our needs. So I started to explore different options. Coming from R side with some experience with Shiny, I found Dash potentially good solution. However, there is one essential visualization part which I am not sure how to do with Dash: A tree graph, something like this: http://bl.ocks.org/d3noob/8375092.

Essentially I need a way to visualize the current tree status (nodes and their connections, different colors and sizes for the nodes depending on some variables), way to update the current status, and ability to select one or multiple nodes which will serve as a filter for Pandas dataframe (what rows to select).

I noticed that it is possible to add custom plugins so I guess the visualization of the tree could be done with D3, but Iā€™m not sure how to add the needed interactivity in that case. Currently the backend builds up the tree object as JSON, but other options are possible as well.

Welcome to Dash!

See Building Interactive Collapsible Tree on Dash for some more info and discussion.

1 Like