I’ve been working on improving the concept of a Cytoscape.js component for Streamlit, and I just finished an initial version (0.0.1) of a bidirectional component. More precisely, the component returns the element (node or edge) id tapped by the user, so that now we can trigger other visualizations based on the interaction with the network.
Since my knowledge in web development is very weak and my time is limited, instead of using a react template I chose to go for the reactless one. Despite being more verbose, I can directly use the original Cytoscape.js library, which has a ton of useful functions. To be honest, I really wanted to do a react component and collaborate with @andfanilo, but the react framework seemed quite complex.
I published the component as a package in pipy test repository here and the GitHub repository has use instructions. Don’t expect it to work without bugs as I didn’t test it extensively and I have close to 0 experience in this field haha. But for simple networks that I tested, it worked. If you find bugs, please report it on the issues page.
For the next steps (help is very much appreciated), I would like to:
- Create a dashboard example where the bidirectional communication is utilized.
- Expand the package to support another very useful use case, where tapping a node expands the network to show the node’s neighborhood.