Want a graph that exhibits specific behavior between nodes and edges

Okay, I’ve been down a bit of a rabbit hole this past week. I’ve gone through bokeh, then networkx, and now I’m here.

This question on the bokeh support site details what I’m trying to accomplish and what I’ve tried there, but here’s the gist of it:

I have a dataset of roughly 5000 “nodes” divvied up until 1300 groups. For each group, I want an “edge” to exist between each point in that group and every other point in that group, so I figured (based on the combination nCr where I’m picking two items after not replacing the first item and order doesn’t matter), I have a grand total of roughly 880000 “edges”.

Regarding behavior, I only want the edges to be visible when I’m hovering over a node, and the only edges that I want to be visible are the ones that touch that specific node.

When I tried doing this with the network graphs using a combination of bokeh and networkx, the resulting graph was monumentally slow. Previously, I’d done it with the CustomJS callbacks in bokeh only, and it had worked, but I don’t know javascript at all, I repurposed some code I found on bokeh’s website.

In addition to noodling it through some more, the wonderful gentleman from bokeh that was helping me suggested that I turn to HoloView.

Do y’all have any ideas on how to move forward with this? This’ll be my third Python package I’ve attempted to grok in the last week, and I’m not a programmer.